Manual

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 9

DownloadManual
Open PDF In BrowserView PDF
Package
June 17, 2019
Type Package
Title Loads shapefiles of the Brazilian Institute of Geography and Statistics (IBGE)
Version 0.02
Date 2019-06-13
URL https://github.com/ipeaGIT/geobr
BugReports https://github.com/ipeaGIT/geobr/issues
Description geobr provides easy access to shapefiles of the Brazilian
Institute of Geography and Statistics (IBGE) and loads into R as 'sf' objects.
It includes a wide set of geographic datasets availabe at various geographic scales and for various years.
License MIT + file LICENSE
Encoding UTF-8
LazyData TRUE
Depends R (>= 3.4.0)
Suggests dplyr,
ggplot2,
mapview,
knitr,
rmarkdown
Imports httr,
readr,
sf
RoxygenNote 6.1.1
VignetteBuilder knitr

R topics documented:
read_census_tract . .
read_meso_region . .
read_micro_region .
read_municipality . .
read_municipality2 .
read_state . . . . . .
read_statistical_grid .
read_weighting_area

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
1

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

2
3
3
4
5
6
6
7

2

read_census_tract

Index

read_census_tract

9

Download shape files of census sectors of the Brazilian Population
Census

Description
Download shape files of census sectors of the Brazilian Population Census
Usage
read_census_tract(CODE, year = NULL, zone = "urban")
Arguments
CODE

One can either pass the 7-digit code of a Municipality or the 2-digit code of a
State.If CODE="all", all census sectors of the country are loaded.

year

the year of the data download (defaults to 2010)

zone

"urban" or "rural" for separation in the year 2000

See Also
Other general area functions: read_meso_region, read_micro_region, read_municipality2,
read_municipality, read_state, read_statistical_grid, read_weighting_area
Examples
## Not run:
# Exemplos
dados <- read_census_tract(year=2010)
dados <- read_census_tract(123,2010)
dados <- read_census_tract("df",2010)
dados <- read_census_tract(1302603,2010)
dados <- read_census_tract(35)
dados <- read_census_tract(14,2010)
dados <- read_census_tract()
# mapa
library(mapview)
mapview(dados)
## End(Not run)

read_meso_region

read_meso_region

3

Download shape files of meso region.

Description
Download shape files of meso region.
Usage
read_meso_region(cod_meso, year = NULL)
Arguments
cod_meso

The 4-digit code of a meso region. If a two-digit code of a state is passed, the
function will load all meso regions of that state. If cod_meso="all", all meso
regions of the country are loaded.

year

Year of the data (defaults to 2010)

See Also
Other general area functions: read_census_tract, read_micro_region, read_municipality2,
read_municipality, read_state, read_statistical_grid, read_weighting_area
Examples
## Not run:
library(geobr)
# Read all meso regions of a state at a given year
meso <- read_meso_region(cod_meso=12, year=2017)
# Read all meso regions of the country at a given year
meso <- read_meso_region(cod_meso="all", year=2010)
## End(Not run)

read_micro_region

Download shape files of micro region.

Description
Download shape files of micro region.
Usage
read_micro_region(cod_micro, year = NULL)

4

read_municipality

Arguments
cod_micro

5-digit code of a micro region. If the two-digit code of a state is passed, the
function will load all micro regions of that state. If cod_micro="all", all micro
regions of the country are loaded.

year

Year of the data (defaults to 2010)

See Also
Other general area functions: read_census_tract, read_meso_region, read_municipality2,
read_municipality, read_state, read_statistical_grid, read_weighting_area
Examples
## Not run:
library(geobr)
# Read all micro regions of a state at a given year
micro <- read_micro_region(cod_micro=12, year=2017)
# Read all micro regions at a given year
micro <- read_micro_region(cod_micro="all", year=2010)
## End(Not run)

read_municipality

Download shape files of municipalities

Description
Download shape files of municipalities
Usage
read_municipality(cod_muni, year = NULL)
Arguments
cod_muni

The 7-digit code of a municipality. If the two-digit code of a state is used,
the function will load all municipalities of that state. If cod_muni="all", all
municipalities will be loaded.

year

Year of the data (defaults to 2010)

See Also
Other general area functions: read_census_tract, read_meso_region, read_micro_region,
read_municipality2, read_state, read_statistical_grid, read_weighting_area

read_municipality2

5

Examples
## Not run:
library(geobr)
# Read specific municipality at a given year
mun <- read_municipality(cod_muni=1200179, year=2017)
# Read all municipalities of a state at a given year
mun <- read_municipality(cod_muni=12, year=2010)

## End(Not run)

read_municipality2

Download shape files of municipalities

Description
Download shape files of municipalities
Usage
read_municipality2(cod_muni, year = NULL)
Arguments
cod_muni

The 7-digit code of a municipality. If the two-digit code of a state is used,
the function will load all municipalities of that state. If cod_muni="all", all
municipalities will be loaded.

year

Year of the data (defaults to 2010)

See Also
Other general area functions: read_census_tract, read_meso_region, read_micro_region,
read_municipality, read_state, read_statistical_grid, read_weighting_area
Examples
## Not run:
library(geobr)
# Read specific municipality at a given year
mun <- read_municipality(cod_muni=1200179, year=2017)
# Read all municipalities of a state at a given year
mun <- read_municipality(cod_muni=12, year=2010)

## End(Not run)

6

read_statistical_grid

read_state

Download shape files of Brazilian states

Description
Download shape files of Brazilian states
Usage
read_state(cod_uf, year = NULL)
Arguments
cod_uf

The two-digit code of a state. If cod_uf="all", all states will be loaded.

year

Year of the data (defaults to 2010)

See Also
Other general area functions: read_census_tract, read_meso_region, read_micro_region,
read_municipality2, read_municipality, read_statistical_grid, read_weighting_area
Examples
## Not run:
library(geobr)
# Read specific municipality at a given year
uf <- read_state(cod_uf=12, year=2017)
# Read all states at a given year
ufs <- read_state(cod_uf="all", year=2010)

## End(Not run)

read_statistical_grid Download shape files of IBGE’s statistical grid (200 x 200 meters)

Description
Download shape files of IBGE’s statistical grid (200 x 200 meters)
Usage
read_statistical_grid(cod_grid, year = NULL)

read_weighting_area

7

Arguments
cod_grid

The 7-digit code of a grid quadrant If the two-letter abbreviation of a state is
used, the function will load all grid gradrants that intersect with that state. If
cod_grid="all", the grid of the whole country will be loaded.

year

Year of the data (defaults to 2010). The only year available thus far is 2010.

See Also
Other general area functions: read_census_tract, read_meso_region, read_micro_region,
read_municipality2, read_municipality, read_state, read_weighting_area
Examples
## Not run:
library(geobr)
# Read specific municipality at a given year
grid <- read_statistical_grid(cod_grid = 45, year=2010)
# Read all municipalities of a state at a given year
state_grid <- read_statistical_grid(cod_grid = "RJ")

## End(Not run)

read_weighting_area

Download shape files of Census Weighting Areas (área de ponderação) of the Brazilian Population Census

Description
Download shape files of Census Weighting Areas (área de ponderação) of the Brazilian Population
Census
Usage
read_weighting_area(cod_weighting, year = NULL)
Arguments
year

the year of the data download (defaults to 2010)

CODE

One can either pass the 7-digit code of a Municipality or the 2-digit code of a
State. The function will load the shape files of all weighting areas in the specified
geography

See Also
Other general area functions: read_census_tract, read_meso_region, read_micro_region,
read_municipality2, read_municipality, read_state, read_statistical_grid

8

read_weighting_area

Examples
## Not run:
library(geobr)
dados
dados
dados
dados
dados
dados
dados
dados

<<<<<<<<-

read_weighting_area(year=2010)
read_weighting_area(3500000,2010)
read_weighting_area(123,2010)
read_weighting_area("df",2010)
read_weighting_area(1302603,2010)
read_weighting_area(35)
read_weighting_area(14,2010)
read_weighting_area("all")

# map it
library(mapview)
mapview(dados)
## End(Not run)

Index
read_census_tract, 2, 3–7
read_meso_region, 2, 3, 4–7
read_micro_region, 2, 3, 3, 4–7
read_municipality, 2–4, 4, 5–7
read_municipality2, 2–4, 5, 6, 7
read_state, 2–5, 6, 7
read_statistical_grid, 2–6, 6, 7
read_weighting_area, 2–7, 7

9



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 9
Page Mode                       : UseOutlines
Author                          : 
Title                           : 
Subject                         : 
Creator                         : LaTeX with hyperref package
Producer                        : pdfTeX-1.40.17
Create Date                     : 2019:06:17 17:17:33-03:00
Modify Date                     : 2019:06:17 17:17:33-03:00
Trapped                         : False
PTEX Fullbanner                 : This is MiKTeX-pdfTeX 2.9.6211 (1.40.17)
EXIF Metadata provided by EXIF.tools

Navigation menu