The documentation is easily readable to humans. Thinking about machine-readable concept would be nice to have a file containing the JSON data model schema because markdown isn't a good structure to do that, anyway using this format could be easily consumed by developers also.
Extracting from the docs, I could build a scheme with all attributes of the Device Data Model. I tried to cover all specs to be consumed by an application. The result was:
{
"namespace": "Environment",
"name": "WaterQualityObserved",
"attributes": {
"id": {
"descr": "Unique identifier.",
"type": "Text",
"mandatory": true
},
"type": {
"descr": "Entity type. It must be equal to WaterQualityObserved.",
"type": "Text",
"allowedvalues": "WaterQualityObserved",
"mandatory": true
},
"location": {
"descr": "Location where measurements have been taken, represented by a GeoJSON Point.",
"type": "geo:json",
"allowedvalues": {
"normative": "https://tools.ietf.org/html/rfc7946"
},
"mandatory-if": [
{
"attribute": "address",
"rule": "equals",
"value": "undefined"
}
]
},
"address": {
"descr": "Civic address where the Water Quality measurement is taken.",
"type": "address",
"allowedvalues": {
"normative": "https://schema.org/address"
},
"mandatory-if": [
{
"attribute": "location",
"rule": "equals",
"value": "undefined"
}
]
},
"temperature": {
"descr": "Temperature.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "Cº",
"descr": "Celsius Degrees"
}
},
"conductivity": {
"descr": "Electrical Conductivity.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "S/m",
"descr": "Siemens per meter"
}
},
"conductance": {
"descr": "Specific Conductance.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "S/m",
"descr": "Siemens per meter at 25 ºC"
}
},
"tss": {
"descr": "Total suspended solids.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mg/L",
"descr": "milligrams per liter"
}
},
"tds": {
"descr": "Total dissolved solids.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mg/L",
"descr": "milligrams per liter"
}
},
"turbidity": {
"descr": "Amount of light scattered by particles in the water column.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "FTU",
"descr": "Formazin Turbidity Unit"
}
},
"salinity": {
"descr": "Amount of salts dissolved in water.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "ppt",
"descr": "Parts per thousand"
}
},
"pH": {
"descr": "acidity or basicity of an aqueous solution.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "",
"descr": "Negative of the logarithm to base 10 of the activity of the hydrogen ion."
}
},
"orp": {
"descr": "Oxidation-Reduction potential.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mV",
"descr": "millivolts"
}
},
"O2": {
"descr": "Level of free, non-compound oxygen present.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mg/L",
"descr": "milligrams per liter"
}
},
"Chla": {
"descr": "Concentration of chlorophyll A.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mg/L",
"descr": "milligrams per liter"
}
},
"PE": {
"descr": "Concentration of pigment phycoerythrin which can be measured to estimate cyanobacteria concentrations specifically.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mg/L",
"descr": "milligrams per liter"
}
},
"NH4": {
"descr": "Concentration of ammonia.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mg/L",
"descr": "milligrams per liter"
}
},
"Cl": {
"descr": "Concentration of chlorides.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mg/L",
"descr": "milligrams per liter"
}
},
"NO3": {
"descr": "Concentration of nitrates.",
"type": "Number",
"metadata": {
"timestamp": {
"type": "DateTime"
}
},
"unit": {
"symbol": "mg/L",
"descr": "milligrams per liter"
}
},
"dateModified": {
"descr": "Last update timestamp of this entity.",
"type": "DateTime"
},
}
}
I believe that it is not possible to speak of a harmonized data model without be closer of the ontology concepts. But this proposal isn't intended as a universal ontology for this harmonized datasets, but to provide ways to developers implement it with more fluidity. I made a fork and I'll work on a structured json to be consumed by our Fiware Powered applications to evaluate this model applied on our concepts.