| spq_set | R Documentation | 
Set helper values for the query (helps with readability)
spq_set(.query, ...)
.query | 
 query  | 
... | 
 Helper values and their definition.  | 
A query object
# find the individuals of the species
spq_init() %>%
# dog, cat or chicken
spq_set(species = c('wd:Q144','wd:Q146', 'wd:Q780'), mayorcode = "wd:Q30185") %>%
spq_filter(mayor == wdt::P31(species)) %>%
spq_add("?mayor p:P39 ?node") %>%
# of mayor
spq_add("?node ps:P39 ?mayorcode") %>%
# of some places
spq_add("?node pq:P642 ?place") %>%
spq_label(species, mayor, place) %>%
spq_select(-species, -place, -node, -mayor, -mayorcode) %>%
spq_perform()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.