knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
You must import these packages before using HesabaCovid:
library(HesabaCovid) library(rworldmap) library(tidyverse)
You can get up-to-date COVID-19 data from Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE). This dataset contains Country, Date, Deaths, Confiremed, Recovered and Cumulative data.
df <- getData() head(df)
This function can plot time series for a country between two dates. Date must be in "YYYY-MM-DD" format.
plotTimeSeries(country = "Iran", dateFrom = "2020-05-11", dateTo = "2020-08-05")
plotTimeSeries(country = "US", dateFrom = "2020-05-11", dateTo = "2020-08-05")
Given a plot type and a date, this function can plot datas on world map. Plot type can be "Deaths" or "Confiremed". Date must be in "YYYY-MM-DD" format.
plotWorld(plotType = "Deaths", "2020-10-24")
plotWorld(plotType = "Confirmed", "2020-10-24")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.