Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save northernjamie/2023ba13af828a3962379baac097a57b to your computer and use it in GitHub Desktop.
Save northernjamie/2023ba13af828a3962379baac097a57b to your computer and use it in GitHub Desktop.
SPARQL query for getting rough sleepers data out of OpenDataCommunities
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?value ?areaname ?GSScode ?year ?s ?areacode ?yearcode
WHERE { ?s ?p <http://opendatacommunities.org/data/homelessness/rough-sleeping/count> ;
<http://opendatacommunities.org/def/ontology/time/refPeriod> ?yearcode ;
<http://opendatacommunities.org/def/ontology/homelessness/roughSleepingObs> ?value ;
<http://opendatacommunities.org/def/ontology/geography/refArea> ?areacode .
?areacode rdfs:label ?areaname ;
<http://www.w3.org/2004/02/skos/core#notation> ?GSScode ;
<http://publishmydata.com/def/ontology/spatial/memberOf> <http://opendatacommunities.org/def/geography/collection/english-lower-tier-authorities> .
?yearcode rdfs:label ?year .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment