Skip to contents

Retrieves organizations data from the Tunisian data catalog API (data.gov.tn) using faceted search. This function returns organizations that have published datasets.

Usage

get_organizations(min_count = 1)

Arguments

min_count

Integer. Minimum number of datasets an organization must have to be included in results. Default is 1, meaning only organizations with at least one dataset are returned.

Value

A tibble (data frame) with the following columns:

name

Character. Machine-readable name/identifier of the organization.

display_name

Character. Human-readable name of the organization.

dataset_count

Integer. Number of datasets published by the organization.

Examples

try({
  # Get all organizations with at least 5 datasets
  orgs <- get_organizations(min_count = 5)
  head(orgs)
})
#> INFO [2025-03-23 15:18:13] Retrieving organizations using faceted search
#> SUCCESS [2025-03-23 15:18:13] Found 56 organizations via faceted search
#> # A tibble: 6 × 3
#>   name                                                display_name dataset_count
#>   <chr>                                               <chr>                <int>
#> 1 ministere-de-l-agriculture-des-ressources-hydrauli… Ministère d…           788
#> 2 ministere-des-affaires-culturelles                  Minstère de…           284
#> 3 ministere-industrie                                 Ministère d…           222
#> 4 1kelibia                                            Commune de …            95
#> 5 jammel                                              Commune de …            90
#> 6 enfidha                                             Commune d'E…            87