bfs_sse_datasets: List the datasets of the Swiss Stats Explorer

View source: R/bfs_sse.R

bfs_sse_datasetsR Documentation

List the datasets of the Swiss Stats Explorer

Description

List the datasets (dataflows) of the Swiss Stats Explorer (SSE) API (https://stats.swiss/), to find the id of a dataset for bfs_sse_dimensions() and bfs_sse_data().

Usage

bfs_sse_datasets(language = "de")

Arguments

language

Language of the names: "de" (default), "fr", "it" or "en".

Value

A tibble with one row per version of each dataset, the latest version first:

dataset

The id of the dataset, e.g. "DF_LWZ_1".

name

The name of the dataset.

version

The version of the dataset.

agency

The agency publishing the dataset.

description

The description of the dataset version, or NA, as given by the API: it can contain HTML tags such as ⁠<br>⁠.

Returns NULL if there is no internet connection.

Author(s)

Felix Luginbuhl

See Also

bfs_sse_dimensions(), bfs_sse_data()

Examples


datasets <- bfs_sse_datasets(language = "en")
datasets

# datasets about tourism, in their name or description
datasets[grepl("touris", paste(datasets$name, datasets$description), ignore.case = TRUE), ]


BFS documentation built on Oct. 21, 2026, 1:07 a.m.