How to make an animated NYC COVID-19 map with Python.
According to a recent New York Times article, COVID-19 has caused over 24,000 deaths in New York City alone. The height of the pandemic has passed but is it over? A second surge may be in store, and it’s important for all us New Yorkers to continue to wears masks, socially distance and wash our hands frequently. If you’ve made it this far, carry on.
The Goal
The goal of this blog is to give a short tutorial on how to create an animated NYC COVID-19 map, using open source data from NYC Department of Health’s (DOH) Github. Everything needed to construct visualizations is provided, and updated regularly. All that is needed is some code…
The Data
NYC DOH keeps their Github updated daily with the exception of tables in the testing and recent data folders which are updated Thursday’s weekly. This allows us to keep our map data updated as well. Simply fork the repository on Github, and clone it to your local directory. Whenever you want to update, create a pull request then pull from your local directory. This way if you want to update your maps, you don’t have to download and save any new files.
There are plenty of different data files available, however we are interested in the file that aggregates COVID data by modified Zip Code Tabulation Areas…