9/23/2020

Introduction

I have developed a Shiny app to visualize the evolution of COVID-19 in Mexico, the country I am from, over time.

Upon accessing the app, the daily number of new cases from January 1st, 2020 to present are displayed in a barplot. The user can choose between three types of plots: points, lines and bars. The app also gives the user control over the time range displayed in the plot.

Additional curves can be added to the plot to show the daily number of deaths and/or the total number of cases.

The Shiny app can be accessed by clicking here. Alternatively you can click here to access the code files in Github.

Dataset

The app uses a dataset from the Our World in Data webpage, and can be accessed here. The file contains 41 columns for multiple countries. The date set has been filtered to keep only the following columns for all rows where the location column is Mexico:

[1] "location"    "date_case"   "total_cases" "new_cases"   "new_deaths" 

Below we can see the last five rows of the data set:

      location  date_case total_cases new_cases new_deaths
27100   Mexico 2020-09-18      684113      3182        201
27101   Mexico 2020-09-19      688954      4841        624
27102   Mexico 2020-09-20      694121      5167        455
27103   Mexico 2020-09-21      697663      3542        235
27104   Mexico 2020-09-22      700580      2917        204
27105   Mexico 2020-09-23      705263      4683        651

How to use the app

You can easily customize the plot as follows:

  • Choose the date range of interest
  • Select the plot type for the daily new cases
  • Add the daily deaths and/or the cumulative number of cases, if you wish to

Example

Below you can see an example of the generated plot: