next
previous
items

Data table via SPARQL

Urban audit cities with lat/long

Data table via SPARQL Published 11 Sep 2012 Last modified 25 Jan 2023
Not all cities have population numbers in DBPedia

Download this dataset

Dataset preview

(Live Query)

cityname countryname latlong population

Received 0 rows in 0.001 seconds.


https://www.eea.europa.eu/data-and-maps/daviz/eionet/data/local-sparql-queries/urban-audit-cities-with-lat-long/daviz.json

For system integrators

The following info can be used by a system developer / database administrator in order to retrieve this dataset programmatically over the web using a SPARQL client.

Are you new to Linked Data technology? visit http://linkeddata.org



http://semantic.eea.europa.eu/sparql

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://eurostat.linked-statistics.org/property#>
PREFIX wgs84: <http://www.w3.org/2003/01/geo/wgs84_pos#>

SELECT sql:sample(?cityname) AS ?cityname
  sql:sample(?countryname) AS ?countryname
  concat(str(sql:sample(?lat)),',',str(sql:sample(?long))) AS ?latlong
  sql:sample(?population) AS ?population

WHERE {
  ?cityurl  skos:inScheme <http://eurostat.linked-statistics.org/dic/cities>;
            a skos:Concept ;
            p:inCountry ?country;
            rdfs:label ?cityname.
  ?country rdfs:label ?countryname .
  ?cityurl skos:exactMatch ?dbpedia .
 ?dbpedia wgs84:lat ?lat;
          wgs84:long ?long;
          <http://dbpedia.org/ontology/populationTotal> ?population
} GROUP BY ?cityurl ?countryname
 ORDER BY ?countryname


Permalinks

Document Actions