Skip to content

Instantly share code, notes, and snippets.

@mattharrison
Last active April 10, 2020 19:24
Show Gist options
  • Save mattharrison/aaf8e19d20e6efa5706035e60e2c9382 to your computer and use it in GitHub Desktop.
Save mattharrison/aaf8e19d20e6efa5706035e60e2c9382 to your computer and use it in GitHub Desktop.
Plot positive and hospitalization rates for Covid-19
%matplotliblib inline
import pandas as pd
url = 'https://github.com/COVID19Tracking/covid-tracking-data/raw/master/data/states_daily_4pm_et.csv'
df = pd.read_csv(url, parse_dates=['date', 'dateChecked'])
(df
[df.state == 'NC']
.set_index('date')
[['positive', 'hospitalized']]
.fillna(0)
#.interpolate()
.plot()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment