The SPARQL endpoint for transport data is available at http://gov.tso.co.uk/transport/sparql.
PREFIX naptan: <http://transport.data.gov.uk/def/naptan/>
SELECT ?stop WHERE {
?stop a naptan:StopPoint;
naptan:town "LIVERPOOL";
naptan:street "SCOTLAND ROAD" .
}
LIMIT 1
PREFIX naptan: <http://transport.data.gov.uk/def/naptan/>
SELECT DISTINCT * WHERE {
?stop naptan:administrativeArea <http://transport.data.gov.uk/id/administrative-area/104> ;
naptan:street ?street ;
naptan:naptanCode ?code
}
ORDER BY ?street
LIMIT 100
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX naptan: <http://transport.data.gov.uk/def/naptan/>
SELECT * WHERE {
?stop naptan:indicator "Boad Street";
a naptan:HailAndRideBusStop ;
geo:lat ?lat;
geo:long ?long
}
LIMIT 1
PREFIX naptan: <http://transport.data.gov.uk/def/naptan/>
SELECT distinct * WHERE {
?stop a naptan:OnStreetStopPoint;
naptan:street "Northfield Road";
naptan:naptanCode ?code.
}
LIMIT 15
PREFIX naptan: <http://transport.data.gov.uk/def/naptan/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT distinct * WHERE {
?stop a naptan:OnStreetStopPoint;
naptan:naptanCode ?code;
naptan:administrativeArea ?administrativeArea .
?administrativeArea skos:prefLabel "Norfolk".
}
LIMIT 10
PREFIX naptan: <http://transport.data.gov.uk/def/naptan/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT distinct ?stop ?naptanCode WHERE {
?stop a naptan:CustomBusStop;
naptan:naptanCode ?naptanCode;
naptan:stopValidity ?stopValidity;
naptan:street "Kingswood Road".
?stopValidity naptan:stopStatus ?stopStatus.
?stopStatus skos:prefLabel "Active"@en.
}
PREFIX naptan: <http://transport.data.gov.uk/def/naptan/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT distinct * WHERE {
?stop a naptan:FerryStopPoint;
naptan:nptgLocality ?nptgLocality.
?nptgLocality skos:prefLabel "Liverpool"@en.
}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX traffic: <http://transport.data.gov.uk/def/traffic/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select distinct ?vehicle_type ?val where {
?s traffic:countPointNumber "966943"^^<http://transport.data.gov.uk/def/traffic/CountPointNumber>;
traffic:countPointCount ?countPointCount .
?countPointCount traffic:roadCount ?count .
?count traffic:observation ?vehicle_type .
?vehicle_type rdf:value ?val.
}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX traffic: <http://transport.data.gov.uk/def/traffic/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select distinct ?vehicle_type ?val where {
?s traffic:roadCategory ?roadCategory;
traffic:countPointCount ?countPointCount .
?roadCategory skos:prefLabel "Motorway"@en .
?countPointCount traffic:roadCount ?count .
?count traffic:observation ?vehicle_type .
?vehicle_type rdf:value ?val.
}
ORDER BY ?vehicle_type
LIMIT 13
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX traffic: <http://transport.data.gov.uk/def/traffic/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select distinct ?vehicle_type ?val where {
?s traffic:roadName "The Street"@en;
traffic:countPointCount ?countPointCount .
?roadCategory skos:prefLabel "Motorway"@en .
?countPointCount traffic:roadCount ?count .
?count traffic:observation ?vehicle_type .
?vehicle_type rdf:value ?val.
}
ORDER BY ?vehicle_type
LIMIT 13
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX traffic: <http://transport.data.gov.uk/def/traffic/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select distinct ?vehicle_type ?val where {
?s traffic:districtRegion ?districtRegion;
traffic:countPointCount ?countPointCount .
?districtRegion rdfs:label "East Midlands"@en .
?countPointCount traffic:roadCount ?count .
?count traffic:observation ?vehicle_type .
?vehicle_type rdf:value ?val.
}
ORDER BY ?vehicle_type
LIMIT 13
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX traffic: <http://transport.data.gov.uk/def/traffic/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix area: <http://statistics.data.gov.uk/def/administrative-geography/>
select distinct ?vehicle_type ?val where {
?s area:localAuthority ?localAuthority;
traffic:countPointCount ?countPointCount .
?localAuthority rdfs:label "East Sussex County Council"@en .
?countPointCount traffic:roadCount ?count .
?count traffic:observation ?vehicle_type .
?vehicle_type rdf:value ?val.
}
ORDER BY ?vehicle_type
LIMIT 13
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX traffic: <http://transport.data.gov.uk/def/traffic/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
select distinct ?vehicle_type ?val where {
?s spatialrelations:northing "118410"^^<http://www.w3.org/2001/XMLSchema#integer> ;
spatialrelations:easting "577880"^^<http://www.w3.org/2001/XMLSchema#integer> ;
traffic:countPointCount ?countPointCount .
?countPointCount traffic:roadCount ?count .
?count traffic:observation ?vehicle_type .
?vehicle_type rdf:value ?val.
}
ORDER BY ?vehicle_type
LIMIT 13
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX traffic: <http://transport.data.gov.uk/def/traffic/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX spatialPos: <http://www.w3.org/2003/01/geo/wgs84_pos#>
select distinct ?vehicle_type ?val where {
?s spatialPos:lat "50.937695" ;
spatialPos:long "0.530364" ;
traffic:countPointCount ?countPointCount .
?countPointCount traffic:roadCount ?count .
?count traffic:observation ?vehicle_type .
?vehicle_type rdf:value ?val.
}
ORDER BY ?vehicle_type
LIMIT 13