Artificial Intelligence
160

Create AI for your CV -VISUALIZING & PREDICTING CORONA CASES – LATEST AI PROJECT






  20-Oct-2020 20:26:23




From World Health Organization – On 31 December 2019, WHO was alerted to several cases of pneumonia in Wuhan City, Hubei Province of China. Since then Corona Virus is spreading across the globe. In this project ” VISUALIZING & PREDICTING CORONA CASES”, we will be using a dataset from Our World in Data.

Here we will be visualizing the current trend of cases and trends in Asia, especially in Nepal(You can choose your own country). So, let’s begin the project by importing the dataset & other libraries.

Code : 

covid_data_countrydate = covid_data[covid_data['new_cases']>0]

covid_data_countrydate = covid_data_countrydate.groupby(['date','location']).sum().reset_index()

fig = px.choropleth(covid_data_countrydate, 

                    locations="location", 

                    locationmode = "country names",

                    color="new_cases", 

                    hover_name="location", 

                    animation_frame="date"

                   )


fig.update_layout(

    title_text = 'Spread of Coronavirus',

    title_x = 0.5,

    geo=dict(

        showframe = False,

        showcoastlines = False,

    ))

fig.show()

VISUALIZING CASES IN ASIA REGION

Here, we are visualizing the corona datasets only from Asia. So, we will be selecting datasets related to the Asia continent only. We will be grouping the datasets by country name i.e location and date. Now, we will visualize the cureent corona cases in the Asia region as of October 13.

Code 

#selecting only Asia Region

covid_data1=covid_data.loc[covid_data['continent'] == 'Asia']


#grouping by data & location whose corona cases> 0

covid = covid_data1.groupby(['location', 'date']).max().reset_index().sort_values('date', ascending=False)

covid = covid.drop_duplicates(subset = ['location'])

covid = covid[covid['total_cases']>0]


#visualizing Corona Cases on October 13 in Asia Region

fig = go.Figure(data=go.Choropleth(

    locations = covid['location'],

    locationmode = 'country names',

    z = covid['new_cases'],

    colorscale = 'Reds',

    marker_line_color = 'black',

    marker_line_width = 0.5

))


fig.update_layout(

    title_text = 'New cases As of October 13 : Asia',

    title_x = 0.5,

    geo=dict(

        showframe = False,

        showcoastlines = False,

        projection_type = 'equirectangular'

    )

)

Read more . . .


DISCUSSION
Nothing comment here :(
Login for comment and discussion.
Login Here
POST NEW DISCUSSION
Popular Posts
Gps Tracker Seccodeid Free Too...
Bayu aji Bayu aji
General
1442
118
Top

Mass Reverse IP Unlimited
ImamSy ImamSy
Hacking
1133
10
Top

Free Proxy List
Sandidi Sandidi
Networking
1127
3
Top

Report McAfee Antivirus Hurrri...
Indrasp Indrasp
Windows
829
93
Top

GHunt OSINT Tools - Investiga...
Sandidi Sandidi
Tools Hacking
723
3
Top

Related Post
Subscribe

Subscribe free now for latest posts