Artificial Intelligence
423

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
Sponsored

Oppss... No sponsors yet

Popular Posts
Complete Basic Course in Kali...
Djie sam soe Djie sam soe
Linux
12449
2
Top

Gps Tracker Seccodeid Free Too...
Djie sam soe Djie sam soe
General
7353
167
Top

Free Proxy List
Sandidi Sandidi
Networking
3162
3
Top

Mass Reverse IP Unlimited
ImamWawe ImamWawe
Tools Hacking
2563
12
Top

Xampp msyql error cant running
Karno si kribo Karno si kribo
Web Development
1765
25
Top

Related Post

Youtube Video

Subscribe