Shiny application showing contact tracing locations of interest for COVID-19

Kevin Chang
2 min readAug 31, 2021
Screenshot of the shiny app at https://kcha193.shinyapps.io/covid_locations/

The delta strain of the COVID-19 virus has caused New Zealand to be on lockdown since the 17th of August 2021. Since then, the Ministry of Health has published a series of locations of interest for people who may have been in contact with COVID-19 cases in the community. There are currently about 400 locations and counting. For more detail, please refer to the following website: https://www.health.govt.nz/our-work/diseases-and-conditions/covid-19-novel-coronavirus/covid-19-health-advice-public/contact-tracing-covid-19/covid-19-contact-tracing-locations-interest.

Personally, I have found that there are too many records to digest at a single glance, and one is likely to miss important information from the table of the website provided by the Ministry of Health. Thus, I have decided to make a dashboard using the flexdashboard R package (https://pkgs.rstudio.com/flexdashboard/articles/flexdashboard.html) coupled with the shiny R package (https://shiny.rstudio.com/) allowing users to interactively filter down the relevant information of interest, such as

  • the date new locations were added,
  • the city of location (although it is mostly Auckland), and
  • the starting dates of the relevant times of these locations.

Thus, the users can quickly and easily drill down to view information relevant to them.

Once the user has made a selection, the dashboard will show the relevant records both on the map and table in the main body of this dashboard. Given that the Ministry of Health dataset contains the longitude and latitude of each location, we can then map these locations using the leaflet R package (https://rstudio.github.io/leaflet/). The table of records is generated by the DT R package (https://rstudio.github.io/DT/).

This application is currently live and can be found on the following website, https://kcha193.shinyapps.io/covid_locations/.

The source code can be found in my GitHub repo: https://github.com/kcha193/covid_locations.

--

--

Kevin Chang

Expert Data and Model Analyst with strong analytic, research and consulting skills.