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.

read_capitals(as_sf = TRUE, showProgress = TRUE)

Arguments

as_sf

Logic FALSE or TRUE, indicating whether the function should return a spatial data in sf format (Defaults to TRUE) or in a data.frame format without spatial information (FALSE).

showProgress

Logical. Defaults to TRUE display progress bar.

Value

An "sf" "data.frame" object or a "data.frame"

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)