Skip to main content

OEEIL

OEEIL is a Python package for the automated processing, analysis, visualisation, and summarisation of data collected from portable environmental air-pollution microsensors.

The package was developed as part of the 2025–2026 Master's degree in Health Engineering – Health Data Science at the University of Lille (UFR3S–ILIS), by Hâjar Abdaoui and Ines Yous, under the supervision of Dr Stephan Gabet.

The work was conducted within the OEEIL Working Group (GT OEEIL), a multidisciplinary group bringing together Dr Stephan Gabet (University of Lille), Nathalie Redon (IMT Nord Europe and Anemon Sensors), Sahar Masmoudi (IMT Nord Europe), other researchers, PhD students and a postdoctoral researcher from IMT Nord Europe, as well as the two authors of this package. The working group aims to develop a structured and reproducible methodological framework for the processing and analysis of data collected from portable air-quality microsensors.

Its initial development and validation were carried out using data from the OEEIL sensor (Outil d'Évaluation de l'Exposition Individuelle), a portable environmental microsensor developed within IMT Nord Europe and used for individual air-pollution exposure assessment.

Current package version: 0.1.0


Purpose

Fixed air-quality monitoring stations provide reliable reference measurements but do not fully capture the spatial and temporal variability of an individual's real-world exposure.

Portable microsensors can complement these systems by collecting measurements close to individuals during daily activities and across different microenvironments. However, the resulting datasets require several processing steps before they can be interpreted reliably: harmonisation of heterogeneous files, time alignment, quality control, missing-data management, GPS processing, contextual enrichment, exposure analysis, visualisation, and reporting.

OEEIL provides these steps in a modular, configurable, reproducible, and reusable Python pipeline.

The package currently contains 32 main processing functions organised around six functional areas, together with an additional public utility for imputation reporting.


Main principles

The package was designed around four principles:

  • Modularity – functions can be used independently or combined into a complete pipeline.
  • Configurability – thresholds, time windows, variable names, and processing criteria can be adapted to the study.
  • Reproducibility – identical data and parameters are intended to produce identical processing results.
  • Adaptability – the architecture is designed to be reusable beyond the OEEIL sensor, although transfer to other devices must be validated for each use case.

Installation

Once the package is available from PyPI:

pip install oeeil

For a local wheel:

pip install oeeil-0.1.0-py3-none-any.whl

OEEIL requires Python 3.10 or later.

Main dependencies:

  • numpy
  • pandas
  • matplotlib
  • geopy
  • reportlab
  • scikit-learn
  • tzdata

Quick start

The public API is intentionally flat: functions can be imported directly from oeeil without knowing the internal module structure.

from oeeil import (
    standardize_db,
    convert_timezone,
    filter_pollutant_outliers,
    impute_missing_values,
    classify_exposure_level,
    visualize_exposure,
)

Example:

from oeeil import standardize_db

df_standardized = standardize_db(df)

Several functions return both processed data and metadata. Refer to each function's docstring for its complete signature, parameters, output columns, and return objects.


Functions

1. Acquisition and standardisation

standardize_db

Harmonises raw OEEIL datasets originating from different sensor generations and source structures. It standardises column names and data types and produces a common internal structure for downstream functions.

convert_timezone

Converts OEEIL timestamps from UTC to a user-selected local time zone and adds local datetime information.

aggregate_close_gps_points

Groups nearly identical GPS positions according to a user-defined distance threshold to reduce spatial redundancy during stationary periods.

synchronize_oeeil_campaign

Synchronises several OEEIL DataFrames from the same campaign onto a common temporal basis while preserving sensor identifiers. The matching window is configurable to account for sensor resolution and clock offsets.

synchronize_with_reference

Temporally synchronises an OEEIL dataset with an external reference dataset such as a regulatory air-quality station, fixed monitoring sensor, meteorological dataset, or another reference time series. The function handles differences in temporal resolution by aggregating the higher-frequency dataset around the lower-frequency grid. The current implementation keeps OEEIL and reference variables explicitly separated using suffixes, including when both inputs initially use identical column names.

identify_calibration_pairs

Identifies OEEIL measurements located within a configurable geodesic radius of reference monitoring stations or other geolocated calibration points.


2. Preprocessing, signal quality and gas-signal normalisation, cross-sensitivity correction, and calibration

detect_extinction_periods

Detects sensor shutdowns or acquisition gaps from timestamps and identifies post-restart warm-up periods. Affected observations can be flagged or removed.

detect_pollution_events

Detects local pollution events using rolling statistics and a moving z-score. The function can add rolling means, z-scores, flags, and event labels.

filter_pollutant_outliers

Detects short-duration instrumental spikes in pollutant signals. The current implementation uses time-based parameters such as amplitude threshold, maximum spike duration in seconds, and rolling-window duration in seconds. It infers the sampling interval from timestamps and converts durations into the appropriate number of observations. Artefacts can be replaced with NaN or retained with traceability flags.

manage_missing_suppression

Applies configurable completeness criteria to identify and remove excessively incomplete data windows or sensors.

impute_missing_values

Imputes missing measurements using temporal linear interpolation or K-nearest-neighbours (KNN) imputation, with traceability information for processed variables.

print_imputation_report

Prints a readable summary of the imputation performed by impute_missing_values.

flag_environmental_conditions

Adds a classification of environmental acquisition conditions according to configurable temperature and relative-humidity thresholds.

normalize_gas_percentage

Provides a generalised framework for gas-signal normalisation, optional linear cross-sensitivity correction and linear deconvolution of multiple gas signals such as NO₂, O₃, and VOC.

convert_mv_to_concentration

Converts raw or corrected gas-sensor signals from millivolts into concentration units using calibration against reference measurements.

3. Data processing and contextual enrichment

interpolate_gps_coordinates

Interpolates short gaps in latitude and longitude using temporal linear interpolation and adds traceability information.

compute_displacement_speed

Calculates displacement speed in km/h between consecutive geolocated observations.

classify_transport_mode

Classifies observations into mobility categories from calculated speed. Categories include stationary periods, walking, bicycle/scooter, urban motorised transport, heavy transport, and train/motorway conditions.

classify_indoor_outdoor_co2

Classifies observations as indoor, outdoor, or transition states from CO₂ measurements using configurable decision thresholds.

detect_cov_outliers

Detects artefacts specific to the VOC signal and can flag them or replace affected values with missing values.

normalize_cov_percentage

Normalises cleaned VOC measurements to a robust 0–100% scale. This VOC-specific function is retained for compatibility; for multi-gas processing or cross-sensitivity correction, use normalize_gas_percentage.

classify_indoor_outdoor_cov

Combines CO₂-based information with VOC information to refine indoor/outdoor classification.

correlate_transport_environment

Corrects physically inconsistent combinations between transport-mode and environment classifications according to explicit decision rules.


4. Advanced exposure analysis

classify_exposure_level

Assigns qualitative exposure levels to selected pollutants using configurable thresholds: low, moderate, high, and very high.

compute_exposure_indicators

Computes cumulative exposure indicators including concentration-time area under the curve (AUC), duration of critical exposure, time distribution by exposure level, and identification of the most critical pollutant.

stratify_life_rhythm

Adds temporal strata describing periods of the day, day types, and user-defined life-rhythm segments.

compute_daily_exposure

Aggregates exposure indicators at the daily scale while accounting for minimum data-coverage requirements. Outputs can include daily mean, maximum, AUC, critical-exposure duration, and coverage information.

identify_critical_locations

Aggregates geolocated exposure data into spatial cells and identifies exposure hotspots according to configurable spatial criteria.


5. Visualisation

visualize_exposure

Produces configurable pollutant time series, concentration distributions, hour/day heatmaps, and GPS-based exposure maps when coordinates are available.

calendar_heatmap

Creates a calendar-style heatmap in which each cell represents a day and can be coloured according to an aggregated pollutant value or exposure level.

statistical_summary_visual

Creates a multi-panel statistical dashboard summarising exposure indicators, exposure-level distributions, normalised temporal dynamics, and optional stratifications.


6. Reporting

statistical_summary_report

Produces structured descriptive statistics at configurable temporal granularities: overall, hourly, daily, weekly, monthly, and stratified summaries.

generate_report

Generates an automated PDF report from processed OEEIL data using ReportLab. The report can include campaign metadata, exposure indicators, pollutant distributions, figures, and stratified statistics.


Example pipeline

from oeeil import (
    standardize_db,
    convert_timezone,
    detect_extinction_periods,
    filter_pollutant_outliers,
    impute_missing_values,
    interpolate_gps_coordinates,
    compute_displacement_speed,
    classify_transport_mode,
    classify_exposure_level,
    compute_daily_exposure,
)

df = standardize_db(df)
df = convert_timezone(df)
df = detect_extinction_periods(df)
df = filter_pollutant_outliers(df)

df, imputation_metadata = impute_missing_values(df)

df = interpolate_gps_coordinates(df)
df = compute_displacement_speed(df)
df = classify_transport_mode(df)

df = classify_exposure_level(df)
daily_exposure = compute_daily_exposure(df)

The exact return structure varies between functions. Some functions return a DataFrame directly, while others return additional metadata or structured result objects.


Validation

The initial package was developed and functionally tested using data from four OEEIL sensors collected during the MobiCard campaign in summer 2025:

Sensor Measurement period Measurements
OEI0012 03/07–10/07/2025 36,844
OEI0018 15/07–21/07/2025 30,015
OEI0020 02/07–10/07/2025 37,853
OEI0021 17/07–24/07/2025 32,075

The initial validation dataset contained 136,787 measurements collected over approximately 7-9 days per sensor.

The package functions were tested for technical execution and output consistency. Functions that depend on external reference measurements require additional scientific or operational validation using real reference databases.

The thesis dataset did not include a suitable colocation campaign with a regulatory reference instrument for NO₂, O₃, and VOC conversion. The new calibration and gas-deconvolution functions therefore provide the software framework for these operations, but their coefficients must be established and validated using appropriate experimental reference data before absolute exposure interpretation.


Project status

Version 0.1.0 is the first packaged release of the OEEIL processing framework.


Authors

  • Hâjar Abdaoui
  • Ines Yous

University of Lille
UFR Health and Sports Sciences - ILIS
Master's degree in Health Engineering - Health Data Science
Academic year 2025–2026

Master's thesis:
Development of a tool for the automated processing, visualisation and summarisation of data from an environmental air pollution sensor (OEEIL sensor)

Supervision: Dr Stephan Gabet


Acknowledgements

The development of this work was carried out within a multidisciplinary context involving the University of Lille, IMT Nord Europe, and contributors to the OEEIL working group.

The authors particularly acknowledge Dr Stephan Gabet for scientific supervision, Nathalie Redon for her expertise on the OEEIL sensor and air-quality sensing, and the members of the OEEIL working group for their contributions to the methodological discussions.


Citation

If you use this package in academic work, please cite the associated Master's thesis until a dedicated software citation is provided:

Abdaoui H., Yous I. (2026). Development of a tool for the automated processing, visualisation and summarisation of data from an environmental air pollution sensor (OEEIL sensor). Master's degree thesis, University of Lille, UFR3S–ILIS.


License

OEEIL is distributed under the Apache License 2.0.

See the LICENSE file for the full license terms and the NOTICE file for attribution information.

Release files for oeeil 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oeeil 0.1.0
File Size Uploaded
oeeil-0.1.0.tar.gz 127.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oeeil 0.1.0
File Interpreter ABI Platform
oeeil-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 280.1 kB

Release files / oeeil-0.1.0.tar.gz

Download URL oeeil-0.1.0.tar.gz
Size 127.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e11123eade815da7046b55fd37978271732530670b17e4927df523463c343ca3
BLAKE2b-256 checksum
How to use checksums
c2901736a08bbfb26d9636548c69e5deee918e09ed287f4405e9fd93bb2aa222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / oeeil-0.1.0-py3-none-any.whl

Download URL oeeil-0.1.0-py3-none-any.whl
Size 153.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97526a8a71b661c2055e2781b582f5435ea26645c7a1b750ec2a643b9d473312
BLAKE2b-256 checksum
How to use checksums
45b76d88f40572ed5faa21933cf2780762374d3332dde211b9cb8b5242ccf3c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page