COVID-19 Tracker: Days since N

(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.

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 a vizualization produced by John Burn-Murdoch for the Financial Times (FT) that I thought did a very 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.

Otherwise, all feedback, comments and pull requests are welcome.

Impulse-reponse plots with `vars` and `ggplot2`
comments powered by Disqus