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-19 21:01:45] Starting download for dataset: Ressources en eau- Gouvernorat de Kasserine
#> INFO [2025-03-19 21:01:47] Filtering for format: xls
#> INFO [2025-03-19 21:01:47] Starting downloads to directory: /tmp/RtmpKYT2C6
#> INFO [2025-03-19 21:01:47] Downloading Les_ressources_en_eau.xls
#> SUCCESS [2025-03-19 21:01:48] Successfully downloaded: Les_ressources_en_eau.xls
#> INFO [2025-03-19 21:01:48] Download complete: 1 files downloaded
# }