tw_check_search | R Documentation |
Mostly used as a convenience function inside other functions to have consistent inputs.
tw_check_search(
search,
type = "item",
language = tidywikidatar::tw_get_language(),
limit = 10,
include_search = FALSE,
wait = 0,
cache = NULL,
overwrite_cache = FALSE,
cache_connection = NULL,
disconnect_db = TRUE
)
search |
A string to be searched in Wikidata |
type |
Defaults to "item". Either "item" or "property". |
language |
Language to be used for the search. Can be set once per session with |
limit |
Maximum numbers of responses to be given. |
include_search |
Logical, defaults to FALSE. If TRUE, the search is returned as an additional column. |
wait |
In seconds, defaults to 0. Time to wait between queries to Wikidata. If data are cached locally, wait time is not applied. If you are running many queries systematically you may want to add some waiting time between queries. |
cache |
Defaults to NULL. If given, it should be given either TRUE or FALSE. Typically set with |
overwrite_cache |
Defaults to FALSE. If TRUE, overwrites cache. |
cache_connection |
Defaults to NULL. If NULL, and caching is enabled, |
disconnect_db |
Defaults to TRUE. If FALSE, leaves the connection to cache open. |
A data frame with three columns, id
, label
, and description
, filtered by the above criteria.
# The following two lines should give the same result.
tw_check_search("Sylvia Pankhurst")
tw_check_search(tw_search("Sylvia Pankhurst"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.