Closed lvaudor closed 10 months ago
@lvaudor an spq_prefix()
call is missing in the reprex, correct?
ah, no, I've added schema to my usual prefixes in the meantime so that's not the reason
@lvaudor it's not a glitter bug :tada: the article thing is not a string so one needs to convert it first:
library("glitter")
flood_id = "wd:Q101569184"
spq_init() %>%
spq_set(flood = flood_id) %>%
spq_add("?article schema:about ?flood") %>%
spq_mutate(article = as.character(article)) %>%
spq_filter(str_detect(article, "wikipedia")) %>%
spq_perform()
#> # A tibble: 1 × 2
#> flood article
#> <chr> <chr>
#> 1 http://www.wikidata.org/entity/Q101569184 https://es.wikipedia.org/wiki/Inund…
Created on 2023-12-21 with reprex v2.0.2
Why does it return nothing?
The same query without spq_filter DOES return an article containing "wikipedia".