Tebé et al. BMC Medical Research Methodology (2020) 20:235 https://doi.org/10.1186/s12874-020-01121-9 SOFTWARE Open Access COVID19-world: a shiny application to perform comprehensive country-specific data visualization for SARS-CoV-2 epidemic Cristian Tebé1* , Joan Valls2, Pau Satorra1 and Aurelio Tobías3 Abstract Background: Data analysis and visualization is an essential tool for exploring and communicating findings in medical research, especially in epidemiological surveillance. Results: Data on COVID-19 diagnosed cases and mortality, from January 1st, 2020, onwards is collected automatically from the European Centre for Disease Prevention and Control (ECDC). We have developed a Shiny application for data visualization and analysis of several indicators to follow the SARS-CoV-2 epidemic using ECDC data. A country-specific tool for basic epidemiological surveillance, in an interactive and user-friendly manner. The available analyses cover time trends and projections, attack rate, population fatality rate, case fatality rate, and basic reproduction number. Conclusions: The COVID19-World online web application systematically produces daily updated country-specific data visualization and analysis of the SARS-CoV-2 epidemic worldwide. The application may help for a better understanding of the SARS-CoV-2 epidemic worldwide. Keywords: SARS-CoV-2, COVID-19, Epidemic, Data visualization, Poisson regression, Mortality, Mortality rate, Case fatality rate, Basic reproduction number Background researchers and policymakers to identify trends that could The first confirmed case of SARS-CoV-2 in China was be overlooked if the data were reviewed in tabular form. reported to the WHO country office in China on Here, we present the worldwide extension of a previous December 31st, 2019 [1]. The outbreak was declared a Shiny application for data visualization and analysis of sev- public health emergency of international concern on eral indicators to follow the SARS-CoV-2 epidemic in Spain January 30th, 2020 [1]. Since then, up to June 17th, more [4]. With this extension, conceived as an independent tool, than 210 countries have been affected worldwide, 8,162, specific visualizations for any country worldwide can be 276 people have been diagnosed, 443,685 have died due produced to assess the time evolution of the pandemic, be- to the SARS-CoV-2 pandemic [2] and numbers are still yond the usual dashboards showing geographic variations growing. [5]. Data is directly downloaded from the European Centre Data analysis and visualization is an essential tool for for Disease Prevention and Control (ECDC) each time that exploring and communicating findings in medical research, a user interacts with the application. Therefore, we have especially in epidemiological surveillance [3]. It can help now developed the COVID19-World application, which systematically produces country-specific data visualization * Correspondence: ctebe@idibell.cat and analysis of trends and short-term projections for 1 Biostatistics Unit, Institut d’Investigació Biomèdica de Bellvitge (IDIBELL), diagnosed cases and deaths (both for cumulative and Hospitalet de Llobregat, 199 08908 L’Hospitalet de Llobregat, Barcelona, Spain incident data), case fatality rate, infection time, and basic Full list of author information is available at the end of the article reproduction number. © The Author(s). 2020 Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data. Tebé et al. BMC Medical Research Methodology (2020) 20:235 Page 2 of 7 Implementation public data on COVID-19 worldwide. Countries with a Software population under 500,000 inhabitants are not included. The COVID19-World application has been developed in The application is user friendly, based on intuitive RStudio [6], version 1.2.5033, using the Shiny package, menus to show data visualization for each of the ana- version 1.4.0. Shiny offers the ability to develop a graphical lyses implemented, once a specific country has been user interface (GUI) that can be run locally or deployed chosen from the top dialog box (Fig. 1). online. Last is particularly beneficial to show and commu- nicate updated findings to a broad audience. All the ana- lyses have been carried out using R [7], version 3.6.3. The Trends and projections key R packages used in the tool implementation include Trends for the number of diagnosed cases and deaths dplyr, xlsx, and vroom for data management, sjPlot, and are estimated using Poisson regression models [8], EpiEstim for data analysis, shinydashboard, shinyFeedback, allowing for over-dispersion [9]. A time-dependent poly- shinycssloaders, and kableExtra for application enhance- nomial function is used to estimate the expected number ment and plotly for the graphical displays. The application of cases. As the epidemic evolved the degree of the is freely available online at [https://ubidi.shinyapps.io/ polynomial function was increased. The current covid19world], being the source code available under re- model allows for a fourth-degree polynomial function, quest through Github at [https://github.com/ubidi/covid1 as follows: 9world]. Menus, tabs, and outputs are available in English, Spanish, and Catalan. logðEðct ÞÞ ¼ β0 þ β1 t þ β2 t2 þ β3 t3 þ β4 t4 The European Centre for Disease Prevention and Con- trol (ECDC) data file offers a downloadable file updated daily with the latest available public data on COVID-19 where t = 1, 2, …, T, represents the time unit (from the per day and country. Data is collected based on reports first observed day until the last, T consecutive days in from health authorities worldwide by the ECDC’s Epi- total), and ct is the number of events. The estimated re- demic Intelligence team. The application has an auto- gression parameters and their standard errors are used mated process to update data and all analyses each time to obtain the short-term projections, up to 3 days, and a user connects to the app. Data on COVID-19 diag- their 95% CI. nosed cases and mortality, from January 1st, 2020, on- Nevertheless, these models are being regularly evalu- wards is collected at [https://www.ecdc.europa.eu/en/ ated by checking the overdispersion parameter, the sum publications-data/download-todays-data-geographic-dis- of Pearson residuals, and the deviance, in case a model tribution-covid-19-cases-worldwide]. The downloadable reformulation with a better fit is necessary during the dataset is updated daily and contains the latest available epidemic. Fig. 1 Home page of the COVID19-World application, for comprehensive country-specific data visualization for the SARS-CoV-2 epidemic. Available at [https://ubidi.shinyapps.io/covid19world/] Tebé et al. BMC Medical Research Methodology (2020) 20:235 Page 3 of 7 Case fatality rate Basic reproduction number The case fatality rate is defined as the ratio between the The basic reproduction number (R0) is the average num- number of deaths and the number of diagnosed cases ber of secondary cases of disease caused by a single in- [10]. Thus, an offset is fitted into the Poisson regression fected individual over his or her infectious period [13]. model, also allowing for overdispersion, as the logarithm This statistic, which is time and situation-specific, is of the diagnosed cases: commonly used to characterize pathogen transmissibility during an epidemic. The monitoring of R0 over time logðEðmt ÞÞ ¼ β0 þ β1 t þ β2 t2 þ β3 t3 þ β4 t4 provides feedback on the effectiveness of interventions þ logðct Þ and on the need to intensify control efforts. The goal of control efforts is to reduce the R0 below the threshold value of 1 and as close to 0 as possible to control the where mt is the daily number of deaths, and ct is the epidemic. Here, we used the R package EpiEstim to daily number of diagnosed cases. Case fatality rates are estimate the basic reproduction number through the also calculated for the same age groups. Wallinga and Teunis method [13], which assumes a We should acknowledge that it is not possible to make gamma distribution for the serial interval. The serial an accurate estimate of the case fatality rates due to the interval is the time between the onset of symptoms in a underreporting of cases diagnosed in official statistics primary case and the onset of symptoms of secondary [11]. Nonetheless, the estimation and monitoring of the cases, which is needed to estimate R0 throughout the case fatality rates monitoring are of especial interest in epidemic. The mean and standard deviation of the serial the current epidemic scenario. interval distribution can vary depending on the disease [13]. Recently, Nishiura et al. [14] estimated a mean and Infection time standard deviation for the COVID-19 serial interval dis- Infection time, estimating the incubation period for tribution of 4.7 and 2.9 days, respectively, being these COVID-19 between the interval of exposure to SARS- the values we are using in our analysis for the gamma a CoV-2 and the date of diagnosis is computed following priori distribution. the approach of Lauer et al. [12], who have recently ana- The goodness of fit of estimated models is evaluated lyzed the incubation period for COVID-19 in a cohort of to provide a better fit of the data during the epidemic. A symptomatic patients. For each patient, they collected deviance analysis is performed to compare the model’s the interval of exposure to SARS-CoV-2 and the date of fit. Moreover, to quantify the model error Poisson over- appearance of symptoms. They assumed that the incuba- dispersion parameter, the sum of Pearson’s residuals and tion time would follow, as in other viral respiratory tract deviances are shown. infections, a Lognormal distribution.   Lognormal mu; sigma2 ¼ Lognormalð1:621; 0:418Þ Results Up to June 17th, an exponential increase in the global We have replicated this distribution in the group of di- number of COVID-19 cases was observed (Fig. 2a and agnosed cases to approximate the date of exposure to b). The shape of the curve on daily incident cases and SARS-CoV-2 recursively: mortality curves in most countries shows a propagated epidemic pattern (for example the United Kingdom and X 14 the United States in Fig. 3a and b). In a propagated out- qðiÞ ¼ P ð jÞ  c jþi break, there is no common source and the outbreak j¼1 spreads from person to person. The classic propagated curve has a series of progressively taller peaks, each an where p is the number of diagnosed cases on a day i; q incubation period apart, which may lead to multiple is the number of infected cases on day i-j; j = 1, 2, …, 14 waves of infection if secondary cases occur. However, in is the maximum time it is expected that the disease can the case of SARS-Cov-2, waves of cases seem to overlap develop; and P(j) is the probability of presenting symp- due to high viral transmission and the curve is more toms on day j according to a Lognormal probability distri- bell-shaped with a large cue. In most countries, the suc- bution with the parameters defined by Lauer et al. [12] cessive waves involve more and more people, until lock- To estimate the last 14 days, since the information on down or social distancing measures were implemented. the diagnosed cases was not available for the forthcom- In the counterpart, the case fatality rate ranges from ing days, a fourth-degree polynomial model was used to 2% of South Korea to 15% of Italy and globally is 5.5% project diagnosed cases. These latest estimates are dis- (Fig. 4a, b, and c respectively). This variation on the case played in the application with a different color. fatality rate, in our opinion, could be explained by Tebé et al. BMC Medical Research Methodology (2020) 20:235 Page 4 of 7 Fig. 2 Standard output display of the COVID19-World application (results updated to June 17th, 2020) trend analysis and its 3-day projection at the global scale of cumulate incident cases (a); daily incident cases (b); and basic reproduction number (c) variability in the testing effort of each country to identify uncertain data [15]. We choose to use a classical ap- cases. proach fitting Poisson regression models, commonly The estimated infection time has been globally re- used in epidemiological research [8, 16], which not only duced over the epidemic period (Fig. 2c), and the global is parsimonious but also showed reasonable goodness of basic reproductive number is currently around 1, except fit. To go beyond epidemiological information, we add in those countries who are experimenting with a second some tabs with relevant statistical information about esti- wave. mated models. The target audience of this web application is wide. It includes scientists, researchers, policymakers, Discussion journalists, and the general public with a special concern The application allows the use of epidemiological indica- on the SARS-CoV-2 epidemic. Since publication to date, tors to a better understanding of the evolution of the our application had received more than 6 thousand visits COVID-19 epidemic in 167 countries affected. However, from all around the world, but mainly from Europe and we should note that it has been developed mainly for de- the United States. scriptive purposes. Therefore, we avoided using complex Tracking the SARS-CoV-2 epidemic spread has become mathematical models to predict an uncertain future with a topic of great interest. There are several apps, Tebé et al. BMC Medical Research Methodology (2020) 20:235 Page 5 of 7 Fig. 3 Propagated epidemic patron in the United Kingdom (a) and the United States (b) dashboards, and maps on the internet showing local, na- We should acknowledge that the application does not tional, and international figures. Among the most popular take into account the changes in the definition of a case the Johns Hopkins University web offers a worldwide view diagnosed by COVID-19, nor the population exposed. on a map with the cumulate number of confirmed cases, So, the number of events is modeled directly instead of deaths, and recovered worldwide and by country and the incidence rate, assuming that the entire population state/region, but not in all countries. The World Health is at risk, except for the case fatality rate. Moreover, the Organization has its dashboard showing more or less the analyses are not free from the biases linked to the source same information on confirmed cases and deaths by coun- of information provided by the ECDC. For example, in try. Other applications focus its figures on predictions. Is several countries, it can take some weeks until death cer- the case of the web developed by the Institute for Health tificates are available in databases. Hence, estimates Metrics and Evaluation (IHME) of the University of might not be accurate due to the underreporting of diag- Washington. On its web, you can see current data and nosed cases and mortality in official statistics. projections on cumulate and daily cases and deaths in the United States and the European Economic Area. More- over, they used a mixed-effects non-linear regression Conclusions framework to estimate the trajectory of the cumulative The COVID19-World is a web-based application that and daily death rate as a function of the implementation comes to fill a gap, presenting a set of useful tools for of social distancing measures. updated country-specific analysis and visualization of The choice of reliable data sources is complex and not epidemiological indicators of the COVID-19 epidemic absent from controversy [17, 18]. Our main data source worldwide. The web application facilitates a better un- is provided daily by the ECDC (19) and we mainly chose derstanding of the evolution of the epidemic in each epidemiological indicators based on those which could country and might be useful for country-specific epi- be derived from diagnosed cases and daily deaths. demiological surveillance. Tebé et al. BMC Medical Research Methodology (2020) 20:235 Page 6 of 7 Fig. 4 A variation on the case fatality rate South Korea (a), Italy (b), and globally (c) Availability and requirements Abbreviations Project name: COVID-19 WORLD. COVID-19: Coronavirus disease 2019; GLP: General public license; GNU: GNU’s not unix!; GUI: Graphical user interface; SARS-CoV-2: Severe acute respiratory Project home page: https://ubidi.shinyapps.io/covid1 syndrome coronavirus 2 9world/ Operating system: Platform independent. Acknowledgments Programming language: R. We thank Institut d’Investigació Biomèdica de Bellvitge (IDIBELL) and CERCA Program/Generalitat de Catalunya for institutional support. Other requirements: Any web browser, or RStudio with libraries shiny, dplyr, xlsx, vroom, sjPlot, EpiEstim, Authors’ contributions shinydashboard, shinyFeedback, shinycssloaders, and All authors contributed critically to the development of the tool. JV, AT, and kableExtra. CT planned all statistical analysis. PS and CT programmed the tool. AT, CT License: published under the GNU General Public drafted the manuscript and all other authors critically reviewed the manuscript. The authors have approved this final version of the manuscript. License Version 2. Any restrictions to use by non-academics: Commercial Funding organizations are welcome to contact the author prior to Funding for the publication of this work came from Institut d’Investigació use. Biomèdica de Bellvitge (IDIBELL). Tebé et al. BMC Medical Research Methodology (2020) 20:235 Page 7 of 7 Availability of data and materials 16. Kuhn L, Davidson LL, Durkin MS. Use of Poisson regression and time series Data is available at ECDC “Download today’s data on the geographic analysis for detecting changes over time in rates of child injury following a distribution of COVID-19 cases worldwide” https://www.ecdc.europa.eu/en/ prevention program. Am J Epidemiol. 1994;140(10):943–55. publications-data/download-todays-data-geographic-distribution-covid-19- 17. Pearce N, Vandenbroucke JP, VanderWeele TJ, Greenland S. Accurate cases-worldwide. Source code is available under request through Github at statistics on COVID-19 are essential for policy guidance and decisions. Am J [https://github.com/ubidi/covid19world]. Public Health. 2020;110(7):949–51. https://doi.org/10.2105/AJPH.2020.305708. Epub 2020 Apr 23. Ethics approval and consent to participate 18. Wolkewitz M, Puljak L. Methodological challenges of analysing COVID-19 Not applicable. data during the pandemic. BMC Med Res Methodol. 2020;20(1):81. Consent for publication Publisher’s Note Not applicable. Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Competing interests The authors declare that they have no competing interests. Author details 1 Biostatistics Unit, Institut d’Investigació Biomèdica de Bellvitge (IDIBELL), Hospitalet de Llobregat, 199 08908 L’Hospitalet de Llobregat, Barcelona, Spain. 2Department of Mathematics, Universitat Autònoma de Barcelona (UAB), Bellaterra, Barcelona, Spain. 3Institute of Environmental Assessment and Water Research (IDEA), Spanish Council for Scientific Research (CSIC), Barcelona, Spain. Received: 18 May 2020 Accepted: 14 September 2020 References 1. Organization WH. Rolling updates on coronavirus disease (COVID-19). Updated 13 May 2020 Geneva (updated May 13th, 2020). [https://www. who.int/emergencies/diseases/novel-coronavirus-2019/events-as-they- happen]. Accessed May 2020. 2. Roser M, Ritchie H, Ortiz-Ospina E. Hasell J. Coronavirus Pandemic (COVID- 19); 2020. Published online at OurWorldInData.org. Retrieved from: https:// ourworldindata.org/coronavirus. [Online Resource]. 3. Carroll LN, Au AP, Detwiler LT, Fu TC, Painter IS, Abernethy NF. Visualization and analytics tools for infectious disease epidemiology: a systematic review. J Biomed Inform. 2014;51:287–98. 4. Valls J, Tobias A, Satorra P, Tebe C. COVID19-tracker: a shiny app to analise data on SARS-CoV-2 epidemic in Spain. Gac Sanit. 2020;S0213-9111(20): 30085–6. https://doi.org/10.1016/j.gaceta.2020.04.002. 5. Dong E, Du H, Gardner L. An interactive web-based dashboard to track COVID-19 in real time. Lancet Infect Dis. 2020;20(5):533–4. 6. Team R. RStudio: integrated development for R. Boston, MA: RStudio, Inc; 2015. 7. Team RC. R: a language and environment for statistical computing. Vienna, Austria: R Foundation for Statistical Computing; 2020. 8. Dyba T, Hakulinen T. Comparison of different approaches to incidence prediction based on simple interpolation techniques. Stat Med. 2000;19(13): 1741–52. 9. Payne EH, Hardin JW, Egede LE, Ramakrishnan V, Selassie A, Gebregziabher M. Approaches for dealing with various sources of overdispersion in modeling count data: scale adjustment versus modeling. Stat Methods Med Res. 2017;26(4):1802–23. 10. Rothman K, Greenland S. Modern epidemiology. Philadelphia, PA: Lippincott-Raven Publishers; 1998. 11. Battegay M, Kuehl R, Tschudin-Sutter S, Hirsch HH, Widmer AF, Neher RA. 2019-novel coronavirus (2019-nCoV): estimating the case fatality rate - a word of caution. Swiss Med Wkly. 2020;150:w20203. 12. Lauer SA, Grantz KH, Bi Q, Jones FK, Zheng Q, Meredith HR, et al. The incubation period of coronavirus disease 2019 (COVID-19) from publicly reported confirmed cases: estimation and application. Ann Intern Med. 2020;172(9):577–82. 13. Cori A, Ferguson NM, Fraser C, Cauchemez S. A new framework and software to estimate time-varying reproduction numbers during epidemics. Am J Epidemiol. 2013;178(9):1505–12. 14. Nishiura H, Linton NM, Akhmetzhanov AR. Serial interval of novel coronavirus (COVID-19) infections. Int J Infect Dis. 2020;93:284–6. 15. Barton CM, Alberti M, Ames D, Atkinson JA, Bales J, Burke E, et al. Call for transparency of COVID-19 models. Science. 2020;368(6490):482–3.