Last active
March 17, 2020 20:02
-
-
Save santiagocasas/db60f90deabbff89becda3f9e2696519 to your computer and use it in GitHub Desktop.
Import Data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
giturl_confirmed = 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv' | |
giturl_deaths = 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Deaths.csv' | |
giturl_recovered = 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Recovered.csv' | |
casestr='Deaths' #'Confirmed' #'Recovered', 'Deaths' | |
chosen_plotmodel = 'Logistic' #'Logistc' | |
if casestr=='Confirmed': | |
curl = giturl_confirmed | |
elif casestr=='Deaths': | |
curl = giturl_deaths | |
elif casestr=='Recovered': | |
curl = giturl_recovered | |
corona_cases_df=pd.read_csv(curl, index_col=[0,1,2,3]) | |
# use first four columns as multiindex | |
corona_cases_df.columns.values | |
>>> | |
array(['1/22/20', '1/23/20', '1/24/20', '1/25/20', '1/26/20', '1/27/20', | |
'1/28/20', '1/29/20', '1/30/20', '1/31/20', '2/1/20', '2/2/20', | |
'2/3/20', '2/4/20', '2/5/20', '2/6/20', '2/7/20', '2/8/20', | |
'2/9/20', '2/10/20', '2/11/20', '2/12/20', '2/13/20', '2/14/20', | |
'2/15/20', '2/16/20', '2/17/20', '2/18/20', '2/19/20', '2/20/20', | |
'2/21/20', '2/22/20', '2/23/20', '2/24/20', '2/25/20', '2/26/20', | |
'2/27/20', '2/28/20', '2/29/20', '3/1/20', '3/2/20', '3/3/20', | |
'3/4/20', '3/5/20', '3/6/20', '3/7/20', '3/8/20', '3/9/20', | |
'3/10/20', '3/11/20', '3/12/20', '3/13/20', '3/14/20', '3/15/20', | |
'3/16/20'], dtype=object) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment