A lightweight web application for visualizing and understanding SensorThings APIs, designed to make observation data accessible to everyone.
- Context and Motivation
- Purpose
- Features
- Deployment
- Configuration
- Target Users and Interfaces
- Extensions to SensorThings
- Technical Stack
- References
STAV (SensorThings API Viewer) is a lightweight ecosystem dedicated to the visualization and understanding of SensorThings APIs. It is part of a larger project funded by Rennes Métropole and was initially developed to share urban observation data produced within the CityOrchestra project.
In this context, physical sensors were deployed in urban areas to monitor hydrology-related parameters. The funding authority required these data to be published as open data. To collect and disseminate the observations, the OGC SensorThings API standard was selected.
While SensorThings is well suited for machine-to-machine interoperability, it quickly appeared that it lacks tools for human understanding. The standard is primarily designed for automated systems, which makes it difficult for data producers, external users, or stakeholders unfamiliar with SensorThings to understand the structure, meaning, and provenance of the shared data.
STAV addresses this gap.
This project builds on the GéoSAS digital services ecosystem (Bera, 2013) and is inspired by previous work from UMR SAS, notably VIDAE (Le Henaff, 2018). It extend the work initiated by the SOFAIR group (Sensor Observations Findable Accessible Interoperable Reusable).
The goal of STAV is to facilitate the sharing and understanding of data exposed through a SensorThings API.
STAV follows the FAIR principles (Findable, Accessible, Interoperable, Reusable) and aims to make SensorThings data understandable by a broad audience, including users with no prior knowledge of the standard or APIs in general.
STAV was initially designed for environmental observatories, where the number of measurement points is limited. It is currently not intended to visualize more than tens of thousands of measurement points (future adaptations will make this possible).
STAV allows users to:
- Understand the data globally, without knowing SensorThings
- Identify how and where the data were produced
- Visualize observation locations on interactive maps
- Explore and visualize time series with interactive graphs
- Download datasets in CSV format
- Identify data producers and access data licensing information through links to ISO 19119 metadata (optionally)
- Sensor Monitoring
STAV provides several dedicated interfaces for different user profiles (scientists, metrologists, new users, general audience):
- Accueil: Explore the SensorThings service globally: measured parameters, sensors used, and locations of measurement points
- Description des points de mesures: View detailed information for each measurement point, including photos if available
- Accès aux données: Visualize time series and download observations
- Métrologie: Field operator tools for checking latest observations and sensor status
STAV is designed for multiple user profiles:
- Discovery space: Explore locations
- Download space: Visualize and retrieve time series
- Metrology page: Quickly check latest observations and assess sensor status
- Alert page: Monitor threshold exceedances and identify problematic sensors
- Comprehensive overview: Understand how data are acquired (which sensor, where, etc.)
- Metadata access: Access information about data licensing and producers
STAV is not tightly coupled to any specific SensorThings service. It acts purely as a SensorThings viewer, capable of reading any compliant SensorThings API.
Copy the STAV directory to any web server:
# Copy to your web server
git clone https://github.com/geosas/STAV.git
cp -r stav /var/www/html/
chown -R www-data /var/www/html/stav
chmod -R o+r /var/www/html/stavAccess via: https://your-domain.com/stav/
Use STAV directly from your GitHub Pages (no hosting required).
Run locally using Python for test:
git clone https://github.com/geosas/STAV.git
python3 -m http.server 8000Access via: http://localhost:8000/stav/
Add an entry to config/stav_config.json:
{
"my service": "config/my-service.json"
}Create config/my-service.json:
{
"urlService": "https://my-sensorthings.org/v1.0/",
"nameService": "My observatory",
"mode": "simple",
"metadata": "https://my-metadata.org/",
"description": "My beautiful description",
"metrology": true
}Configuration Properties:
urlService(required): Base URL of the SensorThings API endpointserviceName(required): Display name for the service in STAVdescription(required): Description of the servicemode(optional): Enable custom STA improvement. Use:"stean"for STEAN STA server or"Frost_Geosas"for GéoSAS-specific features,metadata(optional): URL (URI) to metadata record (automatically adds a "Metadonnée" link in the navbar)metrology(optional): usetruefor enable the metrology page (automatically adds a "Métrologie" link in the navbar),
http://your-domain.com/stav/?config=config/my-service.json
The configuration parameter is automatically propagated across all pages.
STAV introduces optional extensions based on the customizable properties field of SensorThings entities. These extensions enrich the user experience while remaining fully interoperable : services that do not provide these additional properties remain fully usable, with reduced enrichment.
All added terms try to rely on structured vocabularies and are aligned as closely as possible with the SensorThings architecture. For example, image follows the schema.org/image definition, which is a property of a Thing.
image: URL(s) pointing to one or more photos of the measurement location- Allows visual identification of measurement points in the field
- Examples:
"properties": { "image": "https://example.com/photos/sensor-123.jpg" }
"properties": { "image": [ "https://example.com/photos/sensor-1.jpg", "https://example.com/photos/sensor-2.jpg" ] }
theme: A grouping concept used to aggregate several observed properties- Enables filtering and easier visualization
- Example:
"properties": { "theme": "Hydrology" }
-
minValue,maxValue: Minimum and maximum threshold values- Used to display alert thresholds in graphs
- Example:
"properties": { "minValue": 0, "maxValue": 100 }
-
graph: Graph type selection (line or bar)- Adapts visualization to data nature
- Example:
"properties": { "graph": "bar" }
These additions respond to concrete needs expressed by field operators, such as the importance of pictures to better identify and understand measurement points.
Some time series are too long to be efficiently visualized or downloaded at full resolution. To address this, STAV supports server-side aggregation (daily or hourly averages or sums) based on the width of the user's screen.
This mechanism is currently implemented through specific server-side extensions and will follow ODATA standards in future developments.
To activate this mode, the configuration must include:
{
"mode": "Frost_Geosas"
}Alternatively, another mode is available for the STEAN server, based on an iframe with server-side graph generation.
To activate STEAN mode, the configuration must include:
{
"mode": "stean"
}STAV is built with:
- Vanilla JavaScript
- Dygraph - Interactive time-series graphs that can handle large datasets with ease
- OpenLayers - Interactive mapping
- Bulma CSS - CSS framework
- Rodéric Bera, Hervé Squividant, Genevieve Le Henaff, Pascal Pichelin, Laurent Ruiz, et al.. GeoSAS: A modular and interoperable Open Source Spatial Data Infrastructure for research. IAHS-AISH publication = International Association of Hydrological Sciences-Association Internationale des Sciences Hydrologiques publication, 2015, 368, pp.9-14. 10.5194/piahs-368-9-2015. hal-01222416
- Genevieve Le Henaff, Hervé Squividant, Ophélie Fovet, Mikaël Faucheux, Yannick Hamon, et al.. De la mesure environnementale à sa diffusion : mise en place d’une chaîne de traitement modulaire et générique pour les données de l’Observatoire de Recherche en Environnement AgrHyS. Cahier des Techniques de l'INRA, 2018, N° Spécial: Données de la recherche, 24 p. hal-02392180
- OGC SensorThings API
- FAIR Principles
- CityOrchestra Harmoniser les données pour la transition écologique des territoires, Rennes Métropole
STAV - Making SensorThings data accessible to everyone