-
Notifications
You must be signed in to change notification settings - Fork 7
Update Sensor data integration part #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
niio972
wants to merge
1
commit into
master
Choose a base branch
from
update-sensor-integration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,68 @@ | ||||||
| # Web Service Clients | ||||||
|
|
||||||
| ## Sensor data integration : | ||||||
|
|
||||||
| This part describes the way to add data coming from a sensor into the ``data service``. | ||||||
|
|
||||||
| Two steps need to be done : | ||||||
|
|
||||||
| 1. Create one or several provenance(s) which describe the way which the data was obtained (sensor, sensor settings, ...) | ||||||
|
|
||||||
| The service used to create a provenance is ``POST /provenances``. | ||||||
|
|
||||||
| The following JSON schema is expected : | ||||||
|
|
||||||
| ```json | ||||||
| [ | ||||||
| { | ||||||
| "label": "provenance sensor ddd with new data", | ||||||
| "comment": "", | ||||||
| "metadata": { | ||||||
| "prov:Agent": [{ | ||||||
| "prov:id": "http://www.phenome-fppn.fr/test/2020/s20002", | ||||||
| "rdf:type": "oeso:SensingDevice", | ||||||
| "settings": { | ||||||
| "verticalPosition": 0.0 | ||||||
| } | ||||||
| }] | ||||||
| } | ||||||
| } | ||||||
| ] | ||||||
| ``` | ||||||
|
|
||||||
| This service will return the **uri(s) of the provenance(s)** which will used in the **next step**. | ||||||
|
|
||||||
| Important Notes: | ||||||
|
|
||||||
| - *Sensor type* in opensilex ontology is defined by **"rdf:type": "oeso:SensingDevice"**. It must not be modified. | ||||||
| - *prov:id* is the sensor uri in our information system **"prov:id": "http://www.phenome-fppn.fr/test/2020/s20002"**, | ||||||
|
|
||||||
| 2. Format your dataset to be able to use de ``data service``. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| The service used to create a provenance is ``POST /data``. | ||||||
|
|
||||||
| The following JSON schema is expected, it is an array of unique single observation measures : | ||||||
|
|
||||||
| ```json | ||||||
| [ | ||||||
| { | ||||||
| "provenanceUri": "http://www.opensilex.org/demo/2018/pv181515071552", | ||||||
| "objectUri": null, | ||||||
| "variableUri": "http://www.opensilex.org/demo/id/variable/v0000001", | ||||||
| "date": "2017-06-15T10:51:00+0200", | ||||||
| "value": "1.3", | ||||||
| "metadata": {} | ||||||
| } | ||||||
| ] | ||||||
| ``` | ||||||
|
|
||||||
| Important Notes: | ||||||
|
|
||||||
| - *variableUri* is the uri of the measured variable in your dataset | ||||||
| - *objectUri* is null in this case | ||||||
| - *date* is expected in one of these formats : 2017-06-15 or 2017-06-15T10:51:00+0200 or 2017-06-15T10:51:00.300+0200 | ||||||
| - *value* can be in date, in text or in numeric format | ||||||
|
|
||||||
| ## Python Clients | ||||||
|
|
||||||
| ### Images import Python client | ||||||
|
|
@@ -41,8 +104,8 @@ A template of the required CSV file can be found on GitHub at the following URL: | |||||
|
|
||||||
| The first row of the CSV file displays its header: | ||||||
|
|
||||||
| | path_image_ref | imageType | concernedItemUri | concernedItemType | position | date | sensorUri | | ||||||
| | :------------- | :------------- | :------------- | :------------- | :------------- | :------------- | :------------- | | ||||||
| | path_image_ref | imageType | concernedItemUri | concernedItemType | position | date | sensorUri | | ||||||
| | :------------- | :-------- | :--------------- | :---------------- | :------- | :--- | :-------- | | ||||||
|
|
||||||
| Then, each row of this CSV file is associated to an image imported in OpenSILEX PHIS. | ||||||
| Each image is characterized by: | ||||||
|
|
||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.