Answer the question
In order to leave comments, you need to log in
How to get the population of a city in Wikidata?
It is necessary to send the name of the city and its region via the API and in response receive the population taking into account the region. I can't figure out how else to add a region query to sparql looks like this so far
SELECT ?item ?city ?region ?population WHERE {
?item wdt:P17 wd:Q159;
wdt:P1082 ?population;
rdfs:label ?city.
FILTER(LANGMATCHES(LANG(?city), "ru"))
FILTER
(CONTAINS(?city, "Volochaevka"))
}
LIMIT
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question