Get file attached to a dataset : extract (XLSX), or full CSV file
Usage
get_file(
ds_name,
file_name,
download_file_name,
download_directory = tempdir(),
base_url_melodi = "https://api.insee.fr/melodi"
)
Examples
get_file(
ds_name = "DS_EC_DECES",
file_name = "T1_DECES_JOUR_NAT_FR",
download_file_name = "T1_DECES_JOUR_NAT_FR.xlsx"
)
#> Request file : https://api.insee.fr/melodi/file/DS_EC_DECES/T1_DECES_JOUR_NAT_FR
#> Downloaded path : /tmp/RtmpoQkjQD/T1_DECES_JOUR_NAT_FR.xlsx
#> [1] "/tmp/RtmpoQkjQD/T1_DECES_JOUR_NAT_FR.xlsx"