Created
May 31, 2020 08:31
-
-
Save ceteri/3b0287e80645b172313e0989e5fdf757 to your computer and use it in GitHub Desktop.
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
anim_path = pathlib.Path("anim/") | |
anim_path.mkdir(parents=True, exist_ok=True) | |
fig = plt.figure() | |
image_files = [] | |
for date in dates: | |
is_earthday = ihme["date"]==date | |
cv19 = contiguous_usa.merge(ihme[is_earthday], left_on="state", right_on="location_name") | |
deaths_per_mil = cv19["deaths_mean"] / cv19["population"] * 1000000.0 | |
cv19["deaths_per_mil"] = deaths_per_mil | |
file_name = plot_choropleth(anim_path, date, cv19, continental_usa_cities) | |
image_files.append(file_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment