How to make an animated NYC COVID-19 map with Python.

Justin Morgan Williams
6 min readNov 6, 2020

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…

--

--

Justin Morgan Williams
Justin Morgan Williams

Written by Justin Morgan Williams

Data scientist passionate about the intersectionality of sustainability and data.