Created
April 26, 2020 14:49
-
-
Save massie/378eb305ab68602c6ac3907f38f02418 to your computer and use it in GitHub Desktop.
Code for pulling in CA Data from CHHS Open 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
url = 'https://data.chhs.ca.gov/dataset/6882c390-b2d7-4b9a-aefa-2068cee63e47/resource/6cd8d424-dfaa-4bdd-9410-a3d656e1176e/download/covid19data.csv' | |
states = pd.read_csv(url, | |
header=0, | |
names=["state", "date","positive"], | |
usecols=['date', 'state', 'positive'], | |
parse_dates=['date'], | |
index_col=['state', 'date'], | |
squeeze=True).sort_index() | |
# You'll also need to set cutoff = 1 for calls to prepare_cases and catch empty sequences | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment