Uploaded February 2021 | Updated September 2026, 2 hours ago
This was optional and an experiment. The example shown is in R. The code was adapted from the book "Visualize This" by Nathan Yau. The data shows daily deaths in California and in San Francisco County since March 2020. I was trying to replicate a heat map chart shown on the NYT's website:
nytimes.com/interactive/2020/us/california-coronavirus-cases.html
The NYT's chart uses per capita data. In the graph, each day is a small rectangle colored with a shade equivalent to the corresponding value in each cell. In this case shades of orange. Several steps were needed to create this dataset, also cutting/pasting from a JSON file, and this time definitely doing the "subtraction" so that each cell contains exactly the number of cases or deaths for just that one day; not the cumulative total up that day.
This was optional and an experiment. The example shown is in R. The code was adapted from the book "Visualize This" by Nathan Yau. The data shows daily deaths in California and in San Francisco County since March 2020. I was trying to replicate a heat map chart shown on the NYT's website:
nytimes.com/interactive/2020/us/california-coronavirus-cases.html
The NYT's chart uses per capita data. In the graph, each day is a small rectangle colored with a shade equivalent to the corresponding value in each cell. In this case shades of orange. Several steps were needed to create this dataset, also cutting/pasting from a JSON file, and this time definitely doing the "subtraction" so that each cell contains exactly the number of cases or deaths for just that one day; not the cumulative total up that day.










