View source: R/read_polling_places.R
| read_polling_places | R Documentation |
Data comes from the Superior Electoral Court (TSE).
The spatial coordinates used in geobr are a combination of the coordinates
produced by the original data producer and the coordinates found via geocoding
with the geocodebr package https://CRAN.R-project.org/package=geocodebr.
Whenever the distance between the coordinates from both sources is smaller than
800 meters, geobr uses coordinates from the data producer. When the distance
between the two sources is greater than 800 meters and the results from
geocodebr have a precision level finer than 800 meters, geobr uses the
coordinates from geocodebr. When the coordinates from the original source are
missing, geobr also uses geocodebr coordinates, regardless of precision level.
The source of the spatial coordinates used in each observation is registered
in the data in a specific column coords_source. Additional columns
indicating the precision level of geocodebr geocoding are also included in
the data.
read_polling_places(
year,
code_muni = "all",
output = "sf",
showProgress = TRUE,
cache = TRUE,
verbose = TRUE
)
year |
Numeric. Year of the data in YYYY format. It defaults to |
code_muni |
The 7-digit code of a municipality. If |
output |
String. Type of object returned by the function. Defaults to
|
showProgress |
Logical. Defaults to |
cache |
Logical. Whether the function should read the data cached
locally, which is faster. Defaults to |
verbose |
A logical. If |
An "sf" "data.frame" OR an ArrowObject
# Read health facilities of a given municipality
h <- read_polling_places(
year = 2022,
code_muni = 2800308
)
# Read health facilities of a given state
h <- read_polling_places(
year = 2022,
code_muni = "SE"
)
# Read all health facilities of the whole country
h <- read_polling_places(year = 2022)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.