downloadCovid19: Function to download COVID-19 data from web repositories

View source: R/downloadData.R

downloadCovid19R Documentation

Function to download COVID-19 data from web repositories

Description

This function downloads the pandemic COVID-19 data at Brazil and World levels. Brazilan data is available at national, region, state, and city levels, whereas the world data are available at the country level.

Usage

downloadCovid19(level = c("brazil", "regions", "states", "cities", "world"))

Arguments

level

the desired level of data aggregation: "brazil" (default), "regions", "states", "cities", and "world".

Details

Data dictionary (variables commum to brazilian and world data):

  • date: date of data registry

  • epi_week: epidemiological week

  • pop: estimated population

  • accumCases: accumulative number of confirmed cases

  • newCases: daily count of new confirmed cases

  • accumDeaths: accumulative number of deaths

  • newDeaths: daily count of new deaths

  • newRecovered: daily count of new recovered patients

Data dictionary (variables in the brazilian data):

  • region: regions' names

  • state: states' names.

  • city: cities' names.

  • state_code: numerical code attributed to states

  • city_code: numerical code attributed to cities

  • healthRegion_code: health region code

  • healthRegion: heald region name

  • newFollowup: daily count of new patients under follow up

  • metro_area: indicator variable for city localized in a metropolitan area

  • capital: indicator variable for capital of brazilian states

Data dictionary (variables in the world data):

  • country: countries' names

  • accumRecovered: accumulative number of recovered patients

Value

a tibble containing the downloaded data at the specified level.

Examples


library(covid19br)

# Downloading Brazilian COVID-19 data:
brazil <- downloadCovid19(level = "brazil")
regions <- downloadCovid19(level = "regions")
states <- downloadCovid19(level = "states")
cities <- downloadCovid19(level = "cities")

# Downloading world COVID-19 data:
world <- downloadCovid19(level = "world")



covid19br documentation built on March 31, 2022, 1:08 a.m.