Skip to contents

Fetches datasets by keyword, author and/or organization.

Usage

get_datasets(
  keyword = NULL,
  author = NULL,
  organization = NULL,
  max_results = 100
)

Arguments

keyword

Character. Keyword to search for in dataset titles.

author

Character. Author name to filter datasets by.

organization

Character. Organization name to filter datasets by.

max_results

Numeric. Maximum number of datasets to return, defaults to 100.

Value

A tibble (data frame) with the following columns:

title

Character. Title of the dataset.

id

Character. ID of the dataset.

resources

List. A list of tibbles with the following columns:

name

Character. Name of the dataset.

format

Character. Format of the dataset.

url

Character. URL of the dataset.

created

Date. Date the dataset was created.

Examples

try({
  datasets <- get_datasets("agriculture")
  head(datasets)
})
#> INFO [2025-03-23 15:18:11] Adding keyword filter: agriculture
#> INFO [2025-03-23 15:18:11] Searching for datasets...
#> INFO [2025-03-23 15:18:12] Displaying 100 out of 1035 total datasets
#> # A tibble: 6 × 9
#>   id            title name  author notes organization created modified resources
#>   <chr>         <chr> <chr> <chr>  <chr> <chr>        <chr>   <chr>    <list>   
#> 1 bccf2ae5-80f… Docu… docu… Minis… "Doc… onagri-dept  2025-0… 2025-03… <tibble> 
#> 2 110715c9-86a… List… list… Minis… "Lis… ministere-d… 2025-0… 2025-03… <tibble> 
#> 3 54193e00-934… Evol… evol… CRDA … "Don… ministere-d… 2025-0… 2025-03… <tibble> 
#> 4 0996cd13-f99… Form… form… CRDA … "Lis… ministere-d… 2025-0… 2025-03… <tibble> 
#> 5 92f521b9-533… Evol… evol… TRABE… "Evo… ministere-d… 2025-0… 2025-03… <tibble> 
#> 6 38e6832c-c39… Evol… evol… TRABE… "Evo… ministere-d… 2025-0… 2025-03… <tibble>