View source: R/tw_get_all_with_p.R
| tw_get_all_with_p | R Documentation |
This function does not cache results.
tw_get_all_with_p(
p,
fields = c("item", "itemLabel", "itemDescription"),
language = tidywikidatar::tw_get_language(),
method = "SPARQL",
wait = 0.1,
limit = Inf,
return_as_tw_search = TRUE,
user_agent = tidywikidatar::tw_get_user_agent()
)
p |
A character vector, a property. Must always start with the capital letter "P", e.g. "P31" for "instance of". |
fields |
A character vector of Wikidata fields. Ignored if
|
language |
Defaults to language set with |
method |
Defaults to "SPARQL". The only accepted alternative value is "JSON", to use instead json-based API. |
wait |
Defaults to 0.1. Used only in method is set to "JSON". |
limit |
Defaults to |
return_as_tw_search |
Logical, defaults to |
user_agent |
Defaults to a combination of |
A data frame with three columns is method is set to "SPARQL", or as
many columns as fields if more are given and return_as_tw_search is set
to FALSE. A single column with Wikidata identifier if method is set to
"JSON".
if (interactive()) {
# get all Wikidata items with an ICAO airport code ("P239")
tw_get_all_with_p(p = "P239", limit = 10)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.