Get data from INSEE BDM database with a SDMX query link

get_insee(link, step = "1/1")

Arguments

link

SDMX query link

step

argument used only for internal package purposes to tweak download display

Value

a tibble containing the data

Details

Get data from INSEE BDM database with a SDMX query link. This function is mainly for package internal use. It is used by the functions get_insee_dataset, get_insee_idbank and get_dataset_list. The data is cached, hence all queries are only run once per R session. The user can disable the download display in the console with the following command : Sys.setenv(INSEE_download_verbose = "FALSE"). The use of cached data can be disabled with : Sys.setenv(INSEE_no_cache_use = "TRUE"). All queries are printed in the console with this command: Sys.setenv(INSEE_print_query = "TRUE").

Examples

# \donttest{
insee_link = "http://www.bdm.insee.fr/series/sdmx/data/SERIES_BDM"
insee_query = file.path(insee_link, paste0("010539365","?", "firstNObservations=1"))
data = get_insee(insee_query)
#> 1/1 - Data download & Dataframe build : 100%
#> Data cached : /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//Rtmp0yEEwV/022dd22e63655d0225105ee0f610e936.rds
#> 
# }