catalog_search: Search catalog

View source: R/catalog_entries.R

catalog_searchR Documentation

Description

Search catalog

Usage

catalog_search(
  options = list(sk = NULL, from = NULL, to = NULL, country = NULL, collection = NULL,
    created = NULL, dtype = NULL),
  page = 0,
  ps = 50,
  sort_by = NULL,
  sort_order = NULL,
  api_key = NULL,
  api_base_url = NULL
)

Arguments

options

- Search options:

  • sk - Keywords

  • from - Year from

  • to | Year to

  • country | Country names or codes. To search for multiple countries, use pipe (|) to separate them e.g. Albania|Turkey

  • collection - Filter by one or more collections. e.g. 'collection1, collection2'

  • created - Filter by date of creation. Use date format YYYY-MM-DD. For example, '2020/04/01' returns rows created on and after the date. To specify a date range, use 2020/04/01-2020/04/15

  • dtype - Data access types ('open', 'direct', 'public', 'licensed', 'remote'). For multiple values, use comma e.g. 'open,direct'

page

Page

ps

Page size (number of rows per page)

sort_by

Sort results by field, support fields are 'title','year','nation'

sort_order

Sort results order, valid options are 'asc', 'desc'

Value

list

Examples


#example - keywords search

catalog_search (
  options=list(
    sk="health survey"
  ),
  ps=1000
)

#example - keywords search + filter by country and collection

catalog_search (
  options=list(
    sk="health survey",
    country="albania|afghanistan",
    collection="dhs"
  ),
  ps=1000
)





mah0001/nadar documentation built on March 30, 2024, 2:44 a.m.