Skip to contents

Downloads a dataset from the Tunisian data catalog API (data.gov.tn).

Usage

download_dataset(title, download_dir, format = NULL)

Arguments

title

Character. Display name of the dataset to download.

download_dir

Character. Directory to save the downloaded dataset at.

format

Character. Format of the dataset to download.

Value

The demanded dataset in the demanded path.

Examples

# \donttest{
try({
  download_dataset(
    "Ressources en eau- Gouvernorat de Kasserine",
    format = "xls",
    download_dir = tempdir()
 )
})
#> INFO [2025-03-23 15:18:07] Starting download for dataset: Ressources en eau- Gouvernorat de Kasserine
#> INFO [2025-03-23 15:18:08] Filtering for format: xls
#> INFO [2025-03-23 15:18:08] Starting downloads to directory: /tmp/Rtmpf8rVSe
#> INFO [2025-03-23 15:18:08] Downloading Les_ressources_en_eau.xls
#> SUCCESS [2025-03-23 15:18:09] Successfully downloaded: Les_ressources_en_eau.xls
#> INFO [2025-03-23 15:18:09] Download complete: 1 files downloaded
# }