w_series_list: List the available series from a dataset.

View source: R/w_series_list.R

w_series_listR Documentation

List the available series from a dataset.

Description

List the available series from a dataset.

Usage

w_series_list(
  dataset_name,
  language = "fr",
  client_ID,
  base_url = "https://api.webstat.banque-france.fr/webstat-"
)

Arguments

dataset_name

Mandatory. String (Must be between quotes.) The datasets codes can be determined with the w_datasets() function.

language

Optional. String. Defaults to "fr" (French). The only other available option is "en" (English). Determines the language of the metadata. Your Webstat "App" must be subscribed to the API in this language (or both) or you'll get a 501 http error.

client_ID

Optional. String. If you do not specify it when calling the function, it will check if a global variable called ".GlobalEnv$webstat_client_ID exists and use it. If not, you will be prompted. The easiest way is to save the client ID as a string in ".GlobalEnv$webstat_client_ID".

base_url

Optional. String. Defaults to "https://api.webstat.banque-france.fr/webstat-". For internal testing purposes only.

Value

A data frame listing all the series from the requested dataset with their codes, titles and dimensions.

Identification

You should declare your Webstat client ID in a global "webstat_client_ID" variable. Alternatively, you can enter your client ID as a parameter or enter it when prompted.

Examples

## Not run: 
## Request the list of all series from the BPM6 dataset
w_series_list("BPM6")

## Request the list of all series from the CPP dataset, with English metadata
w_series_list("CPP", language = "en")

## Your client ID can be entered as a parameter as follows or saved
## in a global variable named "webstat_client_ID" in order to reuse it.
w_series_list("CPP", client_ID = "1234abcd-12ab-12ab-12ab-123456abcdef")

## End(Not run)


rwebstat documentation built on June 7, 2023, 5:10 p.m.