Skip to contents

[Stable]

get_qualocep_data() retrieves a validated dataset of Qual o CEP from the package's OSF repository.

Usage

get_qualocep_data(file = NULL, pattern = "2024-11-12.rds", force = FALSE)

Arguments

file

(Optional) A character string with the path to a Qual o CEP dataset file. If NULL, the dataset will be downloaded from the package's OSF repository. (Default: NULL).

pattern

(Optional) A character string with the pattern of the Qual o CEP dataset file to download. Click here to see the available patterns (Default: "2024-11-12.rds").

force

(Optional) A logical flag to force the download of the Qual o CEP dataset file. If TRUE, the dataset will be downloaded even if it already exists in the temporary directory (Default: FALSE).

Value

A tibble containing the Qual o CEP dataset with the following columns:

  • postal_code: A character vector with the postal codes.

  • street_type: A character vector with the type of streets.

  • street_name: A character vector with the name of the streets.

  • street: A character vector with the full name of the streets.

  • complement: A character vector with the complement of the addresses.

  • place: A character vector with the place of the addresses.

  • neighborhood: A character vector with the neighborhoods

  • municipality_code: An integer vector with the codes of the Brazilian Institute of Geography and Statistics (IBGE) for Brazilian municipalities.

  • municipality: A character vector with the name of the municipalities.

  • state_code: An integer vector with the codes of the Brazilian Institute of Geography and Statistics (IBGE) for the Brazilian state.

  • state: A character vector with the name of the states.

  • federal_unit: A character vector with the abbreviations of the Brazilian federal unit.

  • latitude: A numeric vector with the latitude values of the postal codes (retrieved using Google Geocoding API).

  • longitude: A numeric vector with the longitude values of the postal codes (retrieved using Google Geocoding API).

Details

Qual o CEP is a database of Brazilian addresses and postal codes geocoded made using the Google Geocoding API.

Please note the year of the pattern. Some values could be

See also

Other API functions: get_brazil_address_by_postal_code()

Examples

if (FALSE) { # \dontrun{
  get_qualocep_data()
} # }