eleakin / coronavirus

Coronavirus Tracking dashboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lifecycle: experimental

Dashboard to track the spread of the coronavirus, based on the data from John Hopkins' dashboard, built with shinyMobile and echarts4r.

Dashboard

Get it

You can view the dashboard online or download the package to run it locally or deploy it.

install.packages("remotes")
remotes::install_github("JohnCoene/coronavirus")

Dev

You can test the app before preparing any kind of deployment you can test like so.

library(coronavirus)

virus <- crawl_coronavirus()
run_app(virus)

Production

Create the config file required to run the crawler. ⚠️ you should only have to do this once.

library(coronavirus)

# create and fill config file
create_config()

Fill in the config file created with the credentials to your Postgres database. Then run the crawler and launch the app. Every time you want to update the data, re-run crawl_coronavirus.

# crawl data
crawl_coronavirus()

# launch the dashboard
run_app()

Deploy

👍 Open an issue if you have problems deploying, I'm more than happy helping.

You can deploy on whatever server you like, install R and the Shiny Community server, then install the package from the terminal with.

sudo su - -c "R -e \"install.packages('remotes')\""
sudo su - -c "R -e \"remotes::install_github('JohnCoene/coronavirus')\""

Once this done create a directory under /srv/shiny-server/, where you can create the config file.

cd /srv/shiny-server
mkdir coronavirus
cd ./coronavirus
R -e "coronavirus::create_config()"
vi _coronavirus.yml

Fill in the config file and create the app.

echo "coronavirus::run_app()" > app.R 

You can then visit http://my.server.ip:3838/coronavirus, you can change the port in the /etc/shiny-server/shiny-server.conf file, change it to 80 to have your app at http://my.server.ip/coronavirus.

Credits

To do

  • API
  • Predictive model (currently limited to a fit)

Contribute

Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

Coronavirus Tracking dashboard

License:Other


Languages

Language:R 97.8%Language:CSS 1.1%Language:JavaScript 1.1%