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. Pereira
|
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. 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.
Usage
Please check the vignettes for more on the package usage:
Introduction to geobr (R) on the website.
Author(s)
Maintainer: Rafael H. M. Pereira rafa.pereira.br@gmail.com (ORCID)
Authors:
Caio Nogueira Goncalves
Other contributors:
Paulo Henrique Fernandes de Araujo [contributor]
Guilherme Duarte Carvalho [contributor]
Rodrigo Almeida de Arruda [contributor]
Igor Nascimento [contributor]
Barbara Santiago Pedreira da Costa [contributor]
Welligtton Silva Cavedo [contributor]
Pedro R. Andrade [contributor]
Alan da Silva [contributor]
Carlos Kauê Vieira Braga [contributor]
Carl Schmertmann [contributor]
Alessandro Samuel-Rosa [contributor]
Daniel Ferreira [contributor]
Marcus Saraiva [contributor]
Beatriz Milz (ORCID) [contributor]
Ipea - Institue for Applied Economic Research [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/ipeaGIT/geobr/issues
Determine the state of a given CEP postal code
Description
Zips codes in Brazil are known as CEP, the abbreviation for postal code
address. 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 |
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 is |
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 to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 uppercase
abbreviation (e.g. 33 or "RJ"). If |
Value
A simple feature sf
or data.frame
.
A correspondence table indicating what quadrants of IBGE's statistical grid intersect with each Brazilian state
Description
Built-in dataset
-
name_state
: Title-case name of state (character) -
abbrev_state
: Two-letter uppercase abbreviation of a state -
code_grid
: Unique code of each quadrant of IBGE's statistical grid
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
A data.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 municipality name or code and get the names and 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
A data.frame
with 13 columns identifying the geographies information
of that municipality.
A data.frame
See Also
Other support functions:
list_geobr()
Examples
# Get lookup table for municipality Rio de Janeiro
mun <- lookup_muni(name_muni = "Rio de Janeiro")
# Or you can get a lookup table for the same municipality searching for its code
mun <- lookup_muni(code_muni = 3304557)
# Get lookup table for all municipalities
mun_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 the federal law n. 12.651/2012). The original data comes from the Brazilian Ministry 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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 Amazon
a <- read_amazon(year = 2012)
Download spatial data of Brazilian biomes
Description
This data set includes polygons of all biomes present in Brazilian territory and coastal area. The latest data set dates to 2019 and it is available at scale 1:250.000. The 2004 data set is at the scale 1:5.000.000. The original data comes from IBGE. More information at https://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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 biomes
b <- read_biomes(year = 2019)
Download data of state capitals
Description
This function downloads either a spatial sf
object with the location of the
municipal seats (sede dos municipios) of state capitals, or a data.frame
with the names and codes of state capitals. Data downloaded for the latest
available year.
Usage
read_capitals(as_sf = TRUE, showProgress = TRUE)
Arguments
as_sf |
Logic |
showProgress |
Logical. Defaults to |
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 capitals
capitals_sf <- read_capitals(as_sf = TRUE)
# Read simple data.frame of state capitals
capitals_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 code
or a two-letter uppercase abbreviation of a state is passed, (e.g. 33
or "RJ") the function will load all census tracts of that state. If
|
year |
Numeric. Year of the data in YYYY format. Defaults to |
zone |
For census tracts before 2010, 'urban' and 'rural' census tracts are separate data sets. |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 of
municipalities, 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 by
Ehrl (2017) doi:10.1590/0101-416147182phe, and translated into R
by the
geobr
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 TO |
end_year |
Numeric. End year to the period in the YYYY format. Defaults
to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
Details
These data sets are generated based on the original Stata code developed by Philipp Ehrl. If you use these data, please cite:
Ehrl, P. (2017). Minimum comparable areas for the period 1872-2010: an aggregation of Brazilian municipalities. Estudos Econômicos (São Paulo), 47(1), 215-229. https://doi.org/10.1590/0101-416147182phe
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 all conservation units present in Brazilian territory. The last update of the data was 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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
Value
An "sf" "data.frame"
object
See Also
Other general area functions:
read_census_tract()
Examples
# Read conservation_units
b <- 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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
br <- 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 geodynamic and 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 on the extent to which the risk area polygons overlap with census tracts and block faces (column "acuracia") and number of ris areas within each risk area (column 'num'). Original data were generated by IBGE and CEMADEN. For more information about the methodology, see deails at https://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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
d <- read_disaster_risk_area(year=2010)
Download geolocated data of health facilities
Description
Data comes from the National Registry of Healthcare facilities (Cadastro
Nacional de Estabelecimentos de Saude - CNES), originally collected by the
Brazilian Ministry of Health. According to the Ministry of Health: "The
coordinates of each facility were obtained by CNES and validated by means of
space 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 in
web services like Google Maps. Finally, if the coordinates have been correctly
obtained in this process, the coordinates of the municipal head office are
used. The geocode source used is registered in the database in a specific
column data_source
. Periodically the coordinates are revised with the
objective of improving the quality of the data." The date of the last data
update is registered in the database in the columns date_update
and
year_update
. More information in the CNES data set available at https://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 to |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 country
h <- 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 complexity health services. These services involve larger economics of scale and are concentrated in few municipalities because they are generally more technology intensive, costly and face shortages 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 to |
macro |
Logic. If |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
hr <- read_health_region( year=2013 )
# Read all macro health regions
mhr <- 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 regions were 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-digit
code 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.
If |
year |
Numeric. Year of the data in YYYY format. Defaults to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 from all ethnicities and in different stages of demarcation. The original data comes from the National Indian Foundation (FUNAI) and can be found at https://www.gov.br/funai/pt-br/atuacao/terras-indigenas/geoprocessamento-e-mapas. Although original data is updated monthly, the geobr package will only keep the data for a few months per year.
Usage
read_indigenous_land(
date = 201907,
simplified = TRUE,
showProgress = TRUE,
cache = TRUE
)
Arguments
date |
Numeric. Date of the data in YYYYMM format. Defaults to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 date
i <- 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 of Brazil created in 2017 by IBGE. These regions were created to replace the "Meso Regions" division. Data at scale 1:250,000, using Geodetic reference system "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 the
two-digit code or a two-letter uppercase abbreviation of a state is
passed, (e.g. 33 or "RJ") the function will load all intermediate
regions of that state. If |
year |
Numeric. Year of the data in YYYY format. Defaults to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 or
a two-letter uppercase abbreviation of a state is passed, (e.g. 33 or
"RJ") the function will load all meso regions of that state. If
|
year |
Numeric. Year of the data in YYYY format. Defaults to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 respective metro areas. Metropolitan areas are created by each state in Brazil. The data set includes the municipalities that belong to all metropolitan areas in the country according to state legislation in each year. Original data were generated by Institute of Geography. Data at scale 1:250,000, using Geodetic reference 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 to |
code_state |
The two-digit code of a state or a two-letter uppercase
abbreviation (e.g. 33 or "RJ"). If |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 a
two-letter uppercase abbreviation of a state is passed, (e.g. 33 or
"RJ") the function will load all micro regions of that state. If
|
year |
Numeric. Year of the data in YYYY format. Defaults to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 municipal seats for various years between 1872 and 2010. Original data were generated by Brazilian 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 to |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
m <- 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. If
|
year |
Numeric. Year of the data in YYYY format. Defaults to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
keep_areas_operacionais |
Logic. Whether the function should keep the
polygons of Lagoas dos Patos and Lagoa Mirim in the State of Rio Grande
do Sul (considered as areas estaduais operacionais). Defaults to |
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 year
mun <- read_municipality(code_muni = 1200179, year = 2017)
# Read all municipalities of a state at a given year
mun <- read_municipality(code_muni = 33, year = 2010)
mun <- read_municipality(code_muni = "RJ", year = 2010)
# Read all municipalities of the country at a given year
mun <- 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 Brazilian census. 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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 municipalities
n <- read_neighborhood(year=2010)
Download population arrangements in Brazil
Description
This function reads the official data on population arrangements (Arranjos Populacionais) of Brazil. Original data were generated by the Institute of Geography and Statistics (IBGE) For more information about the methodology, see details at https://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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
uc <- 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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
reg <- read_region(year=2018)
Download geolocated data of schools
Description
Data comes from the School Census collected by INEP, the National Institute for Educational Studies and Research Anisio Teixeira. The date of the last data update is registered in the database in the column 'date_update'. These data uses Geodetic reference system "SIRGAS2000" and CRS(4674). The coordinates of each school if collected by INEP. Periodically the coordinates are revised with the objective of improving the quality of the data. More information available at https://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 to |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 country
s <- 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 resolution in 23/11/2017). The original data comes from the Brazilian Institute of Geography and Statistics (IBGE) and can be found at https://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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 semiarid
a <- 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 uppercase
abbreviation (e.g. 33 or "RJ"). If |
year |
Numeric. Year of the data in YYYY format. Defaults to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 is
passed, the function will load all grid quadrants that
intersect with that state. If |
year |
Numeric. Year of the data in YYYY format. Defaults to |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
grid <- read_statistical_grid(code_grid = 45, year=2010)
# Read the grid covering a given state at a given year
state_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 cities in the years 2005 and 2015. Original data were generated by the Institute of Geography and Statistics (IBGE) For more information about the methodology, see details at https://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 to |
code_state |
The two-digit code of a state or a two-letter uppercase
abbreviation (e.g. 33 or "RJ"). If |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
d <- read_urban_area(year=2005)
Download urban concentration areas in Brazil
Description
This function reads the official data on the urban concentration areas (Areas de Concentracao de Populacao) of Brazil. Original data were generated by the Institute of Geography and Statistics (IBGE) For more information about the methodology, see details at https://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 to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
uc <- 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 code
or 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. If |
year |
Numeric. Year of the data. Defaults to |
simplified |
Logic |
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
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 year
w <- read_weighting_area(code_weighting=5201108005004, year=2010)
# Read all weighting areas of a state at a given year
w <- read_weighting_area(code_weighting=53, year=2010) # or
w <- read_weighting_area(code_weighting="DF", year=2010)
plot(w)
# Read all weighting areas of a municipality at a given year
w <- read_weighting_area(code_weighting=5201108, year=2010)
plot(w)
# Read all weighting areas of the country at a given year
w <- 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 function returns 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) |