When working on "combined queries" I often need to replace URIs with their abbreviated versions for use in spq_set().
For instance, I run a first query that returns a list of countries, such as:
Would that be possible to modify spq_set() so that it works with both "wd:Q142" and full URI ""http://www.wikidata.org/entity/Q142"" (and make that use of stringr::str_replace useless)?
When working on "combined queries" I often need to replace URIs with their abbreviated versions for use in spq_set(). For instance, I run a first query that returns a list of countries, such as:
country_id="http://www.wikidata.org/wiki/Q142"
Then I want to run a query to get the coordinates of each country, and to do that I define a function:
Would that be possible to modify spq_set() so that it works with both "wd:Q142" and full URI ""http://www.wikidata.org/entity/Q142"" (and make that use of stringr::str_replace useless)?