Movatterモバイル変換


[0]ホーム

URL:


Type:Package
Title:Download Official Spatial Data Sets of Brazil
Version:1.9.1
URL:https://ipeagit.github.io/geobr/,https://github.com/ipeaGIT/geobr
BugReports:https://github.com/ipeaGIT/geobr/issues
Description:Easy access to official spatial data sets of Brazil as 'sf' objects in R. The package includes a wide range of geospatial data available at various geographic scales and for various years with harmonized attributes, projection and fixed topology.
License:MIT + file LICENSE
Encoding:UTF-8
LazyData:TRUE
Depends:R (≥ 3.5.0)
Imports:curl (≥ 5.0.0), dplyr (≥ 0.8-3), data.table, fs, methods, sf(≥ 0.9-3), utils
Suggests:arrow (≥ 15.0.1), censobr (≥ 0.3.2), covr, ggplot2 (≥3.3.1), knitr, rmarkdown, scales, testthat
RoxygenNote:7.3.2
VignetteBuilder:knitr
NeedsCompilation:no
Packaged:2024-09-06 10:28:48 UTC; user
Author:Rafael H. M. PereiraORCID iD [aut, cre], Caio Nogueira Goncalves [aut], Paulo Henrique Fernandes de Araujo [ctb], Guilherme Duarte Carvalho [ctb], Rodrigo Almeida de Arruda [ctb], Igor Nascimento [ctb], Barbara Santiago Pedreira da Costa [ctb], Welligtton Silva Cavedo [ctb], Pedro R. Andrade [ctb], Alan da Silva [ctb], Carlos Kauê Vieira Braga [ctb], Carl Schmertmann [ctb], Alessandro Samuel-Rosa [ctb], Daniel Ferreira [ctb], Marcus Saraiva [ctb], Beatriz MilzORCID iD [ctb], Ipea - Institue for Applied Economic Research [cph, fnd]
Maintainer:Rafael H. M. Pereira <rafa.pereira.br@gmail.com>
Repository:CRAN
Date/Publication:2024-09-06 16:10:02 UTC

geobr: Download Official Spatial Data Sets of Brazil

Description

Easy access to official spatial data sets of Brazil as 'sf' objects in R. Thepackage includes a wide range of geospatial data available at variousgeographic scales and for various years with harmonized attributes,projection and fixed topology.

Usage

Please check the vignettes for more on the package usage:

Author(s)

Maintainer: Rafael H. M. Pereirarafa.pereira.br@gmail.com (ORCID)

Authors:

Other contributors:

See Also

Useful links:


Determine the state of a given CEP postal code

Description

Zips codes in Brazil are known as CEP, the abbreviation for postal codeaddress. CEPs in Brazil are 8 digits long, with the format'xxxxx-xxx'.

Usage

cep_to_state(cep)

Arguments

cep

A character string with 8 digits in the format"xxxxxxxx", orwith the format'xxxxx-xxx'.

Value

A character string with a state abbreviation.

Examples

uf <- cep_to_state(cep = '69900-000')# Or:uf <- cep_to_state(cep = '69900000')

Check internet connection with Ipea server

Description

Checks if there is an internet connection with Ipea server.

Usage

check_connection(  url = "https://www.ipea.gov.br/geobr/metadata/metadata_gpkg.csv",  silent = FALSE)

Arguments

url

A string with the url address of an aop dataset

silent

Logical. Throw a message when silent isFALSE (default)

Value

Logical.TRUE if url is working,FALSE if not.


Download geopackage to tempdir

Description

Download geopackage to tempdir

Usage

download_gpkg(  file_url = parent.frame()$file_url,  showProgress = parent.frame()$showProgress,  cache = parent.frame()$cache)

Arguments

file_url

A string with the file_url address of a geobr dataset

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.


Support function to download metadata internally used in geobr

Description

Support function to download metadata internally used in geobr

Usage

download_metadata()

Examples

## Not run:  if (interactive()) {df <- download_metadata()}## End(Not run)

Filter data set to return specific states

Description

Filter data set to return specific states

Usage

filter_state(  temp_sf = parent.frame()$temp_sf,  code = parent.frame()$code_state)

Arguments

temp_sf

An internal simple feature or data.frame

code

The two-digit code of a state or a two-letter uppercaseabbreviation (e.g. 33 or "RJ"). Ifcode_state="all" (thedefault), the function downloads all states.

Value

A simple featuresf ordata.frame.


A correspondence table indicating what quadrants of IBGE's statistical grid intersect with each Brazilian state

Description

Built-in dataset

Usage

data(grid_state_correspondence_table)

Format

A data frame sf with 139 rows and 3 columns

Details

correspondence table indicating what quadrants of IBGE's statistical grid intersect with each Brazilian state

Note

Last updated 2021-o3-21


List all data sets available in the geobr package

Description

Returns a data frame with all datasets available in the geobr package

Usage

list_geobr()

Value

Adata.frame

See Also

Other support functions:lookup_muni()

Examples

df <- list_geobr()

Load geopackage from tempdir to global environment

Description

Load geopackage from tempdir to global environment

Usage

load_gpkg(temps = NULL)

Arguments

temps

The address of a gpkg file stored in tempdir. Defaults to NULL


Look up municipality codes and names

Description

Input a municipalitynameorcode and get the namesand codes of the municipality's corresponding state, meso, micro, intermediate,and immediate regions

Usage

lookup_muni(name_muni = NULL, code_muni = NULL)

Arguments

name_muni

The municipality name to be looked up.

code_muni

The municipality code to be looked up.

Details

Only available from 2010 Census data so far

Value

Adata.frame with 13 columns identifying the geographies informationof that municipality.

Adata.frame

See Also

Other support functions:list_geobr()

Examples

# Get lookup table for municipality Rio de Janeiromun <- lookup_muni(name_muni = "Rio de Janeiro")# Or you can get a lookup table for the same municipality searching for its codemun <- lookup_muni(code_muni = 3304557)# Get lookup table for all municipalitiesmun_all <- lookup_muni(name_muni = "all")# Or:mun_all <- lookup_muni(code_muni = "all")

Check if vector only has numeric characters

Description

Checks if vector only has numeric characters

Usage

numbers_only(x)

Arguments

x

A vector.

Value

Logical.TRUE if vector only has numeric characters.


Download spatial data of Brazil's Legal Amazon

Description

This data set covers the whole of Brazil's Legal Amazon as defined in thefederal law n. 12.651/2012). The original data comes from the BrazilianMinistry of Environment (MMA) and can be found at "http://mapas.mma.gov.br/i3geo/datadownload.htm".

Usage

read_amazon(year = 2012, simplified = TRUE, showProgress = TRUE, cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2012.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read Brazilian Legal Amazona <- read_amazon(year = 2012)

Download spatial data of Brazilian biomes

Description

This data set includes polygons of all biomes present in Brazilian territoryand coastal area. The latest data set dates to 2019 and it is available atscale 1:250.000. The 2004 data set is at the scale 1:5.000.000. The originaldata comes from IBGE. More information athttps://www.ibge.gov.br/apps/biomas/

Usage

read_biomes(year = 2019, simplified = TRUE, showProgress = TRUE, cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2019.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read biomesb <- read_biomes(year = 2019)

Download data of state capitals

Description

This function downloads either a spatialsf object with the location of themunicipal seats (sede dos municipios) of state capitals, or adata.framewith the names and codes of state capitals. Data downloaded for the latestavailable year.

Usage

read_capitals(as_sf = TRUE, showProgress = TRUE)

Arguments

as_sf

LogicFALSE orTRUE, indicating whether the function shouldreturn a spatial data insf format (Defaults toTRUE) or in adata.frame format without spatial information (FALSE).

showProgress

Logical. Defaults toTRUE display progress bar.

Value

An⁠"sf" "data.frame"⁠ object or a"data.frame"

See Also

Other area functions:read_amazon(),read_biomes(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read spatial data with the  municipal seats of state capitalscapitals_sf <- read_capitals(as_sf = TRUE)# Read simple data.frame of state capitalscapitals_df <- read_capitals(as_sf = FALSE)

Download spatial data of census tracts of the Brazilian Population Census

Description

Download spatial data of census tracts of the Brazilian Population Census

Usage

read_census_tract(  code_tract,  year = 2010,  zone = "urban",  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

code_tract

The 7-digit code of a Municipality. If the two-digit codeor a two-letter uppercase abbreviation of a state is passed, (e.g. 33or "RJ") the function will load all census tracts of that state. Ifcode_tract="all", the function downloads all census tracts of thecountry.

year

Numeric. Year of the data in YYYY format. Defaults to2010.

zone

For census tracts before 2010, 'urban' and 'rural' census tractsare separate data sets.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other general area functions:read_conservation_units()

Examples

# Read rural census tracts for years before 2007  c <- read_census_tract(code_tract=5201108, year=2000, zone="rural")# Read all census tracts of a state at a given year  c <- read_census_tract(code_tract=53, year=2010) # or  c <- read_census_tract(code_tract="DF", year=2010)  plot(c)# Read all census tracts of a municipality at a given year  c <- read_census_tract(code_tract=5201108, year=2010)  plot(c)# Read all census tracts of the country at a given year  c <- read_census_tract(code_tract="all", year=2010)

Download spatial data of historically comparable municipalities

Description

This function downloads the shape file of minimum comparable area ofmunicipalities, known in Portuguese as 'Areas minimas comparaveis (AMCs)'.The data is available for any combination of census years between 1872-2010.These data sets are generated based on the Stata code originally developed byEhrl (2017)doi:10.1590/0101-416147182phe, and translated intoR by thegeobr team.

Usage

read_comparable_areas(  start_year = 1970,  end_year = 2010,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

start_year

Numeric. Start year to the period in the YYYY format.Defaults TO1970.

end_year

Numeric. End year to the period in the YYYY format. Defaultsto2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Details

These data sets are generated based on the original Stata code developed byPhilipp Ehrl. If you use these data, please cite:

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

  amc <- read_comparable_areas(start_year=1970, end_year=2010)

Download spatial data of Brazilian environmental conservation units

Description

This data set covers the whole of Brazil and it includes the polygons of allconservation units present in Brazilian territory. The last update of the datawas 09-2019. The original data comes from MMA and can be found at "http://mapas.mma.gov.br/i3geo/datadownload.htm".

Usage

read_conservation_units(  date = 201909,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

date

Numeric. Date of the data in YYYYMM format. Defaults to201909.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other general area functions:read_census_tract()

Examples

# Read conservation_unitsb <- read_conservation_units(date = 201909)

Download spatial data of Brazil's national borders

Description

Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674).

Usage

read_country(year = 2010, simplified = TRUE, showProgress = TRUE, cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read specific yearbr <- read_country(year = 2018)

Download spatial data of disaster risk areas

Description

This function reads the the official data of disaster risk areas in Brazil(currently only available for 2010). It specifically focuses on geodynamicand hydro-meteorological disasters capable of triggering landslides and floods.The data set covers the whole country. Each risk area polygon (known as 'BATER')has unique code id (column 'geo_bater'). The data set brings information onthe extent to which the risk area polygons overlap with census tracts and blockfaces (column "acuracia") and number of ris areas within each risk area (column'num'). Original data were generated by IBGE and CEMADEN. For more informationabout the methodology, see deails athttps://www.ibge.gov.br/geociencias/organizacao-do-territorio/tipologias-do-territorio/21538-populacao-em-areas-de-risco-no-brasil.html

Usage

read_disaster_risk_area(  year = 2010,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read all disaster risk areas in an specific yeard <- read_disaster_risk_area(year=2010)

Download geolocated data of health facilities

Description

Data comes from the National Registry of Healthcare facilities (CadastroNacional de Estabelecimentos de Saude - CNES), originally collected by theBrazilian Ministry of Health. According to the Ministry of Health: "Thecoordinates of each facility were obtained by CNES and validated by means ofspace operations. These operations verify if the point is in the municipality,considering a radius of 5,000 meters. When the coordinate is not correct,further searches are done in other systems of the Ministry of Health and inweb services like Google Maps. Finally, if the coordinates have been correctlyobtained in this process, the coordinates of the municipal head office areused. The geocode source used is registered in the database in a specificcolumndata_source. Periodically the coordinates are revised with theobjective of improving the quality of the data." The date of the last dataupdate is registered in the database in the columnsdate_update andyear_update. More information in the CNES data set available athttps://dados.gov.br/.These data use Geodetic reference system "SIRGAS2000" and CRS(4674).

Usage

read_health_facilities(date = 202303, showProgress = TRUE, cache = TRUE)

Arguments

date

Numeric. Date of the data in YYYYMM format. Defaults to202303,which was the latest data available by the time of this update.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read all health facilities of the whole countryh <- read_health_facilities( date = 202303)

Download spatial data of Brazilian health regions and health macro regions

Description

Health regions are used to guide the the regional and state planning of health services.Macro health regions, in particular, are used to guide the planning of high complexityhealth services. These services involve larger economics of scale and are concentrated infew municipalities because they are generally more technology intensive, costly and faceshortages of specialized professionals. A macro region comprises one or more health regions.

Usage

read_health_region(  year = 2013,  macro = FALSE,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2013, thelatest available.

macro

Logic. IfFALSE (default), the function downloads healthregions data. IfTRUE, the function downloads macro regions data.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read all health regions for a given yearhr <- read_health_region( year=2013 )# Read all macro health regionsmhr <- read_health_region( year=2013, macro =TRUE)

Download spatial data of Brazil's Immediate Geographic Areas

Description

The Immediate Geographic Areas are part of the geographic division of Brazil created in 2017 by IBGE. These regionswere created to replace the "Micro Regions" division. Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)

Usage

read_immediate_region(  code_immediate = "all",  year = 2019,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

code_immediate

6-digit code of an immediate region. If the two-digitcode or a two-letter uppercase abbreviation of a state is passed, (e.g.33 or "RJ") the function will load all immediate regions of that state.Ifcode_immediate="all" (Default), the function downloads allimmediate regions of the country.

year

Numeric. Year of the data in YYYY format. Defaults to2019.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read an specific immediate region  im <- read_immediate_region(code_immediate=110006)# Read immediate regions of a state  im <- read_immediate_region(code_immediate=12)  im <- read_immediate_region(code_immediate="AM")# Read all immediate regions of the country  im <- read_immediate_region()  im <- read_immediate_region(code_immediate="all")

Download spatial data of indigenous lands in Brazil

Description

The data set covers the whole of Brazil and it includes indigenous lands fromall ethnicities and in different stages of demarcation. The original datacomes from the National Indian Foundation (FUNAI) and can be found athttps://www.gov.br/funai/pt-br/atuacao/terras-indigenas/geoprocessamento-e-mapas. Although original data isupdated monthly, the geobr package will only keep the data for a few monthsper year.

Usage

read_indigenous_land(  date = 201907,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

date

Numeric. Date of the data in YYYYMM format. Defaults to201907.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read all indigenous land in an specific datei <- read_indigenous_land(date=201907)

Download spatial data of Brazil's Intermediate Geographic Areas

Description

The intermediate Geographic Areas are part of the geographic division ofBrazil created in 2017 by IBGE. These regions were created to replace the"Meso Regions" division. Data at scale 1:250,000, using Geodetic referencesystem "SIRGAS2000" and CRS(4674)

Usage

read_intermediate_region(  code_intermediate = "all",  year = 2019,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

code_intermediate

4-digit code of an intermediate region. If thetwo-digit code or a two-letter uppercase abbreviation of a state ispassed, (e.g. 33 or "RJ") the function will load all intermediateregions of that state. Ifcode_intermediate="all" (Default), thefunction downloads all intermediate regions of the country.

year

Numeric. Year of the data in YYYY format. Defaults to2019.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read an specific intermediate region  im <- read_intermediate_region(code_intermediate=1202)# Read intermediate regions of a state  im <- read_intermediate_region(code_intermediate=12)  im <- read_intermediate_region(code_intermediate="AM")# Read all intermediate regions of the country  im <- read_intermediate_region()  im <- read_intermediate_region(code_intermediate="all")

Download spatial data of meso regions

Description

Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)

Usage

read_meso_region(  code_meso = "all",  year = 2010,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

code_meso

The 4-digit code of a meso region. If the two-digit code ora two-letter uppercase abbreviation of a state is passed, (e.g. 33 or"RJ") the function will load all meso regions of that state. Ifcode_meso="all" (Default), the function downloads all mesoregions of the country.

year

Numeric. Year of the data in YYYY format. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read specific meso region at a given year  meso <- read_meso_region(code_meso=3301, year=2018)# Read all meso regions of a state at a given year  meso <- read_meso_region(code_meso=12, year=2017)  meso <- read_meso_region(code_meso="AM", year=2000)# Read all meso regions of the country at a given year  meso <- read_meso_region(code_meso="all", year=2010)

Download spatial data of official metropolitan areas in Brazil

Description

The function returns the shapes of municipalities grouped by their respectivemetro areas. Metropolitan areas are created by each state in Brazil. The dataset includes the municipalities that belong to all metropolitan areas in thecountry according to state legislation in each year. Original data weregenerated by Institute of Geography. Data at scale 1:250,000, using Geodeticreference system "SIRGAS2000" and CRS(4674).

Usage

read_metro_area(  year = 2018,  code_state = "all",  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2018.

code_state

The two-digit code of a state or a two-letter uppercaseabbreviation (e.g. 33 or "RJ"). Ifcode_state="all" (thedefault), the function downloads all states.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read all official metropolitan areas for a given year  m <- read_metro_area(2005)  m <- read_metro_area(2018)

Download spatial data of micro regions

Description

Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)

Usage

read_micro_region(  code_micro = "all",  year = 2010,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

code_micro

5-digit code of a micro region. If the two-digit code or atwo-letter uppercase abbreviation of a state is passed, (e.g. 33 or"RJ") the function will load all micro regions of that state. Ifcode_micro="all" (Default), the function downloads all micro regions of thecountry.

year

Numeric. Year of the data in YYYY format. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read an specific micro region a given year  micro <- read_micro_region(code_micro=11008, year=2018)# Read micro regions of a state at a given year  micro <- read_micro_region(code_micro=12, year=2017)  micro <- read_micro_region(code_micro="AM", year=2000)# Read all micro regions at a given year  micro <- read_micro_region(code_micro="all", year=2010)

Download spatial data of municipal seats (sede dos municipios) in Brazil

Description

This function reads the official data on the municipal seats (sede dos municipios)of Brazil. The data brings the geographical coordinates (lat lon) of municipalseats for various years between 1872 and 2010. Original data were generated byBrazilian Institute of Geography and Statistics (IBGE).

Usage

read_municipal_seat(year = 2010, showProgress = TRUE, cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2010.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read municipal seats in an specific yearm <- read_municipal_seat(year = 1991)

Download spatial data of Brazilian municipalities

Description

Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674).

Usage

read_municipality(  code_muni = "all",  year = 2010,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE,  keep_areas_operacionais = FALSE)

Arguments

code_muni

The 7-digit identification code of a municipality. Ifcode_muni = "all" (Default), the function downloads allmunicipalities of the country. Alternatively, if a two-digitidentification code or a two-letter uppercase abbreviation of a stateis passed (e.g.33 or"RJ"), all municipalities of that state willbe downloaded. Municipality identification codes can be consulted withthegeobr::lookup_muni() function.

year

Numeric. Year of the data in YYYY format. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

keep_areas_operacionais

Logic. Whether the function should keep thepolygons of Lagoas dos Patos and Lagoa Mirim in the State of Rio Grandedo Sul (considered as areas estaduais operacionais). Defaults toFALSE.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read specific municipality at a given yearmun <- read_municipality(code_muni = 1200179, year = 2017)# Read all municipalities of a state at a given yearmun <- read_municipality(code_muni = 33, year = 2010)mun <- read_municipality(code_muni = "RJ", year = 2010)# Read all municipalities of the country at a given yearmun <- read_municipality(code_muni = "all", year = 2018)

Download spatial data of neighborhood limits of Brazilian municipalities

Description

This data set includes the neighborhood limits of 720 Brazilian municipalities.It is based on aggregations of the census tracts from the Braziliancensus. Only 2010 data is currently available.

Usage

read_neighborhood(  year = 2010,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read neighborhoods of Brazilian municipalitiesn <- read_neighborhood(year=2010)

Download population arrangements in Brazil

Description

This function reads the official data on population arrangements (ArranjosPopulacionais) of Brazil. Original data were generated by the Institute ofGeography and Statistics (IBGE) For more information about the methodology,see details athttps://www.ibge.gov.br/apps/arranjos_populacionais/2015/pdf/publicacao.pdf

Usage

read_pop_arrangements(  year = 2015,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2015.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read urban footprint of Brazilian cities in an specific yearuc <- read_pop_arrangements(year=2015)

Download spatial data of Brazil Regions

Description

Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)

Usage

read_region(year = 2010, simplified = TRUE, showProgress = TRUE, cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read specific yearreg <- read_region(year=2018)

Download geolocated data of schools

Description

Data comes from the School Census collected by INEP, the National Institutefor Educational Studies and Research Anisio Teixeira. The date of the lastdata update is registered in the database in the column 'date_update'. Thesedata uses Geodetic reference system "SIRGAS2000" and CRS(4674). The coordinatesof each school if collected by INEP. Periodically the coordinates are revisedwith the objective of improving the quality of the data. More informationavailable athttps://www.gov.br/inep/pt-br/acesso-a-informacao/dados-abertos/inep-data/catalogo-de-escolas/

Usage

read_schools(year = 2020, showProgress = TRUE, cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2020.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read all schools in the countrys <- read_schools( year = 2020)

Download spatial data of the Brazilian Semiarid region

Description

This data set covers the whole of Brazilian Semiarid as defined in the resolutionin 23/11/2017). The original data comes from the Brazilian Institute of Geographyand Statistics (IBGE) and can be found athttps://www.ibge.gov.br/geociencias/cartas-e-mapas/mapas-regionais/15974-semiarido-brasileiro.html?=&t=downloads

Usage

read_semiarid(  year = 2017,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2017.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read Brazilian semiarida <- read_semiarid(year=2017)

Download spatial data of Brazilian states

Description

Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)

Usage

read_state(  code_state = "all",  year = 2010,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

code_state

The two-digit code of a state or a two-letter uppercaseabbreviation (e.g. 33 or "RJ"). Ifcode_state="all" (thedefault), the function downloads all states.

year

Numeric. Year of the data in YYYY format. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_statistical_grid(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read specific state at a given year  uf <- read_state(code_state=12, year=2017)# Read specific state at a given year  uf <- read_state(code_state="SC", year=2000)# Read all states at a given year  ufs <- read_state(code_state="all", year=2010)

Download spatial data of IBGE's statistical grid

Description

Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)

Usage

read_statistical_grid(  code_grid,  year = 2010,  showProgress = TRUE,  cache = TRUE)

Arguments

code_grid

If two-letter abbreviation or two-digit code of a state ispassed, the function will load all grid quadrants thatintersect with that state. Ifcode_grid="all", the grid ofthe whole country will be loaded. Users may also pass agrid quadrant id to load an specific quadrant. Quadrant idscan be consulted atgeobr::grid_state_correspondence_table.

year

Numeric. Year of the data in YYYY format. Defaults to2010. Theonly year available thus far is 2010.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_urban_area(),read_urban_concentrations(),read_weighting_area()

Examples

# Read a particular grid at a given yeargrid <- read_statistical_grid(code_grid = 45, year=2010)# Read the grid covering a given state at a given yearstate_grid <- read_statistical_grid(code_grid = "RJ")

Download spatial data of urbanized areas in Brazil

Description

This function reads the official data on the urban footprint of Brazilian citiesin the years 2005 and 2015. Original data were generated by the Institute of Geographyand Statistics (IBGE) For more information about the methodology, see details athttps://biblioteca.ibge.gov.br/visualizacao/livros/liv100639.pdf

Usage

read_urban_area(  year = 2015,  code_state = "all",  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

year

Numeric. Year of the data in YYYY format. Defaults to2015.

code_state

The two-digit code of a state or a two-letter uppercaseabbreviation (e.g. 33 or "RJ"). Ifcode_state="all" (thedefault), the function downloads all states.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_concentrations(),read_weighting_area()

Examples

# Read urban footprint of Brazilian cities in an specific yeard <- read_urban_area(year=2005)

Download urban concentration areas in Brazil

Description

This function reads the official data on the urban concentration areas (Areasde Concentracao de Populacao) of Brazil. Original data were generated by theInstitute of Geography and Statistics (IBGE) For more information about themethodology, see details athttps://www.ibge.gov.br/apps/arranjos_populacionais/2015/pdf/publicacao.pdf

Usage

read_urban_concentrations(  year = 2015,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

year

Numeric. A year number in YYYY format. Defaults to2015.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_weighting_area()

Examples

# Read urban footprint of Brazilian cities in an specific yearuc <- read_urban_concentrations(year=2015)

Download spatial data of Census Weighting Areas (area de ponderacao) of the Brazilian Population Census

Description

Only 2010 data is currently available.

Usage

read_weighting_area(  code_weighting = "all",  year = 2010,  simplified = TRUE,  showProgress = TRUE,  cache = TRUE)

Arguments

code_weighting

The 7-digit code of a Municipality. If the two-digit codeor a two-letter uppercase abbreviation of a state is passed, (e.g. 33 or "RJ")the function will load all weighting areas of that state. Ifcode_weighting="all",all weighting areas of the country are loaded.

year

Numeric. Year of the data. Defaults to2010.

simplified

LogicFALSE orTRUE, indicating whether the functionshould return the data set with 'original' spatial resolution or a data setwith 'simplified' geometry. Defaults toTRUE. For spatial analysis andstatistics users should setsimplified = FALSE. Borders have beensimplified by removing vertices of borders using⁠st_simplify{sf}⁠ preservingtopology with adTolerance of 100.

showProgress

Logical. Defaults toTRUE display progress bar.

cache

Logical. Whether the function should read the data cachedlocally, which is faster. Defaults tocache = TRUE. By default,geobr stores data files in a temporary directory that exists onlywithin each R session. Ifcache = FALSE, the function will downloadthe data again and overwrite the local file.

Value

An⁠"sf" "data.frame"⁠ object

See Also

Other area functions:read_amazon(),read_biomes(),read_capitals(),read_comparable_areas(),read_country(),read_disaster_risk_area(),read_health_facilities(),read_health_region(),read_immediate_region(),read_indigenous_land(),read_intermediate_region(),read_meso_region(),read_metro_area(),read_micro_region(),read_municipal_seat(),read_municipality(),read_neighborhood(),read_pop_arrangements(),read_region(),read_schools(),read_semiarid(),read_state(),read_statistical_grid(),read_urban_area(),read_urban_concentrations()

Examples

# Read specific weighting area at a given yearw <- read_weighting_area(code_weighting=5201108005004, year=2010)# Read all weighting areas of a state at a given yearw <- read_weighting_area(code_weighting=53, year=2010) # orw <- read_weighting_area(code_weighting="DF", year=2010)plot(w)# Read all weighting areas of a municipality at a given yearw <- read_weighting_area(code_weighting=5201108, year=2010)plot(w)# Read all weighting areas of the country at a given yearw <- read_weighting_area(code_weighting="all", year=2010)

Select data type: 'original' or 'simplified' (default)

Description

Select data type: 'original' or 'simplified' (default)

Usage

select_data_type(temp_meta, simplified = NULL)

Arguments

temp_meta

A dataframe with the file_url addresses of geobr datasets

simplified

Logical TRUE or FALSE indicating whether the function returns the 'original' dataset with high resolution or a dataset with 'simplified' borders (Defaults to TRUE)


Select metadata

Description

Select metadata

Usage

select_metadata(geography, year = NULL, simplified = NULL)

Arguments

geography

Which geography will be downloaded.

year

Year of the dataset (passed by read_ function).

simplified

Logical TRUE or FALSE indicating whether the functionreturns the 'original' dataset with high resolution or a dataset with'simplified' borders (Defaults to TRUE).

Examples

## Not run:  if (interactive()) {library(geobr)df <- download_metadata()}## End(Not run)

Select year input

Description

Select year input

Usage

select_year_input(temp_meta, y = year)

Arguments

temp_meta

A dataframe with the file_url addresses of geobr datasets

y

Year of the dataset (passed by red_ function)


[8]ページ先頭

©2009-2025 Movatter.jp