Filters the City of Vancouver Open Data catalogue for datasets whose title, dataset ID, keyword, or search-term fields match `search_term` (using `grepl()`, so regular expressions are supported). When no exact match is found, a fuzzy-match hint list of similarly named datasets is printed.

search_cov_datasets(
  search_term,
  trim = TRUE,
  apikey = getOption("VancouverOpenDataApiKey"),
  refresh = FALSE
)

Arguments

search_term

A grep-compatible string to search through dataset titles, IDs, keywords, and search terms

trim

Remove columns that are entirely `NA`, default `TRUE`

apikey

the CoV open data API key, optional

refresh

Bypass the session cache and re-download, default `FALSE`

Value

A tibble with one row per matching dataset, in the same format as [list_cov_datasets()].

See also

[list_cov_datasets()] to retrieve the full catalogue, [get_cov_data()] to download a specific dataset

Examples

if (FALSE) { # \dontrun{
# Search using a plain string
search_cov_datasets("trees")

# Search using a regular expression
search_cov_datasets("parking.*(2019|2020)")
} # }