Skip to content

Instantly share code, notes, and snippets.

@RicSwirrl
Created September 28, 2011 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RicSwirrl/1249100 to your computer and use it in GitHub Desktop.
Save RicSwirrl/1249100 to your computer and use it in GitHub Desktop.
SPARQL query for LSOA data
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?lsoa ?notation ?label ?lat ?long ?score
WHERE {
GRAPH <http://opendatacommunities.org/id/graph/geography/lsoa> {
?lsoa a <http://opendatacommunities.org/def/geography#LSOA> .
?lsoa geo:lat ?lat .
?lsoa geo:long ?long .
?lsoa <http://www.w3.org/2004/02/skos/core#notation> ?notation .
?lsoa rdfs:label ?label .
}
GRAPH <http://opendatacommunities.org/id/graph/IMD/2010/IMD-score> {
?obs <http://purl.org/linked-data/sdmx/2009/dimension#refArea> ?lsoa .
?obs <http://opendatacommunities.org/def/IMD#IMD-score> ?score .
}
FILTER ( ?lat >= 53.4 && ?lat < 53.5 &&
?long >= -2.3 && ?long < -2.2 ) .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment