V
V
vorobyeval2019-10-15 15:02:15
Wiki engines
vorobyeval, 2019-10-15 15:02:15

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 question

Ask a Question

731 491 924 answers to any question