Skip to content

Plenario Sensor Data

Paul Beckman edited this page Jun 30, 2016 · 39 revisions

I dumped my first thoughts on this topic here. Here are my current thoughts. I'm writing this out so I have more to go in in conversations with stakeholders. None of this is final, but I'm trying to get to something concrete we can implement.

Scope: Just the Web Application API

This document concerns the web developer-focused sensor data API. I think the needs of this community are different enough from the needs of the scientific community that they'll need different access methods (I'm skeptical that both can be reconciled in a single API, but I'm open to suggestions). I'll assume here that the Array of Things data producer will have a publication module that can export the data in different formats to different consumers. One such consumer will be a document store to distribute static data dumps with DOIs for scientific citation. Another consumer might be the NOAA Meteorological Assimilation Data Ingest System, with its own metadata requirements.

// Sample Metadata JSON for a Sensor Network

ArrayOfThings = {
    'name': 'ArrayOfThings',
    'maintainer-email': '[email protected]',
    'description': 'Brief description of this sensor network.'
    'info-link': 'https://arrayofthings.github.io/developers'
    'nodes': ['ArrayOfThings1', 'ArrayOfThings2',...],
    'topics': [
        'temperature': {
	    'attributes': ['temperature'],
            'types': ['numeric'],
            'units': ['degrees Fahrenheit'],
	    ...
	},
	'numPeople': {
            'attributes': ['numPeople', 'certainty'],
            'types': ['numeric','numeric'],
            'units': ['people seen on camera', 'certainty as a fraction'],
	    ...
	},
        ...
    ],
};

// Sample Metadata JSON for a Node

ArrayOfThings1 = {
    'id': 'ArrayOfThings1',
    'version': '1.2.5',
    'location': [-87.91372618, 41.64625754],
    'topics': ['temperature', 'numPeople',...],
    'derivations': [
        'temperature': [
            {
		'sensor type': 'temperature sensor',
		'sensor description': 'model DS18B20+ with +- .5 degree accuracy',
		...
            },
            {
		'sensor type': 'temperature sensor',
		'sensor description': 'model TMP36 with +- .3 degree accuracy',
                ...
            },
	    ...
	],
        'numPeople': [
            {
		'sensor type': 'camera',
		'sensor description': 'OV7670 300KP camera',
		'algorithm': 'Szeliski 2.5.46'
                ...
            },
            ...
	],
        ...
    ],
};

// Sample Observation JSON

{
    'id': 'ArrayOfThings1',
    'version': '1.2.5',
    'time': 1467314815,
    'readings': [
        'temperature': {
            'temperature': 89.7,
            ...
	},
	'numPeople': {
            'numPeople': 14,
            'certainty': .83,
            ...
	},
        ...
    ],
};


/* 
Remaining Questions:
-Do we want single element lists for attributes and derivations?
-Does complying with OGC observation formatting standards (https://en.wikipedia.org/wiki/Observations_and_Measurements) 
allow us to integrate into existing client systems more easily? Is that worth it?
*/
Clone this wiki locally