add_geo: Adding the geometry to the downloaded data for drawing maps

View source: R/utils.R

add_geoR Documentation

Adding the geometry to the downloaded data for drawing maps

Description

This function adds the necessary geometry for drawing maps to a given data set downloaded by the covid19br::downloadCovid19() function.

Usage

add_geo(data, ...)

Arguments

data

a data set downloaded using the covid19br::downloadCovid19() function.

...

further arguments passed to other methods.

Details

The function add_geo() was designed to work with the original names of the variables available in the dataset downloaded by the covid19br::downloadCovid19(). For this reason, this function must be used before any changes in the original names of the variables.

The development human index (DHI) variables (see full description below) are available at city level, and their average are computed for state and region levels.

Data dictionary (Brazilian data):

  • region: regions' names

  • state: states' names.

  • city: cities' names.

  • DHI: development human index.

  • EDHI: educational development human index.

  • LDHI: longevity development human index.

  • IDHI: income development human index.

  • pop: estimated population in 2019.

  • region_code: numerical code attributed to regions

  • state_code: numerical code attributed to states

  • mesoregion_code: numerical code attributed to mesoregions

  • microregion_code: numerical code attributed to microregions

  • city_code: numerical code attributed to cities

  • geometry: georeferenced data needed to plot maps.

  • area: area (in Km^2)

  • demoDens: demographic density.

Data dictionary (world data):

  • country: country's name

  • continent: continent's name

  • region: regions' names

  • subregion: subregion's name

  • pop: estimated population

  • pais: country's name in Portuguese

  • country_code: numerical code attributed to countries

  • continent_code: numerical code attributed to continents

  • region_code: numerical code attributed to regions

  • subregion_code: numerical code attributed to subregions

  • geometry: georeferenced data needed to plot maps.

Value

the data set with the added georeferenced data.

Author(s)

Fabio N. Demarqui fndemarqui@est.ufmg.br

Source

Examples


library(covid19br)
library(dplyr)

regions <- downloadCovid19(level = "regions")
regions_geo <- add_geo(regions)
glimpse(regions_geo)



covid19br documentation built on Oct. 16, 2023, 1:06 a.m.