Dashboard to track the spread of the coronavirus, based on the data from John Hopkins' dashboard, built with shinyMobile and echarts4r.
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")
You can test the app before preparing any kind of deployment you can test like so.
library(coronavirus)
virus <- crawl_coronavirus()
run_app(virus)
Create the config file required to run the crawler.
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()
👍 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
.
- Data from John Hopkins GIS dashboard
- Data from Wixin using nCov2019 by Guangchuang Yu
- The shinyMobile framework
- API
- Predictive model (currently limited to a fit)
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.