"""
**First we import necessary libraries.Lets collect the data. We are using URL to collect the data. This URL downloads the csv file**
"""
import pandas as pd
import plotly as py
import plotly.express as px #For high level data visualization
url='https://covid.ourworldindata.org/data/owid-covid-data.csv'
data=pd.read_csv(url) #Reading data into dataframe
pd.options.display.float_format = '{:.2f}'.format #getting rid of 'e'form in data value
data.head()
data_countrydate = data[data['new_cases']>0] #Filtering data with new cases>0
data_countrydate=data_countrydate.groupby(['date','location']).sum().reset_index() #Grouping the data by date and location
fig = px.choropleth(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,
    ))
"""
This is simple way of knowing how new cases of covid are changing.
"""