Using Python notebooks
Workflow position: start here.
This notebook introduces the concepts used by notebooks01to04.
The workshop follows one continuous path:
| Notebook | Focus | Main outcome |
|---|---|---|
00_Introduction.ipynb |
Concepts and workflow | Understand IoT, SensorThings API, istSOS4, and the run order |
01_Authorization.ipynb |
Authentication and authorization | Create and test viewer and editor users |
02_STA_Entities.ipynb |
Core SensorThings entities | Create a complete single-station SensorThings example |
03_STA_Observations.ipynb |
Bulk observations | Create a multi-datastream station and upload CSV observations |
04_Time_Travel.ipynb |
Reproducibility and lineage | Query current and historical states with time-travel parameters |
Run the notebooks in numerical order. Each notebook assumes the concepts, users, or data created in the previous steps.
Resource scripts
To execute the notebooks, you need to have the istsos_utils.py helper module in the same folder. This module contains functions for common tasks such as creating users, entities, and uploading data.
Workshop conventions
The notebooks use the following conventions:
| Convention | Value |
|---|---|
| API endpoint inside Docker/Jupyter | http://api:5000/v4/v1.1 |
| Shared helper module | istsos_utils.py |
| Common network name | DDT_workshop |
| Resource-name prefix | <editor_username>- |
CSV expected by notebook 03 |
data/observations.csv |
The username prefix is important in a shared workshop environment: it reduces name collisions when several participants create resources on the same istSOS4 instance.
Recommended run order
- Start with
01_Authorization.ipynbto create and test workshop users. - Continue with
02_STA_Entities.ipynbto learn the SensorThings entity model step by step. - Run
03_STA_Observations.ipynbto create a larger station and import observations from CSV. - Finish with
04_Time_Travel.ipynbto inspect reproducibility, commits, and historical states.
Keep
istsos_utils.pyin the same folder as the notebooks. Notebook imports expect it to be available asfrom istsos_utils import ....
License
This workshop material is licensed under the Creative Commons Attribution 4.0 International License.
Ready to start? Open 01_Authorization.ipynb.