bdf_data: Fetch Banque de France (BdF) data

View source: R/bdf.R

bdf_dataR Documentation

Fetch Banque de France (BdF) data

Description

Retrieve time series data from the BdF Webstat API.

Usage

bdf_data(
  ...,
  key = NULL,
  start_date = NULL,
  end_date = NULL,
  api_key = bdf_key()
)

Arguments

...

(any)
Extra arguments appended to the API request. Combined with the default arguments with modifyList().

key

(NULL | character(1))
The series key to query. Default NULL.

start_date

(NULL | character(1) | Date(1))
Start date of the data. Default NULL.

end_date

(NULL | character(1) | Date(1))
End date of the data. Default NULL.

api_key

(character(1))
API key to use for the request. Defaults to the value returned by bdf_key(), which reads from the BANQUEDEFRANCE_KEY environment variable.

Value

A data.table::data.table() with the requested data.

Source

https://webstat.banque-france.fr/en/pages/guide-migration-api/

See Also

Other data: bbk_data(), bbk_series(), bde_data(), bdf_codelist(), bdf_dataset(), boc_data(), boe_data(), ecb_data(), onb_data(), snb_data()

Examples

## Not run: 
bdf_data(key = "CONJ2.M.R24.T.SM.0RG24.EFTPM100.10")

# inflation rate
bdf_data(key = "ICP.M.FR.N.000000.4.ANR")

# or with a date filter
bdf_data(key = "ICP.M.FR.N.000000.4.ANR", start_date = "2025-01-01", end_date = "2025-06-30")

# advanced filter with where clause
bdf_data(key = "ICP.M.FR.N.000000.4.ANR", where = "time_period_start >= date'2025-01-01'")

## End(Not run)

bbk documentation built on Nov. 5, 2025, 6:07 p.m.