Skip to content

Instantly share code, notes, and snippets.

@ceteri
Created May 31, 2020 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceteri/3b0287e80645b172313e0989e5fdf757 to your computer and use it in GitHub Desktop.
Save ceteri/3b0287e80645b172313e0989e5fdf757 to your computer and use it in GitHub Desktop.
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