COVID-19 Tracker: Days since N

UPDATE (5 Oct. 2021): I created this app so that I could quickly visualize and compare data for the countries that I was personally most interested in during the early days of the pandemic, before the subsequent explosion of dashboards and apps appeared online relating to all things COVID-19. I haven’t had time to work on this in over a year, and others have created far better versions, so I’ve decided to archive the project. For reference, the code for this app remains available on my Github.

There’s no shortage of dashboards and data-visualizations covering some aspect of the ongoing coronavirus pandemic, but not having come across a tool that allowed me to easily compare countries myself, I developed this COVID-19 Tracker shiny app both for my own personal use, as well as to finally get my hands dirty working with Shiny.

This app was inspired by the widely shared John Burn-Murdoch vizualizations for the Financial Times (FT) that did a nice job at allowing cross-country comparisons of the trajectories of the total confirmed cases by standardizing countries using the “Number of days since the 100th case” on the x-axis.

The Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE) maintains a dashboard whose data source serves as the underlying data for the FT vizualization, as well as many others floating around on the internet at the moment.

At the time of writing, the JHU GSSE dasboard does not allow for an easy way to select countries for direct comparison. The Shiny app presented here allows the user to select any of the country/region units available in the entire dataset, standardize them on the x-axis using “Days since N”, and automatically generate fairly clean level- and log- plots with dynamically rendered titles and axis labels. The data in the app is timestamped and updated automatically along with the JSU CSSE repo, and there are download buttons for the plots and filtered long-format data tables use for those plots in PNG and CSV formats, respectively.

Currently, a maximum of six countries can be compared at a time. The limit was set simply to allow for better readability of the resulting plots. Users can select between total confirmed cases, deaths, and total recovered as the different y-axis outcome variables.

The default N number for the total confirmed cases outcome is set to 100, in keeping with the most widely used convention at the moment. For deaths, N=10 can be used.

There are a few countries that include more detailed regional breakdowns of the data. Where this is the case, the totals for those countries are given by the country name + “(all territories)”.

Additional features and edits will be added on an ongoing basis.

Code for the app available on Github.

*PREVIOUS UPDATES –
(Oct.20): Spanish national data removed.
(Apr.19): Daily totals tab added.
(Apr.8): Reference line options added, source info updated.
(Apr.1): Spanish and Swiss national data added.
(Mar.30): National/State filtering options added for JHU countries with provice level data. US data added from NYT github repo.
(Mar.28): Option for population adjusted figures added, based on World Bank data. Country input list cleaned up.
(Mar.24): I’m in the process of updating the app to account for the upcoming changes to the data reporting announced by JHU CSSE. The “recovered cases” time series has been removed as it will no longer be updated. U.S. state- and county-level data has been removed from the global time series information presented here and will appear in its own menu.

Impulse-reponse plots with `vars` and `ggplot2` Harmonizing Swiss commune data
comments powered by Disqus