Minor checks of the crawler.
To set up the cronjob, recreate your config file somewhere in your home directory.
cd /home
mkdir ncov
R -e "coronavirus::create_config()"
vi _coronavirus.yml
After editing the config file we can create the script that will crawl fresh data. There is a convenience create_script
function to do so.
R -e "coronavirus::create_script()"
You should test that all works fine by running the crawler once from the terminal.
Rscript script.R
Then set up the cron job.
crontab -e
In that file place the following to crawl every hour. If you want to set another interval consult crontab guru.
0 * * * * cd /home/ncov && Rscript script.R
All set!
Though every version should be backward compatible, it's good practice to re-run a crawl after installing a new version of the package.
:warning: Corrected inaccuracies
v0.1.1
v0.0.6
deaths/confirmed
to deaths/(confirmed + recovered)
v0.0.3
:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.