Skip to content

Commit

Permalink
Add sensor platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Aug 21, 2024
1 parent 4a88344 commit 08b873a
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .ogc/catalog.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

_:ad4gd-pilot3 a dcat:Catalog;
dct:title "AD4GD Pilot 3 semantic catalog" ;
dcat:dataset _:properties, _:propertiesEntailments, _:procedures, _:sensors, _:manufacturers ;
dcat:dataset _:properties, _:propertiesEntailments, _:procedures, _:sensors, _:manufacturers, _:platforms ;
dcfg:hasProfileSource "sparql:http://defs-dev.opengis.net/fuseki/query" ;
dcfg:ignoreProfileArtifactErrors true ;
.
Expand Down Expand Up @@ -47,6 +47,15 @@ _:manufacturers a dcat:Dataset, dcfg:UpliftConfiguration ;
] ;
.

_:platforms a dcat:Dataset, dcfg:UpliftConfiguration ;
dct:description "Sensor platforms uplift" ;
dcfg:glob "generic/sensor-platforms.yml" ;
dcfg:hasUpliftDefinition [
dcfg:order 1 ;
dcfg:file "generic/uplift/sensor-platforms-uplift.yml" ;
] ;
.


_:propertiesEntailments a dcat:Dataset, dcfg:DomainConfiguration ;
dct:description "Properties entailments" ;
Expand Down
72 changes: 72 additions & 0 deletions generic/sensor-platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
base: https://w3id.org/ad4gd/air-quality/sensor-platforms # Base URI (no trailing slash!)
label: AD4GD air quality sensor platforms # Label for collection
## Optional: add description
# description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.

platforms:

## Format for sensor platforms:
# id: # URI slug
# label: Label for the term # Required
# manufacturers: # List of manufacturers (omit if unknown or "various")
# - manufacturer1 # refers to the key for the manufacturer entry in sensor-manufacturers.yml
# sensors: # Required
# - sensor1 # refers to the key for the sensor entry in sensors.yml
# description: Term description # Optional
# sameAs: # List of "same as" URIs, optional
# - https://another.vocabulary.com/another/term
# references: # List of websites with definitions, data sheets, etc. (non-semantic)
# - https://en.wikipedia.org/wiki/Term

AirRohr:
name: AirRohr
manufacturers:
- Sensor.Community
description: |
Build your DIY sensor and become part of the worldwide, opendata & civictech network. With airRohr you can measure air pollution yourself.
From: https://sensor.community/en/sensors/airrohr/
sensors:
- SDS011
- BME280
references:
- https://sensor.community/en/sensors/airrohr/
- https://nettigo.eu/products/sensor-community-kit-sds011-bme280-english-language-harness-cable-edition

PlumeFlow2:
name: PlumeFlow2
manufacturers:
- plume-labs
description: |
The Plume Labs Flow 2 is a wearable air quality sensor that provides real-time measurements of particulate matter (PM1.0, PM2.5 and PM­10) mass concentrations, VOC and NO2 concentrations. Data can be visualized and exported using the phone application for Android and iPhone via Bluetooth.
We created Flow to answer a question: “what is in the air I breathe.” In the spring of 2023 we made the tough decision to dedicate this knowledge, system, and tech to advancing research, raising awareness, and fostering action. As a result Flow and Flow 2 are no longer for sale.
From: https://www.aqmd.gov/aq-spec/sensordetail/plume-labs---flow-2
sensors:
- SDS011
- PlumeFlow2TH
- PlumeFlow2VOC
- PlumeFlow2CO2
references:
- https://plumelabs.com/en/flow/
- https://www.aqmd.gov/aq-spec/sensordetail/plume-labs---flow-2

Zephyr:
name: Zephyr
manufacturers:
- earthsense
description: |
The Zephyr® is an award-winning, certified, indicative ambient air quality monitor that accurately measures harmful gases and particle matter.
Zephyr® monitors provide detailed air quality measurements in real-time to help identify pollution hotspots at a localised level such as busy road junctions. Extensive networks can be easily deployed for city-wide pollution data used to aid the development of smarter and cleaner towns and cities.
From: https://www.earthsense.co.uk/_files/ugd/847642_d42371301be448bab9ee526499e1e0bb.pdf
sensors:
- ZephyrTH
- ZephyrP
- ZephyrPM
- ZephyrVOC
- ZephyrCO
- ZephyrNO
- ZephyrO3
- ZephyrSO2
- ZephyrH2S
references:
- https://www.earthsense.co.uk/zephyr
- https://www.earthsense.co.uk/_files/ugd/847642_d42371301be448bab9ee526499e1e0bb.pdf
73 changes: 73 additions & 0 deletions generic/uplift/sensor-platforms-uplift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
transform:
# Create concept scheme
# Flatten object to array with "key" property
# Map properties to IRIs
# Remove empty values
# TODO: rest of known properties
- |
def to_iri: gsub(" "; "-") | gsub("[^A-Za-z0-9_-]"; "") ;
(.base | sub("/+$"; "")) as $BASE
| .platforms |= [ to_entries | .[] |
.value + { "@id": "\($BASE)/\(.key | to_iri)", "rdfs:subClassOf": "sosa:Platform" }
| (.manufacturers |= (if type == "array" then map("manuf:\(to_iri)") else null end))
| (.sensors |= (if type == "array" then map("sensor:\(to_iri)") else null end))
| del(..|select(. == ""))
]
| ."dct:source" = { "@id": "https://ad4gd.eu/" }
types:
$: skos:ConceptScheme
$.platforms[*]: skos:Concept

context:
$:
# TODO: URIs
'@base': https://w3id.org/ad4gd/sensor-platforms/
manuf: https://w3id.org/ad4gd/manufacturers/
sensor: https://w3id.org/ad4gd/sensors/
sosa: http://www.w3.org/ns/sosa/
ssn: http://www.w3.org/ns/ssn/
dct: http://purl.org/dc/terms/
rdfs: http://www.w3.org/2000/01/rdf-schema#
skos: http://www.w3.org/2004/02/skos/core#
owl: http://www.w3.org/2002/07/owl#
qudt: http://qudt.org/schema/qudt/
unit: http://qudt.org/vocab/unit/
qb: http://purl.org/linked-data/cube#
ad4gd-prop: https://w3id.org/ad4gd/properties/
ad4gd-procedure: https://w3id.org/ad4gd/procedures/
sdo: https://schema.org/
ad4gd: 'urn:ad4gd:'
base: '@id'
key: '@id'
platforms:
'@reverse': skos:inScheme
subClassOf:
'@id': rdfs:subClassOf
'@type': '@id'
observed_properties:
'@id': sosa:observes
'@type': '@id'
'@context':
'@base': https://w3id.org/ad4gd/properties/
name: skos:prefLabel
label: skos:prefLabel
description: dct:description
references:
'@id': rdfs:seeAlso
'@type': '@id'
hasUnit:
'@id': qudt:hasUnit
'@type': '@id'
broader:
'@id': skos:broader
'@type': '@id'
procedures:
'@id': ssn:implements
'@type': '@id'
manufacturers:
'@id': sdo:manufacturer
'@type': '@id'
sensors:
'@id': sosa:hosts
'@type': '@id'

0 comments on commit 08b873a

Please sign in to comment.