Description Usage Arguments Value Examples
api_request
wrapper. Search for a dataset in the Mexico City's Open Data catalog
that matches the specified query. This function can print and/or return the
search results (see verbose
and return
).
1 2 | search_dataset(query, exclude_args = NULL, nresults = 9999L,
verbose = TRUE, return = TRUE)
|
query |
A |
exclude_args |
A |
nresults |
An |
verbose |
|
return |
|
If return == True
, this function returns a data frame containing the search results.
Each row will contain the id, title, description, publisher, and size of the dataset that matched
the search query. If verbose == True
, this function will also print the search results into the console.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Search for all datasets matching the query 'metro'
## Not run:
search_results <- search_dataset(query = "metro", verbose = TRUE, return = TRUE)
## End(Not run)
## Search for all datasets matching the query 'metro', but exclude datasets with id = 'estaciones-metro'
## Not run:
exclude <- "estaciones-metro"
names(exclude) <- "datasetid"
search_results <- search_dataset(query = "metro", verbose = TRUE, return = TRUE, exclude_args = exclude)
## End(Not run)
## Search for all datasets matching the query 'metro', but don't print the results
## Not run:
search_results <- search_dataset(query = "metro", verbose = FALSE, return = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.