Learn R Programming

geobr (version 0.02)

read_state: Download shape files of Brazilian states as sf objects. Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)

Description

Download shape files of Brazilian states as sf objects. Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)

Usage

read_state(code_state, year = NULL)

Arguments

code_state

The two-digit code of a state or a two-letter uppercase abbreviation (e.g. 33 or "RJ"). If code_state="all", all states will be loaded.

year

Year of the data (defaults to 2010)

See Also

Other general area functions: read_census_tract, read_country, read_meso_region, read_micro_region, read_municipality, read_region, read_statistical_grid, read_weighting_area

Examples

Run this code
# NOT RUN {
library(geobr)

# 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)

# }

Run the code above in your browser using DataLab