Learn R Programming

geobr (version 0.02)

read_weighting_area: Download shape files of Census Weighting Areas (area de ponderacao) of the Brazilian Population Census. Only 2010 data is currently available.

Description

Download shape files of Census Weighting Areas (area de ponderacao) of the Brazilian Population Census. Only 2010 data is currently available.

Usage

read_weighting_area(code_weighting, year = NULL)

Arguments

code_weighting

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

year

the year of the data download (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_state, read_statistical_grid

Examples

Run this code
# NOT RUN {
library(geobr)

# 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_muni="all", year=2010)

# }
# NOT RUN {



# }

Run the code above in your browser using DataLab