Coder Social home page Coder Social logo

lin-lab / covid19-viz Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 3.0 10.21 MB

Visualization of COVID-19 spread metrics.

Home Page: http://metrics.covid19-analysis.org/

License: GNU General Public License v3.0

R 97.05% Dockerfile 0.03% Shell 1.15% HTML 0.29% JavaScript 1.48%
covid19 covid19-graph rshinyapp rshiny visualization

covid19-viz's Introduction

COVID-19 Spread Mapper

RShiny visualization of time-varying COVID-19 spread metrics, such as the effective reproduction number (Rt), case rate, and death rate. Based on data from the Johns Hopkins University Center for Systems Science and Engineering (JHU-CSSE) Coronavirus Resource Center.

The calculation method of these metrics is described in our preprint.

Code to calculate Rt is located in our COVID19-Rt Github repo, and data preprocessing code is located in the COVID-data-cleaning repo.

How to Run the app

If you downloaded the app locally, have all the dependencies, and wish to run it, simply open the app.R file in RStudio and click the Run App button.

Download our Data

Please see the data files in the clean_data_pois folder for the cleaned data that was displayed on the website. These were calculated from our preprint.

The clean_data folder has Rt estimates that were generated using EpiEstim (Cori, A., et al., 2013). These files are not used anymore for our site but are provided for archival purposes.

Code Structure

Main Code

  • The code to download the data is in 01_download_rt.sh.
  • The code to clean the Rt data and merge it with the shapefiles is in 02_clean_data.R. This code generates some rds files that are stored in clean_data_pois.
  • The RShiny app code is in app.R.
  • Running the prep_data.sh bash file will run 01_download_rt.sh, 02_clean_data.R, and 03_upload_to_aws.sh. You only need to do this if you want to reproduce the data cleaning and merging steps. The third step will not work because you aren't authorized to upload to our AWS folder.

Auxiliary Code

  • 04_minify_js.sh contains a script to minimize our custom javascript code. Running this produces a minified javascript file, which speeds up loading time of the webpage.
  • assets: Miscellaneous images, html, and static markdown pages and includes in our site.
  • src: Folder containing auxiliary R code.
  • www: Folder containing javascript code.
  • raw_data: Folder where the downloaded data from 01_download_rt.sh goes.

Build Docker

This builds a Docker container that mimics how the site is deployed in practice.

docker build -t local-covid-rt

docker run -p 8080:8080 -e PORT=8080 local-covid-rt

Open web browser to http://localhost:8080.

Instructions for Deploying on Heroku with HMDC

The website is deployed via Heroku. See here for instructions on how to set it up and for more info.

covid19-viz's People

Contributors

sheilagaynor avatar shiandy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

covid19-viz's Issues

South Africa November 23: Possible error in R.

Hi everyone.
Congratulations on the project.

I want to report a possible problem on your data.
On their website, I can see a high value of R on South Africa.
Observing rt_table_exoirt.csv I see that on November 23 they calculated a very high value of R when in reality it seems that was not the case. That value ends up affecting the value of the last 7 days.

CSSE fix the wrong value, I think the changes not was reflected on your system.
CSSEGISandData/COVID-19#4956

Possibly you should evaluate how to detect days with differences to recalculate them.
CSSE has been making data adjustments from time to time, data reported by countries that did not report at the time or corrected errors in the data.

Zipped Rt table

Hi,

Thanks for making this set available, I have however had trouble accessing the csv within the zipped file - wondering if a version of the csv can be uploaded raw outside the zip? This would be very helpful for data access

Thanks,

Akash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.