Visualizing COVID-19 in NYC

(Updated on April 15, 2020, by Carlos Afonso, a Data Scientist in NYC)

Important Note: This project was done in the beginning of the COVID-19 pandemic (March - April 2020) when the quantity and quality of data available was relatively poor. This project is a good example of how to deal with such situations of poor data. In particular, how to pick the most appropriate metrics to better understand the problem at hand, how to visualize those metrics, and how to highlight the data limitations directly in data visualizations. This project was last updated on April 15, 2020.

Data visualizations to help understand the evolution of the Coronavirus Disease 2019 (COVID-19) here in New York City (NYC).

1. Percent of positive COVID-19 tests over time

The “percent of positive COVID-19 tests over time” is arguably the best metric to help understand the evolution of the disease here in NYC, because:

The chart below shows two complementary versions of this important metric, namely:

The two lines/metrics in the chart above are explained in more detail in the next two charts (sections 1.1 and 1.2).

1.1. Percent of new daily positive COVID-19 tests over time

The next figure has two charts. The first/top chart shows both the “number of new daily total COVID-19 tests” (in green) and the “number of new daily positive COVID-19 tests” (in blue) “by test date”. There has been a progressive increase in the number of total tests over time. The number of positives has grown along with the number of total tests (which is expected). However, a piece of good news is that, when compared with the total tests (green line), the new positives (blue line) seems to have been growing at a slower pace recently. This important piece of information is better captured in the figure’s second/bottom chart.

Indeed, the second/bottom chart shows the “percent of new daily positive COVID-19 tests by test date” (in orange) which is defined as the “number of new daily positive COVID-19 tests” divided by the “number of new daily total COVID-19 tests” (i.e., the ratio of the two lines in the first chart: the blue line divided by the green line) – multiplied by 100 to transform the ratio into a percentage. Note how after an initial progressive increase, the percent of new positive tests (orange line) has been decreasing recently. This is the same piece of good news as already seen in the first/top chart, but now the second/bottom chart makes it more clear.

1.2. Percent of cumulative positive COVID-19 tests over time

The next figure is the cumulative version of the previous figure.

The next figure has two charts. The first/top chart shows both the “number of cumulative total COVID-19 tests” (in green) and the “number of cumulative positive COVID-19 tests” (in blue) “as of the test date”. There has been a progressive increase in the number of total tests (green) over time. The number of positives (blue) has grown along with the number of total tests (as expected). However, a piece of good news is that, when compared with the total tests (green line), the new positives (blue line) seems to have been growing at a lower pace recently. This important piece of information is better captured in the figure’s second/bottom chart.

Indeed, the second/bottom chart shows the “percent of cumulative positive COVID-19 tests as of the test date” (in orange) which is defined has the “number of cumulative positive COVID-19 tests” divided by the “number of cumulative total COVID-19 tests” (i.e., the ratio of the two lines in the first chart: the blue line divided by the green line) – multiplied by 100 to transform the ratio into a percentage. Note how after an initial progressive increase, recently, the percent of new positive tests (purple line) stabilized and seems to be starting to decline. This is the same piece of good news as in the first/top chart, but now the second/bottom chart makes it more clear.

2. New daily COVID-19 cases, hospitalizations, and deaths over time

The chart below shows the new daily COVID-19 cases (i.e., positive tests), hospitalizations, and deaths in NYC.

3. Demographic breakdowns of COVID-19 in NYC

3.1. COVID-19 rates by age group

3.2. COVID-19 rates by sex

The charts below show NYC’s COVID-19 rates by sex. More specifically the case rates, the hospitalization rates, and the death rates for each sex category (female, male, and all/everyone). Note that the rate is defined as the total count per 100,000 people. For example, the female case rate is defined as the total number of female COVID-19 cases in NYC per 100,000 females in NYC.

The charts indicate that all COVID-19 rates (case, hospitalization, and death) are higher in males than in females. Moreover, the male/female relative difference grows from the case rate to the hospitalization rate to the death rate.

4. Notes

4.1. Important Data Notes

The data presented here is sourced from the New York City Department of Health (NYC Health) and the New York State Department of Health (Health Data NY) – the links are presented below. Both data sources are usually updated on a daily basis.

Important data limitations:

4.2. Official Data and Information Sources

New York City Department of Health (NYC Health):

Office of the Mayor of New York City:

New York State Department of Health:


This webpage is part of the COVID-19 open-source GitHub project, created by Carlos Afonso, a Data Scientist in NYC.