Basic time series data models for the Smart Ocean platform
Project description
SmartOcean timeseries data model
The purpose of the data model is to support the exchange of time series data in particular exchange of fragments of data associated with time series delivered by the SFI Smart Ocean Platform: https://smartoceanplatform.github.io/
The data model is implemented based on the Pydantic framework: https://docs.pydantic.dev/latest/
Standards
The parameter and unit in the Observation class is to follow the Copernicus Marine in-situ TAC physical parameters list:
https://archimer.ifremer.fr/doc/00422/53381/
The qualityCodes is to follow the recommendations for in-situ data Near Real Time Quality Control:
https://archimer.ifremer.fr/doc/00251/36230/
The time object variable in the Datapoint class is to follow the ISO8601 standard and include timezone information.
Example of use
The code below provides an example of ow to use the classes of the library.
from sfisop.datamodels.tsdatamodel.timeseriesdata import *
a_location = Location(latitude=5.0, longitude=65)
meta_data = MetaData(description="test time series",
timeseries="timeseries_testdata",
origin="timeseries_testdata")
observation = Observation(source="test sensor",
source_id="test sensor id",
parameter="temperature",
value="5.0",
unit="celcius",
qualityCodes=[0])
data_point = DataPoint(dp_id="datapoint id",
source="test sensor hub",
source_id="test sensor hub id",
location=a_location,
time="2024-02-17T20:12:49.559547+01:00",
observations=[observation])
data_points = [data_point]
ts_data = TimeSeriesData(format="SMARTOCEAN_V1",
metadata=meta_data,
data=data_points)
The utility functions implemented in the tsdata_utils.py and timeseriesdata.py is to be used for serialisation and de-serialisation of time series data.
Further documentation can be found on the SFI Smart Ocean platform web pages: https://smartoceanplatform.github.io/interoperability/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sfisop_datamodels-1.0.1.tar.gz.
File metadata
- Download URL: sfisop_datamodels-1.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77347f03088e99384afbb252a40b4d4c76eecf5be476ecf78070b251b9720c21
|
|
| MD5 |
a43c54d74d390ff392c302816d51c5ff
|
|
| BLAKE2b-256 |
19ee94db776919903cf9317bf572c546efb9a65d8d6a03b02875dd79e19c9346
|
File details
Details for the file sfisop_datamodels-1.0.1-py3-none-any.whl.
File metadata
- Download URL: sfisop_datamodels-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e1195fbb2e3b395d75c0fa677c389dac52a64dab861d73cdd455c690b66df9b
|
|
| MD5 |
e2f2601301ae3fdbbc0420c172666211
|
|
| BLAKE2b-256 |
84e6ff7e4f9ad1a9b9988a732ee1e4bcead3691f1ee1250b57d070711d2a61f0
|