Sparql Endpoint

Linked data is a method for publishing structured data using vocabularies like schema.org that can be connected together and interpreted by machines. Using linked data, statements encoded in triples can be spread across different websites.

In computing linked data describes a method of publishing and linking data coming from heterogeneous data sources that can be interlinked and shared.

Linked Data builds upon standard Web technologies such as HTTP and URIs, but rather than using them to serve web pages for human readers, it extends them to share information in a way that can be read automatically by computers. This enables data from different sources to be connected and queried.

Queries over linked data are made using a semantic query language called SPARQL that allows to retrieve and manipulate data stored in Resource Description Framework (RDF) format.

Examples

All measure station on the Region with information about localization and network

Run Query

select  distinct ?stazione ?label ?placeLabel ?localita ?reteLabel

from <http://dati.lazio.it/lod/ambiente/> where {?stazione a <http://www.w3.org/ns/sosa/Platform>; rdfs:label ?label;

<http://www.w3.org/2006/vcard/ns#locality> ?localita;

<http://www.geonames.org/ontology#locatedIn> ?place; <http://purl.org/dc/terms/isPartOf> ?rete.

?place rdfs:label ?placeLabel.

?rete rdfs:label ?reteLabel.

  } order by ?stazione

All measure station near Fiumicino

Run Query

select  distinct *

from <http://dati.lazio.it/lod/ambiente/> where {?stazione a <http://www.w3.org/ns/sosa/Platform>; rdfs:label ?label;

<http://www.w3.org/2006/vcard/ns#locality> ?localita; <http://www.geonames.org/ontology#locatedIn> ?place.

?place rdfs:label ?placeLabel.

filter (regex(str(?placeLabel), 'fiumicino','i'))

}

All measure station with observable property

Run Query

select  distinct ?stazione ?label ?placeLabel ?localita ?reteLabel ?labelGrandezza

from <http://dati.lazio.it/lod/ambiente/> where {?stazione a <http://www.w3.org/ns/sosa/Platform>; rdfs:label ?label;

<http://www.w3.org/2006/vcard/ns#locality> ?localita;

<http://www.geonames.org/ontology#locatedIn> ?place; <http://purl.org/dc/terms/isPartOf> ?rete.

?place rdfs:label ?placeLabel.

?rete rdfs:label ?reteLabel.

?grandezza <http://www.w3.org/ns/sosa/isHostedBy> ?stazione; rdfs:label ?labelGrandezza.} 

order by ?stazione

Data about hydrometric level

Run Query

select  distinct ?stazione ?label ?localita ?labelSensor ?sensor ?labelObsProp ?observation ?value ?unitMeasure ?dataRil

from <http://dati.lazio.it/lod/ambiente/> where {?stazione a <http://www.w3.org/ns/sosa/Platform>; rdfs:label ?label;

<http://www.w3.org/2006/vcard/ns#locality> ?localita; <http://www.geonames.org/ontology#locatedIn> ?place.

?place rdfs:label ?placeLabel.

?sensor <http://www.w3.org/ns/sosa/isHostedBy> ?stazione; rdfs:label ?labelSensor.

?sensor <http://www.w3.org/ns/sosa/observes> ?obsProp.

?obsProp rdfs:label ?labelObsProp; <http://qudt.org/1.1/schema/qudt#unit> ?unitMeasure.

?observation <http://www.w3.org/ns/sosa/observedProperty> ?obsProp; <http://www.w3.org/ns/sosa/hasSimpleResult> ?value; <http://www.w3.org/ns/sosa/resultTime> ?dataRil; <http://schema.org/isRelatedTo> ?stazione

filter (?placeLabel = 'Roma')

filter (regex(str(?labelSensor),'idrometro','i'))

filter (regex(str(?labelObsProp),'Livello idrometrico giornaliero','i'))

filter ( str(?dataRil) >= '2020-05-11' AND str(?dataRil) <= '2020-05-18').

#filter (?stazione = <http://10.2.61.217/lod/station/pc_419600>)

}

order by ?dataRil