From e2c064ef9da0e8833c19ac7406230ab045e24dfa Mon Sep 17 00:00:00 2001
From: Cassia Trojahn <cassia.trojahn@irit.fr>
Date: Sun, 18 Jun 2023 10:03:43 +0200
Subject: [PATCH] Version 1.0

---
 .../synop_feb_2022_instantiation.ttl          | 189 ++++++++++++++++++
 sparql/CQA_SPARQL                             | 160 +++++++++++++++
 2 files changed, 349 insertions(+)
 create mode 100644 instantiation/synop_feb_2022_instantiation.ttl
 create mode 100644 sparql/CQA_SPARQL

diff --git a/instantiation/synop_feb_2022_instantiation.ttl b/instantiation/synop_feb_2022_instantiation.ttl
new file mode 100644
index 0000000..6a7ff3d
--- /dev/null
+++ b/instantiation/synop_feb_2022_instantiation.ttl
@@ -0,0 +1,189 @@
+@prefix : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#> .
+@prefix dc: <http://purl.org/dc/elements/1.1/> .
+@prefix ns1: <http://www.w3.org/2006/vcard/ns#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix xml: <http://www.w3.org/XML/1998/namespace> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix qb: <http://purl.org/linked-data/cube#> .
+@prefix geodcatap: <http://data.europa.eu/930/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix qudt: <http://qudt.org/1.1/vocab/unit> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
+@prefix qb4st: <http://www.w3.org/ns/qb4st/> .
+@prefix dct: <http://purl.org/dc/terms/> .
+@prefix dmo: <https://https://w3id.org/dmo#> .
+@prefix dmo-synop: <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#> .
+@base <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#> .
+
+<https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#> rdf:type owl:Ontology ;
+owl:imports <https://www.irit.fr/recherches/MELODI/ontologies/core/dmo-synop> .
+
+#################################################################
+#    Annotation properties
+#################################################################
+
+###  http://purl.org/dc/terms/provenance
+dct:provenance rdf:type owl:AnnotationProperty .
+
+
+#################################################################
+#    Individuals
+#################################################################
+
+###  https://meteofrance.com
+<https://meteofrance.com> rdf:type owl:NamedIndividual .
+
+
+###  https://donneespubliques.meteofrance.fr/?fond=donnee_libre&prefixe=Txt%2FSynop%2FArchive%2Fsynop&extension=csv.gz&date=202002
+<https://donneespubliques.meteofrance.fr/?fond=donnee_libre&prefixe=Txt%2FSynop%2FArchive%2Fsynop&extension=csv.gz&date=202002> rdf:type owl:NamedIndividual .
+
+
+###  https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=90&id_rubrique=32
+<https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=90&id_rubrique=32> rdf:type owl:NamedIndividual .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#DeciHour
+dmo-synop:DeciHour rdf:type owl:NamedIndividual ,
+                           <http://qudt.org/schema/qudt#TimeUnit> ;
+                  <http://qudt.org/schema/qudt#conversionMultiplier> "0.1"^^xsd:double ;
+                  <http://qudt.org/schema/qudt#conversionOffset> "0.0"^^xsd:double ;
+                  <http://qudt.org/schema/qudt#literal> "decihour"^^xsd:string ;
+                  <http://qudt.org/schema/qudt#symbol> "dh"^^xsd:string ;
+                  rdfs:label "Decihour"^^xsd:string .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#Octa
+dmo-synop:Octa rdf:type owl:NamedIndividual ,
+                       <http://qudt.org/schema/qudt#Unit> ;
+              <http://qudt.org/schema/qudt#abbreviation> "Octa"^^xsd:string ;
+              <http://qudt.org/schema/qudt#conversionMultiplier> "1.0"^^xsd:double ;
+              <http://qudt.org/schema/qudt#conversionOffset> "0.0"^^xsd:double ;
+              <http://qudt.org/schema/qudt#symbol> "Octa"^^xsd:string ;
+              rdfs:label "Octa"@fr ,
+                         "Okta"@en ;
+              skos:definition "In meteorology, an okta is a unit of measurement used to describe the amount of cloud cover at any given location such as a weather station. Sky conditions are estimated in terms of how many eighths of the sky are covered in cloud, ranging from 0 oktas (completely clear sky) through to 8 oktas (completely overcast). In addition, in the SYNOP code there is an extra cloud cover indicator '9' indicating that the sky is totally obscured (i.e. hidden from view), usually due to dense fog or heavy snow."@en ,
+                              "unité de mesure utilisée en météorologie, évaluant la couverture nuageuse du ciel."@fr .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#SquareMeterPerSquareSecond
+dmo-synop:SquareMeterPerSquareSecond rdf:type owl:NamedIndividual ;
+                                    <http://qudt.org/schema/qudt#abbreviation> "m^2 s^-2"^^xsd:string ;
+                                    <http://qudt.org/schema/qudt#conversionMultiplier> "1.0"^^xsd:double ;
+                                    <http://qudt.org/schema/qudt#conversionOffset> "0.0"^^xsd:double ;
+                                    <http://qudt.org/schema/qudt#symbol> "m^2 s^-2"^^xsd:string ;
+                                    rdfs:label "SquareMeterPerSquareSecond"^^xsd:string .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#meteo_france
+dmo-synop:meteo_france rdf:type owl:NamedIndividual ,
+                               ns1:Organization ,
+                               prov:Agent ,
+                               foaf:Agent ;
+                      ns1:hasAddress dmo-synop:meteo_france_address ;
+                      ns1:hasEmail <mailto:contactmail@meteo.fr> ;
+                      ns1:hasURL <https://meteofrance.com> ;
+                      ns1:fn "Météo-France"^^xsd:string .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#meteo_france_address
+dmo-synop:meteo_france_address rdf:type owl:NamedIndividual ,
+                                       ns1:Address ;
+                              ns1:country-name "France"^^xsd:string ;
+                              ns1:locality "SAINT-MANDE Cedex"^^xsd:string ;
+                              ns1:postal-code "94165"^^xsd:string ;
+                              ns1:street-address "73 Avenue de Paris"^^xsd:string .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#station_dataset
+dmo-synop:station_dataset rdf:type owl:NamedIndividual ,
+                                  dcat:Dataset .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#synop_dataset
+dmo-synop:synop_dataset rdf:type owl:NamedIndividual ,
+                                qb:DataSet ;
+                       qb:slice dmo-synop:synop_dataset_feb20 ;
+                       dct:description "Données d'observations issues des messages internationaux d’observation en surface (SYNOP) circulant sur le système mondial de télécommunication (SMT) de l’Organisation Météorologique Mondiale (OMM). Paramètres atmosphériques mesurés (température, humidité, direction et force du vent, pression atmosphérique, hauteur de précipitations) ou observés (temps sensible, description des nuages, visibilité) depuis la surface terrestre. Selon instrumentation et spécificités locales, d'autres paramètres peuvent être disponibles (hauteur de neige, état du sol, etc.)"@fr ,
+                                         "Observation data from international surface observation messages (SYNOP) circulating on the global telecommunications system (GTS) of the World Meteorological Organization (WMO). Atmospheric parameters measured (temperature, humidity, wind direction and force, atmospheric pressure, amount of precipitation) or observed (sensitive weather, description of clouds, visibility) from the earth's surface. Depending on the instrumentation and local specificities, other parameters may be available (snow depth, ground condition, etc.)"@en .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#synop_dataset_feb20
+dmo-synop:synop_dataset_feb20 rdf:type owl:NamedIndividual ,
+                                      dmo:DatasetSlice ;
+                             qb:sliceStructure dmo-synop:synop_dataset_structure;
+                             geodcatap:custodian dmo-synop:meteo_france ;
+                             dcat:contactPoint dmo-synop:meteo_france ;
+                             dcat:distribution dmo-synop:synop_distribution_feb20 ;
+                             dmo:requires dmo-synop:station_dataset ;
+                             dcat:keyword "direction du vent"@fr ,
+                                          "données Synop"@fr ,
+                                          "humidité"@fr ,
+                                          "température"@fr ,
+                                          "vitesse du vent"@fr ;
+                             dc:creator dmo-synop:meteo_france ;
+                             dc:subject <http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/climatologyMeteorologyAtmosphere> ,
+                                        <http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/environment> ,
+                                        <http://inspire.ec.europa.eu/metadata-codelist/TopicCategory/geoscientificInformation> ,
+                                        <https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop> ;
+                             dc:type <http://inspire.ec.europa.eu/metadata-codelist/ResourceType/dataset> ;
+                             dct:accrualPeriodicity <http://publications.europa.eu/resource/authority/frequency/TRIHOURLY> ;
+                             dct:conformsTo <http://www.opengis.net/def/crs/EPSG/0/4326> ;
+                             dct:description "Observation data from international surface observation messages (SYNOP) circulating on the global telecommunications system (GTS) of the World Meteorological Organization (WMO). Atmospheric parameters measured (temperature, humidity, wind direction and force, atmospheric pressure, amount of precipitation) or observed (sensitive weather, description of clouds, visibility) from the earth's surface. Depending on the instrumentation and local specificities, other parameters may be available (snow depth, ground condition, etc.)"@en ;
+                             dct:language <http://publications.europa.eu/resource/authority/language/ENG> ,
+                                            <http://publications.europa.eu/resource/authority/language/FRA> ;
+                             dct:provenance dmo-synop:synop_provenance ;
+                             dct:spatial <https://www.geonames.org/countries/FR/> ;
+                             dct:temporal dmo-synop:temporal_coverage ;
+                             dct:title "Données SYNOP essentielles OMM pour le mois de février 2020 (France)."@fr ,
+                                         "WMO SYNOP data for the month of February 2020 (France)"@en ;
+                             foaf:page <https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=90&id_rubrique=32> .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#synop_dataset_structure
+dmo-synop:synop_dataset_structure rdf:type owl:NamedIndividual ,
+                                          qb4st:SpatioTemporalDSD .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#synop_distribution_feb20
+dmo-synop:synop_distribution_feb20 rdf:type owl:NamedIndividual ,
+                                           dmo:CsvDistribution ;
+                                  dcat:accessURL <https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=90&id_rubrique=32> ;
+                                  dcat:downloadURL <https://donneespubliques.meteofrance.fr/?fond=donnee_libre&prefixe=Txt%2FSynop%2FArchive%2Fsynop&extension=csv.gz&date=202002> ;
+                                  dcat:byteSize 3735000 ;
+                                  dc:format <http://publications.europa.eu/resource/authority/file-type/CSV> ;
+                                  dct:accessRights <http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations> ;
+                                  dct:description "Données SYNOP pour le mois de février 2020"@fr ;
+                                  dct:license <https://www.etalab.gouv.fr/wp-content/uploads/2014/05/Licence_Ouverte.pdf> ;
+                                  csvw:tableSchema dmo-synop:synop_file_schema .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#synop_license
+dmo-synop:synop_license rdf:type owl:NamedIndividual ,
+                                dct:LicenseDocument ;
+                       rdfs:label "Synop data is available for public access without any restriction"@en .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#synop_provenance
+dmo-synop:synop_provenance rdf:type owl:NamedIndividual ,
+                                   dct:ProvenanceStatement ;
+                          rdfs:label "All the measures have been stored/saved by the different stations of Météo-France. The dataset covers all measures between 1 and 29 February 2020."@en .
+
+
+###  https://www.irit.fr/recherches/MELODI/ontologies/dmo-synop#temporal_coverage
+dmo-synop:temporal_coverage rdf:type owl:NamedIndividual ,
+                                    dct:PeriodOfTime ;
+                           dcat:endDate "2020-02-29"^^xsd:date ;
+                           dcat:startDate "2020-02-01"^^xsd:date .
+
+
+###  mailto:contactmail@meteo.fr
+<mailto:contactmail@meteo.fr> rdf:type owl:NamedIndividual .
+
+
+
+###  Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi
diff --git a/sparql/CQA_SPARQL b/sparql/CQA_SPARQL
new file mode 100644
index 0000000..b789962
--- /dev/null
+++ b/sparql/CQA_SPARQL
@@ -0,0 +1,160 @@
+// --------------------------
+// #1 What is the temporal resolution of the data? 
+PREFIX dct: <http://purl.org/dc/terms/>
+PREFIX dcat: <http://www.w3.org/ns/dcat#>
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+
+SELECT * WHERE { 
+  :synop_dataset_feb20 dct:temporal ?o .
+  ?o dcat:startDate ?sdate .
+  ?o dcat:endDate ?edate .
+}
+
+// --------------------------
+// #2  What is the license for use? 
+PREFIX dct: <http://purl.org/dc/terms/>
+PREFIX dcat: <http://www.w3.org/ns/dcat#>
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+
+SELECT * WHERE { 
+  :synop_dataset_feb20 dcat:distribution ?d .
+  ?d dct:license ?l .
+}
+
+// --------------------------
+// #3  What is the temperature (air/ground/etc.)? 
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+PREFIX qb: <http://purl.org/linked-data/cube#>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
+
+SELECT * WHERE { 
+  :synop_dataset_feb20 qb:sliceStructure ?structure .
+  ?structure qb:component ?componente .
+  ?componente qb:measure ?measure .
+  ?measure skos:altLabel ?label . 
+  FILTER regex(?label, "temperature", "i" ) 
+}
+
+// --------------------------
+// #4  & In what format is the data exported? 
+PREFIX dcat: <http://www.w3.org/ns/dcat#>
+PREFIX dc: <http://purl.org/dc/elements/1.1/>
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+SELECT ?format WHERE { 
+      :synop_dataset_feb20 dcat:distribution ?d .
+      ?d dc:format ?format .
+}
+
+// --------------------------
+// #5  & What is the precise date (day/month/year/hour/minute/second) of a measurement? 
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+PREFIX qb: <http://purl.org/linked-data/cube#>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+SELECT * WHERE { 
+  dmo-synop:synop_dataset_feb20 qb:sliceStructure ?structure .
+  ?structure qb:component ?componente .
+  ?componente qb:dimension ?dimension .
+  ?dimension rdfs:label ?label . 
+  FILTER regex(?label, "date", "i" ) 
+}
+
+// --------------------------
+// #6 & How can we download the data? 
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+PREFIX dcat: <http://www.w3.org/ns/dcat#>
+SELECT * WHERE { 
+ :synop_dataset_feb20 dcat:distribution ?distribuition .
+  ?distribuition dcat:accessURL ?URL_access ;
+                 dcat:downloadURL ?URL_download .    
+}
+
+// --------------------------
+// #7 & How often are measures taken (decadal/hourly)?
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+PREFIX dct: <http://purl.org/dc/terms/>
+SELECT ?period WHERE { 
+      :synop_dataset_feb20 dct:accrualPeriodicity ?period .
+}
+
+// --------------------------
+// #8 & What are the atmospheric parameters related to precipitation?
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+PREFIX qb: <http://purl.org/linked-data/cube#>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
+SELECT * WHERE { 
+  :synop_dataset_feb20 qb:sliceStructure ?structure .
+  ?structure qb:component ?componente .
+  ?componente qb:measure ?measure .
+  ?measure skos:altLabel ?label . 
+  FILTER regex(?label, "precipitation", "i" ) 
+}
+
+// --------------------------
+// #9 & What are the input parameters?
+SELECT * WHERE { 
+  ?s ?p ?label . 
+  FILTER regex(?label, "parameters", "i" ) 
+}
+
+
+// --------------------------
+// #10 Who is the contact of the dataset?
+PREFIX p: <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+PREFIX dcat: <http://www.w3.org/ns/dcat#>
+SELECT * WHERE { 
+  :synop_dataset_feb20 dcat:contactPoint ?contact .
+  ?contact ?prop ?val .
+}
+
+// --------------------------
+// #11 What is the spatial coverage of the dataset?
+PREFIX dct: <http://purl.org/dc/terms/>
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+SELECT ?o WHERE { 
+  :synop_dataset_feb20 dct:spatial ?o .
+}
+
+// --------------------------
+// #12 & What are the title of each column of a distribution? 
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+PREFIX dcat: <http://www.w3.org/ns/dcat#>
+PREFIX csvw: <http://www.w3.org/ns/csvw#>
+PREFIX dmo: <https://https://w3id.org/dmo#>
+SELECT ?d ?column ?title WHERE { 
+  :synop_dataset_feb20 dcat:distribution ?d .
+  ?d csvw:tableSchema ?schema .
+  ?schema csvw:column ?column .
+}
+
+// --------------------------
+// #13 & To what measure corresponds the "t" in the CSV?
+PREFIX : <https://www.irit.fr/recherches/MELODI/ontologies/DMO/dmo-synop#>
+PREFIX dcat: <http://www.w3.org/ns/dcat#>
+PREFIX csvw: <http://www.w3.org/ns/csvw#>
+PREFIX dmo: <https://https://w3id.org/dmo#>
+PREFIX qb: <http://purl.org/linked-data/cube#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+SELECT *
+FROM <http://www.openrdf.org/schema/sesame#nil>
+FROM <http://purl.obolibrary.org/obo/envo>
+WHERE
+{  
+   :synop_dataset_feb20 dcat:distribution ?d .
+   ?d csvw:tableSchema ?schema .
+   ?schema csvw:column ?column .
+   ?column csvw:name "t" .
+   ?column dmo:correspondsTo ?measure .
+   ?measure qb:concept ?concept .
+   ?concept rdf:type ?envo .
+    
+}
+
+
+ 
+
+
+
-- 
GitLab