Replicating a New York Times Table of Swedish COVID-19 deaths with gt - Table Contest Submission

Replicating a New York Times Table of Swedish COVID-19 deaths with gt

Authors: Malcolm Barrett
Affiliations: Livongo Health

Abstract: In this blog post, I describe how to replicate a table from the New York Times (NYT) in gt. The inspiration for this post comes from an NYT article on Sweden's herd immunity strategy for COVID-19 and the resulting excess mortality. In the NYT article, the authors present a table of excess deaths for Sweden and other countries in Europe. I thought this table was remarkably good: it’s simple, clear, and beautiful. The tutorial shows how you can make the same sort of table in gt.

Full Description:

Table Type: static-HTML
Submission Type: Tutorial
RStudio Cloud:
DT package used:
gt package used: true
reactable package used:
flextable package used:
huxtable package used:
kableExtra package used:
Other packages:


This is nicely done!

Random question: do you happen to know what data visualizations tools/technologies are used by NYT? I have read in various places that R is one of tools that they use. Their tables and charts all have a very unique NYT feel, so clearly they are not applying anything "off-the-shelf"...guessing lots of customizations.

From the article, their choropleth map at the beginning and the line-with-circles near the end are very effective bits of data viz as well.

Many visualizations you see from the NYT are developed with D3.js created by Mike Bostock. There is also an R wrapper for the library:

D3.js is not easy to learn though.