Search code examples
rdfsemantic-webowlontologytemporal

How to model temporal data property using Protégé


I have some data about water quality in several counties, it’s a set of month average indicators. This data is in the form

countyName | indicatorName | indicatorValue | indicatorMonth | indicatorYear

How can I model an ontology to represent this data using OWL and Protégé? I first tried to create a class for the counties and data properties for every indicator, but I really don't see how to model this temporal dimension associated to the indicators values.


Solution

  • If you have tabular data with columns like countyName, indicatorName, indicatorValue, indicatorMonth, indicatorYear, then the typical way to encode this is as an n-ary relation. See Defining N-ary Relations on the Semantic Web for more details, but the general idea is that you'd do something like this:

    _:record72 rdf:type :WaterQualityRecord ;
               countryName "some country" ;
               indicatorName "some indicator" ;
               indicatorValue 42 ;
               indicatorMonth 9 ;     # e.g., for September
               indicatorYear 2013 .   # e.g., for 2013
    
    _:record73 rdf:type :WaterQualityRecord ;
               countryName "some other country" ;
               indicatorName "some other indicator" ;
               indicatorValue 89 ;
               indicatorMonth 3 ;     # e.g., for March
               indicatorYear 2014 .   # e.g., for 2014
    

    Then ordering by date is a simple matter of ordering first by indicatorYear and then by indicatorMonth. You might also consider combining those properties into a single property whose value is an xsd:dateTime, but that's not quite as important.