








key: cord-282620-nv2tg68j
authors: Hinz, S.; Basam, M. M.; Aguilera, K. Y.; LaBarge, M.
title: Internet-based tool for visualizing county and state level COVID-19 trends in the United States.
date: 2020-05-18
journal: nan
DOI: 10.1101/2020.05.11.20095851
sha: 
doc_id: 282620
cord_uid: nv2tg68j

The novel COVID-19 outbreak started in 2019 in Wuhan China and quickly spread to at least 185 countries. We developed an interactive web application that allows users to visualize the spread of COVID-19 in the Unites States at state and county levels. This tool allows visualization of how the virus spreads over time and how state-wide efforts to reduce transmissions have affected the curve in local areas. The downloadable application data allows users to conduct additional analyses. We demonstrate exemplars of trend analyses comparing the daily infection and death rates before and after safer at home orders were implemented per state. The goal was to develop a COVID-19 tracking tool that informs users about the spread of the virus to enable them to make informed decisions after better understanding the presented data.

In Wuhan (Hubai, China) a cluster of pneumonia infections occurred in December of 2019. In January 2020 a novel coronavirus SARS-CoV-2 was identified as the cause in patient samples from Wuhan (Zhu et al., 2020) . This outbreak has since spread to at least 185 countries and infected over 3 million people (as of May 1, 2020). Response to the pandemic in the United States is coordinated mainly at the state government level. In order to track and visualize the spread of coronavirus disease and evaluate trends in response to state government interventions in the United States, we developed an automatically updating Shiny application. This application enables users to view trends in numbers of verified COVID-19 infections and deaths as reported by county health departments across the United States.

The county-level and state-level data for COVID-19 infections and deaths is obtained from The New York Times (NYT) ongoing GitHub repository (https://github.com/nytimes/covid-19-data). Their data are compiled from state and local government and health department reports and is updated daily around 17:00 PST. State government non-pharmaceutical intervention data were provided through Killeen et al. (2020) . County government non-pharmaceutical intervention data were provided by The . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 /2020 well as a daily counter of both. Lastly, we display the date when the NYT data have been last updated.

Below the map, we display multiple table and plot options for the user to view on a country, state, or county specific level to help with data interpretation. Upon opening the app, country-wide plots show the overall impact of COVID-19 on the U.S. (Figure 2 ). Upon interaction with the map, the plots are updated automatically to show state or county specific data. Additionally, we allow for users to filter the data based on previous dates, as well as normalize the number of confirmed infections or deaths by a state or county's population (per 100K residents). We display two tables that show the top 10 counties in terms of their number of confirmed infections and deaths ( In the Trends subpanel a rolling slope plot is displayed that allows for illustration of the "flattening of the curve", or the slope changes of the log transformed cumulative death and infection numbers ( Figure 2J -L). A moving 7-day window was applied to extract the slope of the linear regression as a function of 1-week intervals. These windows were calculated for every 7-day period and the "rolling slope" values were plotted against the date. Higher slopes are indicative of a surge in the number of confirmed infections or deaths whereas a slope of 0 indicates stagnant confirmed case or death numbers.

. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10. 1101 /2020 Additionally, we provide our users the ability to download the data, which includes the NYT COVID-19 data, as well as population statistics on each county or state ( Figure   1 ). Users can view a quick tutorial on how to use the app by clicking on the question mark and the "More Information" tab allows them to read an in-depth explanation about the app, data, and functions used.

The program was written in R (R. Core Team, 2019) using R Studio, Shiny (Chang et al., 2020) , shinydashboard (Chang and Ribeiro, 2018) , leaflet (Cheng et al., 2019) , tidyr , ggplot (Wickham, 2016) , dplyr , zoo (Zeileis and Grothendieck, 2005) , data.table (Dowle and Srinivasan, 2019) , readr (Wickham et al., 2018) , rgdal (Bivand et al., 2019) , rintrojs (Ganz, 2016) , janitor (Firke, 2020) , and stringr (Wickham, 2019) packages. It is hosted through the authors' private account in shinyapps.io.

As a means to reduce the spread of COVID-19, national guidelines were set at both the county and state level. The implementation of safer at home orders, per state, infections of all 50 states, calculated as the difference in the slope from before and after the safer at home orders were implemented, show a decrease in newly confirmed . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 /2020 infections ( Figure 5) . These data transformations are not presently incorporated in the app, but highlight the applicability of the underlying downloadable data.

The tool reports confirmed COVID-19 infections and deaths at the state and county level and is automatically updated daily. The interactive map of the US allows users to visualize the distribution of confirmed COVID-19 infections (Figure 1 ) with plots for summary statistics, data transformations, and trends for the US. Additionally, we implemented data visualization at the state and county level ( Figure 1B) . Upon user interaction with the map, the graphs update to reflect the data in the selected state or county (Figure 2 A-D), including annotations for statewide stay at home orders, for each state. An emphasis was placed on scientific representation of the case numbers, therefore, population doublings (PDs) were calculated on both the log and normal scale ( Figure 2C ). To highlight and track COVID-19 flattening, a rolling slope was calculated ( Figure 2D) , showing the slope of the cumulative case regression over all 1-week intervals. Reductions of the rolling slope indicate a flattening of the curve, whereas increases of the slope indicate an acceleration in reported case number. Notably for Los Angeles County a 2-week delay in rolling slope reduction is observed between infections and deaths following issuance of the California Safer at Home order.

This tool can be used to visualize how COVID-19 has spread throughout communities and how state-wide efforts to reduce transmission have affected the curve.

Our rolling slope function is an easily digestible method of evaluating changes in direction and rate of confirmed COVID-19 infections and deaths over time. Our goal is to inform people about the spread of this disease and allow them to make more informed decisions after understanding the data. Moreover, the downable nature of the data in our application can facilitate further assessments of trends over time. Assuming that COVID-19 surveillance will continue in earnest throughout the Fall and Winter of 2020, and into the Spring of 2021, we speculate that visualizations such as the rolling slope may help identify resurgence of infections within counties and states . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 /2020 

The tool can be accessed online (http://usacovid19tracker.com) and the underlying data for county and state level can be directly downloaded through the application.

. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 /2020 Slope of the linear regression of the log10 transformed confirmed daily infections before (black) and after (blue) safer at home measures. For states without a safe at home order (dashed line) March 27, 2020 (national average of all state implementation dates) was used as the surrogate date.

. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)

The copyright holder for this preprint this version posted May 18, 2020. . https://doi.org/10.1101/2020.05.11.20095851 doi: medRxiv preprint . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)

The copyright holder for this preprint this version posted May 18, 2020 . . https://doi.org/10.1101 /2020 

rgdal: Bindings for the 'Geospatial' Data Abstraction Library)

shiny: Web Application Framework for R)

shinydashboard: Create Dashboards with 'Shiny')

leaflet: Create Interactive Web Maps with the JavaScript 'Leaflet' Library)

janitor: Simple Tools for Examining and Cleaning Dirty Data)

rintrojs: A Wrapper for the Intro.js

A County-level Dataset for Informing the United States

R: A Language and Environment for Statistical Computing

ggplot2: Elegant Graphics for Data Analysis

stringr: Simple, Consistent Wrappers for Common String Operations)

dplyr: A Grammar of Data Manipulation)

tidyr: Tidy Messy Data)

readr: Read Rectangular Text Data)

zoo: S3 Infrastructure for Regular and Irregular Time Series

A Novel Coronavirus from Patients with Pneumonia in China



