README.md

HesabaCovid

License:
MIT

HesabaCovid is part of Hesaba Internship tasks. You can get up-to-date COVID-19 data, plot time series and world map.

Installation

You can install the released version of HesabaCovid from github with:

install.packages(“devtools”)
devtools::install_github("TabaMojj/HesabaCovid", build_vignettes = TRUE)

Example

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.

library(HesabaCovid)
df <- getData()
head(df)
#> # A tibble: 6 x 8
#> # Groups:   Country [1]
#>   Country Date                Confirmed Deaths Recovered CumulativeConfi~
#>   <fct>   <dttm>                  <dbl>  <dbl>     <dbl>            <dbl>
#> 1 Afghan~ 2020-10-29 00:00:00       123      3         2            41268
#> 2 Afghan~ 2020-10-28 00:00:00       113      6        20            41145
#> 3 Afghan~ 2020-10-27 00:00:00        95      5        67            41032
#> 4 Afghan~ 2020-10-26 00:00:00       104      4        21            40937
#> 5 Afghan~ 2020-10-25 00:00:00        65      3       106            40833
#> 6 Afghan~ 2020-10-24 00:00:00        81      4        13            40768
#> # ... with 2 more variables: CumulativeDeath <dbl>, CumulativeRecovered <dbl>

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("Deaths", "2020-10-29")

You can plot time series for a country between two dates. Date must be in “YYYY-MM-DD” format.

plotTimeSeries("Iran", "2020-5-10", "2020-10-29")

More

You can use utils::vignette("HesabaCovid") to see examples.

Also, you can visit HesabaCovid website for more information.



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