spq_label | R Documentation |
Label variables
spq_label(
.query,
...,
.required = FALSE,
.languages = getOption("glitter.lang", "en$"),
.overwrite = FALSE
)
.query |
a list with elements of the query |
... |
variables by which to arrange
(or SPARQL strings escaped with |
.required |
whether the existence of a value for the triple is required or not (defaults to TRUE). If set to FALSE, then other triples in the query are returned even if this particular triple is missing) |
.languages |
Languages for which to query labels. Use |
.overwrite |
whether to replace variables with their labels.
|
spq_label()
uses the property:
associated with the usual endpoint see usual_endpoints
the property indicated in spq_endpoint_info()
A query object
spq_init() %>% spq_add("?mayor wdt:P31 ?species") %>% # dog, cat or chicken spq_set(species = c('wd:Q144','wd:Q146', 'wd:Q780')) %>% # who occupy the function spq_add("?mayor p:P39 ?node") %>% # of mayor spq_add("?node ps:P39 wd:Q30185") %>% # of some places spq_add("?node pq:P642 ?place") %>% spq_label(mayor, place, .languages = c("fr", "en", "de")) %>% spq_perform()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.