The refresh_coronavirus_jhu
function enables to pull the coronavirus
dataset using the Covid19R project data format standard. This data format includes the following fields:
date
- The date of the observation, using Date
classlocation
- The name of the location as provided by John Hopkins raw datalocation_type
- The type of the location field, either country
or state
location_code
- The location code, using the ios_3166_2
formatlocation_code_type
- The location code type (ios_3166_2
)data_type
- The case type, c("recovered_new", "cases_new", "deaths_new" )
value
- The number of caseslat
- The latitude codelong
- The longitude codelibrary(coronavirus)
<- refresh_coronavirus_jhu()
covid19_df
head(covid19_df)
#> date location location_type location_code location_code_type
#> 1 2020-01-25 Afghanistan country AF iso_3166_2
#> 2 2020-03-25 Afghanistan country AF iso_3166_2
#> 3 2020-01-24 Afghanistan country AF iso_3166_2
#> 4 2020-01-23 Afghanistan country AF iso_3166_2
#> 5 2020-09-26 Afghanistan country AF iso_3166_2
#> 6 2020-09-25 Afghanistan country AF iso_3166_2
#> data_type value lat long
#> 1 cases_new 0 33.93911 67.70995
#> 2 deaths_new 1 33.93911 67.70995
#> 3 cases_new 0 33.93911 67.70995
#> 4 cases_new 0 33.93911 67.70995
#> 5 deaths_new 2 33.93911 67.70995
#> 6 deaths_new 0 33.93911 67.70995