get_geodata: Get Swiss Geodata

Description Usage Arguments Value Examples

View source: R/get_geodata.R

Description

get_geodata retrieves the latest geodata provided by the Federal Statistical Office in connection with federal votes.

Usage

1
get_geodata(geolevel = "municipality", latest = T, verbose = F, call_res)

Arguments

geolevel

geographical level. Options: "national", "canton", "district", "municipality", "zh_counting_districts" or "lakes".

latest

if TRUE, the latest data is retrieved. If FALSE, geo data from the beginning of the year is retrieved. The API does not support finer distinctions. For more detailed information on the exact status of the data, please use verbode = TRUE.

verbose

if TRUE, the date from which the data originates is displayed.

call_res

result of a previous call to the geodata API. Optional argument.

Value

a simple feature collection of the desired spatial units with corresponding IDs.

Examples

1
2
3
4
5
# Get latest geodata at municipal level
get_geodata()

# Get latest geodata at cantonal level
get_geodata(geolevel = "canton")

swissdd documentation built on July 17, 2021, 9:06 a.m.

Related to get_geodata in swissdd...