key: cord-274532-i1g9ikdb authors: Tobias, Aurelio; Valls, Joan; Satorra, Pau; Tebe, Cristian title: COVID19-Tracker: A shiny app to produce comprehensive data visualization for SARS-CoV-2 epidemic in Spain date: 2020-04-06 journal: nan DOI: 10.1101/2020.04.01.20049684 sha: doc_id: 274532 cord_uid: i1g9ikdb Data visualization is an essential tool for exploring and communicating findings in medical research, and especially in epidemiological surveillance. The COVID19-Tracker web application systematically produces daily updated data visualization and analysis of the SARS-CoV-2 epidemic in Spain. It collects automatically daily data on COVID-19 diagnosed cases, intensive care unit admissions, and mortality, from February 24th, 2020 onwards. Two applications have already been developed; 1) to analyze data trends and estimating short-term projections; 2) to estimate the case fatality rate, and; 3) To assess the effect of the lockdown measures on the trends of incident data. The application may help for a better understanding of the SARS-CoV-2 epidemic data in Spain. The first confirmed cases of SARS-CoV-2 in Spain were identified in late February 2020 (1) . Since then, Spain became, by the end of March, the third most affected country worldwide after the United States and Italy and recorded the second number of deaths due to the SARS-CoV-2 pandemic after Italy (2) . Since March 16 th , lockdown measures oriented on flattening the epidemic curve were in place in Spain, restricting social contact, reducing public transport, and closing businesses, except for those essential to the country's supply chains (3) . However, this has not been enough to change the rising trend of the epidemic. For this reason, a more restrictive lockdown was suggested (4), and eventually undertaken by the Spanish Government on March 30 th (5) . Data visualization is an important tool for exploring and communicating findings in medical research, and specially in epidemiological surveillance. It can help researchers and policy makers to identify and understand trends that could be overlooked if the data were reviewed in tabular form. We have developed a Shiny app allows users to evaluate daily time-series data from a statistical standpoint. The COVID19-Tracker app systematically produces daily updated data visualization and analysis of SARS-CoV-2 epidemic data in Spain. It is easy to use and fills a role in the tool space for visualization, analysis and exploration of epidemiological data during this particular scenario. The COVID19-Track app has been developed in RStudio using the Shiny package (6) . Shiny offers the ability to develop a graphical user interface (GUI) that can be run locally or deployed online. Last is particularly beneficial to show and communicate updated findings to a broad audience. The app has a friendly structure based on menus to shown data visualization for each of the analyses currently implemetned: projections, intervention, and methodology sections ( Figure 1 ). . 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 peer-reviewed) The copyright holder for this preprint . https://doi.org/10.1101/2020.04.01.20049684 doi: medRxiv preprint 3 -Projections displays a plot with trends for daily ICU admissions and mortality since the epidemic began and estimates a 3-day projection. -Intervention displayes and calculates the effect of the lockdown period on the trend of incident data on daily diagnosed cases, ICU admissions, and mortality. -Methodology shows the statistical details on the analyses implemented. The app has an automated process to update data and all analyses every time a user connects to the app. It is available online at the following link: https://ubidi.shinyapps.io/covid19/ and shortly free available on GitHub as an R package. We collected daily data on COVID-19 diagnosed cases, intensive care unit (ICU) admissions, and mortality, from February 24th onwards. Data is collected automatically every day daily from Datadista github repository (7). This repository updates data according to the calendar and rate of publication of the Spanish Ministry of Health/Instituto de Salud Carlos III (8) . Data corresponding to the available number of ICU beds in Spain (year 2017) are also obtained from the Datadista github repository (7). . 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 . https://doi.org/10.1101/2020.04.01.20049684 doi: medRxiv preprint For the evaluation of the observed trends of the accumulated number of cases, we used a classical quasi-Poisson regression model (9), allowing for over-dispersion and with a logarithmic link function, evaluating the existence of a quadratic effect. The two models are described as follows: Model 2: log(E(ct))=β0+β1t+β2t 2 where t = 1, 2, …, T represents the time unit (from the first observed day until the last, T consecutive days in total), and it assumes that ct, the observed cases, are distributed following a quasi-Poisson probability law. Estimated parameters and their standard error are used to obtain the predictions in the observed period of time but also the short-term projections, computing 95% confidence interval (95%CI)or the expected number of cases. The analyses have been carried out using R version 3.6.3. This analysis is accessible on the Projections menu, displaying short-term projections up to 3 days for COVID19 diagnosed cases, ICUs, and mortality in a time-series plot ( Figure 2 ). Results are available nationwide by default, but also at the regional level, allowing a dropdown menu for this purpose. In addition, the produced graph is mouse-sensitive, showing the exact number of observed and predicted/projected cases for both models through the time-series. . 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 . https://doi.org/10.1101/2020.04.01.20049684 doi: medRxiv preprint To assess the effect of the lockdown on the trend of incident cases, admissions in ICU intensive care units, and mortality, we used an interrupted time-series design (10) . The data is analyzed with quasi-Poisson regression with an interaction model to estimate the change in trend: log(E(ct))=β0+β1t+β2lockdown+β3t * lockdown where t =1, 2, …, T represents the time unit (from the first observed day until the last, T consecutive days in total); and lockdown is a binary variable that identifies the periods before after the alarm status decree (0 = before Mar 15 th , 2020; 1 = after Mar 16 th , 2020). The analyses have been carried out using R, version 3.6.3. We should acknowledge that this is a descriptive analysis without predictive purposes. For an easy interpretation, and comparison of the effectiveness of lockdown measures between countries, a linear trend is assumed before and after the lockdown. The changes in the definition of diagnosed cases have not been taken into account, nor has the reduction in the susceptible population because of the lockdown. Therefore, the incident cases are modelled directly instead of the incidence rate, assuming that the entire population is at risk. Although not accounted for residual autocorrelation, the estimates are unbiased but possibly inefficient. This analysis is accessible on the Intervention menu, displaying trends in a time-series plot before and after the lockdown for COVID19 diagnosed cases, ICUs, and mortality ( Figure 3 ). The daily percentage (%) mean increase and its 95%CI are also reported. Results are available nationwide. . 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 peer-reviewed) The copyright holder for this preprint . https://doi.org/10.1101/2020.04.01.20049684 doi: medRxiv preprint So far, the COVID19-Tracker app has been very well received online, with a large number of connections generating an outsized memory usage on our server ( Figure 4 ). We are currently planning to improve the app by uploading shortly new applications for data visualization and analysis, which may help for a better understanding of the SARS-CoV-2 epidemic data in Spain. Moreover, the COVID19-Tracker app could also be extensible to data visualizations across other countries and geographical regions. . 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 peer-reviewed) The copyright holder for this preprint . https://doi.org/10.1101/2020.04.01.20049684 doi: medRxiv preprint None . 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 peer-reviewed) The copyright holder for this preprint . https://doi.org/10.1101/2020.04.01.20049684 doi: medRxiv preprint COVID-19 in Europe: the Italian lesson Oxford Martin School, The University of Oxford, Global Change Data Lab Real Decreto 463/2020, de 14 de marzo, por el que se declara el estado de alarma para la gestión de la situación de crisis sanitaria ocasionada por el COVID-19 Experts' request to the Spanish Government: move Spain towards complete lockdown. The Lancet Real Decreto-ley 10/2020, de 29 de marzo, por el que se regula un permiso retribuido recuperable para las personas trabajadoras por cuenta ajena que no presten servicios esenciales, con el fin de reducir la movilidad de la población en el contexto de la lucha contra el COVID-19 Integrated Development for R. RStudio, Inc limpieza y normalización de las tablas de la situación diaria acumulada de la enfermedad por el coronavirus SARS-CoV-2 (COVID-19) en España en un formato accesible y reutilizable 2020 Situación de COVID-19 en España 2020 Comparison of different approaches to incidence prediction based on simple interpolation techniques Interrupted time series regression for the evaluation of public health interventions: a tutorial . 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 . https://doi.org/10.1101/2020.04.01.20049684 doi: medRxiv preprint