knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)



Note

You must import these packages before using HesabaCovid:



library(HesabaCovid)
library(rworldmap)
library(tidyverse)

Examples

getData():

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)

plotTimeSeries(country, dateFrom, dateTo):

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")

plotWorld(plotType, date):

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")


TabaMojj/HesabaCovid documentation built on Dec. 31, 2020, 5:28 p.m.