Skip to content

Instantly share code, notes, and snippets.

@niklas88
Last active October 17, 2017 13:34
Show Gist options
  • Save niklas88/f759d5a34cbb1e46cdb526fc94f0c306 to your computer and use it in GitHub Desktop.
Save niklas88/f759d5a34cbb1e46cdb526fc94f0c306 to your computer and use it in GitHub Desktop.
PREFIX fb: <http://rdf.freebase.com/ns/>
SELECT DISTINCT ?cityname ?countryname ?popcount ?latitude ?longitude WHERE {
?citytype fb:type.object.name "City/Town/Village"@en .
?city fb:type.object.type ?citytype .
?city fb:type.object.name ?cityname .
?city fb:location.location.containedby ?country .
?city fb:location.statistical_region.population ?population .
?population fb:measurement_unit.dated_integer.number ?popcount .
?city fb:location.location.geolocation ?geolocation .
?geolocation fb:location.geocode.latitude ?latitude .
?geolocation fb:location.geocode.longitude ?longitude .
?country fb:type.object.name ?countryname .
?country fb:type.object.type ?countrytype .
?countrytype fb:type.object.name "Country"@en .
}
LIMIT 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment