oeeil 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oeeil-0.1.0/LICENSE +202 -0
- oeeil-0.1.0/NOTICE +15 -0
- oeeil-0.1.0/PKG-INFO +343 -0
- oeeil-0.1.0/README.md +315 -0
- oeeil-0.1.0/oeeil/__init__.py +96 -0
- oeeil-0.1.0/oeeil/modules/__init__.py +0 -0
- oeeil-0.1.0/oeeil/modules/analyse/__init__.py +0 -0
- oeeil-0.1.0/oeeil/modules/analyse/classify_exposure_level.py +273 -0
- oeeil-0.1.0/oeeil/modules/analyse/compute_daily_exposure.py +273 -0
- oeeil-0.1.0/oeeil/modules/analyse/compute_exposure_indicators.py +284 -0
- oeeil-0.1.0/oeeil/modules/analyse/identify_critical_locations.py +310 -0
- oeeil-0.1.0/oeeil/modules/analyse/stratify_life_rhythm.py +249 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/__init__.py +0 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/convert_mv_to_concentration.py +355 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/detect_extinction_periods.py +390 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/detect_pollution_events.py +815 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/filter_pollutant_outliers.py +456 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/flag_environmental_conditions.py +206 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/imputation_valeurs_manquantes.py +534 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/manage_missing_suppression.py +252 -0
- oeeil-0.1.0/oeeil/modules/pretraitement/normalize_gas_percentage.py +976 -0
- oeeil-0.1.0/oeeil/modules/reporting/__init__.py +0 -0
- oeeil-0.1.0/oeeil/modules/reporting/generate_report.py +520 -0
- oeeil-0.1.0/oeeil/modules/reporting/statistical_summary_report.py +270 -0
- oeeil-0.1.0/oeeil/modules/standardisation/__init__.py +0 -0
- oeeil-0.1.0/oeeil/modules/standardisation/aggregate_close_gps_points.py +274 -0
- oeeil-0.1.0/oeeil/modules/standardisation/convert_timezone.py +293 -0
- oeeil-0.1.0/oeeil/modules/standardisation/identify_calibration_pairs.py +337 -0
- oeeil-0.1.0/oeeil/modules/standardisation/standardize_db.py +545 -0
- oeeil-0.1.0/oeeil/modules/standardisation/synchronize_oeeil_campaign.py +582 -0
- oeeil-0.1.0/oeeil/modules/standardisation/synchronize_with_reference.py +399 -0
- oeeil-0.1.0/oeeil/modules/traitement/__init__.py +0 -0
- oeeil-0.1.0/oeeil/modules/traitement/classify_indoor_outdoor_co2.py +265 -0
- oeeil-0.1.0/oeeil/modules/traitement/classify_indoor_outdoor_cov.py +259 -0
- oeeil-0.1.0/oeeil/modules/traitement/classify_transport_mode.py +237 -0
- oeeil-0.1.0/oeeil/modules/traitement/compute_displacement_speed.py +227 -0
- oeeil-0.1.0/oeeil/modules/traitement/correlate_transport_environment.py +140 -0
- oeeil-0.1.0/oeeil/modules/traitement/detect_cov_outliers.py +254 -0
- oeeil-0.1.0/oeeil/modules/traitement/interpolate_gps_coordinates.py +264 -0
- oeeil-0.1.0/oeeil/modules/traitement/normalize_cov_percentage.py +235 -0
- oeeil-0.1.0/oeeil/modules/visualisation/__init__.py +0 -0
- oeeil-0.1.0/oeeil/modules/visualisation/calendar_heatmap.py +318 -0
- oeeil-0.1.0/oeeil/modules/visualisation/statistical_summary_visual.py +346 -0
- oeeil-0.1.0/oeeil/modules/visualisation/visualize_exposure.py +366 -0
- oeeil-0.1.0/oeeil.egg-info/PKG-INFO +343 -0
- oeeil-0.1.0/oeeil.egg-info/SOURCES.txt +50 -0
- oeeil-0.1.0/oeeil.egg-info/dependency_links.txt +1 -0
- oeeil-0.1.0/oeeil.egg-info/requires.txt +7 -0
- oeeil-0.1.0/oeeil.egg-info/top_level.txt +1 -0
- oeeil-0.1.0/pyproject.toml +48 -0
- oeeil-0.1.0/requirements.txt +7 -0
- oeeil-0.1.0/setup.cfg +4 -0
oeeil-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
oeeil-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
OEEIL
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Developed by Hâjar Abdaoui and Ines Yous, 2026.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Developed in the context of the OEEIL Working Group (GT OEEIL) and the Master's degree thesis in Health Engineering – Health Data Science at the University of Lille (UFR3S–ILIS), under the supervision of Dr Stephan Gabet.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
This software is licensed under the Apache License, Version 2.0.
|
|
15
|
+
|
oeeil-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: oeeil
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python package for processing, analysing and visualising OEEIL environmental sensor data
|
|
5
|
+
Author: Hajar Abdaoui, Ines Yous
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Repository, https://github.com/NathalieAnemon/oeeil_package
|
|
8
|
+
Project-URL: Issues, https://github.com/NathalieAnemon/oeeil_package/issues
|
|
9
|
+
Keywords: air pollution,environmental exposure,portable sensors,microsensors,air quality,data processing
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
License-File: NOTICE
|
|
20
|
+
Requires-Dist: numpy
|
|
21
|
+
Requires-Dist: pandas
|
|
22
|
+
Requires-Dist: matplotlib
|
|
23
|
+
Requires-Dist: geopy
|
|
24
|
+
Requires-Dist: reportlab
|
|
25
|
+
Requires-Dist: scikit-learn
|
|
26
|
+
Requires-Dist: tzdata
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# OEEIL
|
|
30
|
+
|
|
31
|
+
**OEEIL** is a Python package for the automated processing, analysis, visualisation, and summarisation of data collected from portable environmental air-pollution microsensors.
|
|
32
|
+
|
|
33
|
+
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**.
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
Current package version: **0.1.0**
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Purpose
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
|
|
49
|
+
OEEIL provides these steps in a **modular, configurable, reproducible, and reusable Python pipeline**.
|
|
50
|
+
|
|
51
|
+
The package currently contains **32 main processing functions** organised around six functional areas, together with an additional public utility for imputation reporting.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Main principles
|
|
56
|
+
|
|
57
|
+
The package was designed around four principles:
|
|
58
|
+
|
|
59
|
+
- **Modularity** – functions can be used independently or combined into a complete pipeline.
|
|
60
|
+
- **Configurability** – thresholds, time windows, variable names, and processing criteria can be adapted to the study.
|
|
61
|
+
- **Reproducibility** – identical data and parameters are intended to produce identical processing results.
|
|
62
|
+
- **Adaptability** – the architecture is designed to be reusable beyond the OEEIL sensor, although transfer to other devices must be validated for each use case.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
|
|
68
|
+
Once the package is available from PyPI:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install oeeil
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
For a local wheel:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install oeeil-0.1.0-py3-none-any.whl
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
OEEIL requires Python **3.10 or later**.
|
|
81
|
+
|
|
82
|
+
Main dependencies:
|
|
83
|
+
|
|
84
|
+
- numpy
|
|
85
|
+
- pandas
|
|
86
|
+
- matplotlib
|
|
87
|
+
- geopy
|
|
88
|
+
- reportlab
|
|
89
|
+
- scikit-learn
|
|
90
|
+
- tzdata
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Quick start
|
|
95
|
+
|
|
96
|
+
The public API is intentionally flat: functions can be imported directly from `oeeil` without knowing the internal module structure.
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from oeeil import (
|
|
100
|
+
standardize_db,
|
|
101
|
+
convert_timezone,
|
|
102
|
+
filter_pollutant_outliers,
|
|
103
|
+
impute_missing_values,
|
|
104
|
+
classify_exposure_level,
|
|
105
|
+
visualize_exposure,
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Example:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from oeeil import standardize_db
|
|
113
|
+
|
|
114
|
+
df_standardized = standardize_db(df)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Several functions return both processed data and metadata. Refer to each function's docstring for its complete signature, parameters, output columns, and return objects.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
# Functions
|
|
122
|
+
|
|
123
|
+
## 1. Acquisition and standardisation
|
|
124
|
+
|
|
125
|
+
### `standardize_db`
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
### `convert_timezone`
|
|
129
|
+
Converts OEEIL timestamps from UTC to a user-selected local time zone and adds local datetime information.
|
|
130
|
+
|
|
131
|
+
### `aggregate_close_gps_points`
|
|
132
|
+
Groups nearly identical GPS positions according to a user-defined distance threshold to reduce spatial redundancy during stationary periods.
|
|
133
|
+
|
|
134
|
+
### `synchronize_oeeil_campaign`
|
|
135
|
+
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.
|
|
136
|
+
|
|
137
|
+
### `synchronize_with_reference`
|
|
138
|
+
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.
|
|
139
|
+
|
|
140
|
+
### `identify_calibration_pairs`
|
|
141
|
+
Identifies OEEIL measurements located within a configurable geodesic radius of reference monitoring stations or other geolocated calibration points.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 2. Preprocessing, signal quality and gas-signal normalisation, cross-sensitivity correction, and calibration
|
|
146
|
+
|
|
147
|
+
### `detect_extinction_periods`
|
|
148
|
+
Detects sensor shutdowns or acquisition gaps from timestamps and identifies post-restart warm-up periods. Affected observations can be flagged or removed.
|
|
149
|
+
|
|
150
|
+
### `detect_pollution_events`
|
|
151
|
+
Detects local pollution events using rolling statistics and a moving z-score. The function can add rolling means, z-scores, flags, and event labels.
|
|
152
|
+
|
|
153
|
+
### `filter_pollutant_outliers`
|
|
154
|
+
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.
|
|
155
|
+
|
|
156
|
+
### `manage_missing_suppression`
|
|
157
|
+
Applies configurable completeness criteria to identify and remove excessively incomplete data windows or sensors.
|
|
158
|
+
|
|
159
|
+
### `impute_missing_values`
|
|
160
|
+
Imputes missing measurements using temporal linear interpolation or K-nearest-neighbours (`KNN`) imputation, with traceability information for processed variables.
|
|
161
|
+
|
|
162
|
+
### `print_imputation_report`
|
|
163
|
+
Prints a readable summary of the imputation performed by `impute_missing_values`.
|
|
164
|
+
|
|
165
|
+
### `flag_environmental_conditions`
|
|
166
|
+
Adds a classification of environmental acquisition conditions according to configurable temperature and relative-humidity thresholds.
|
|
167
|
+
|
|
168
|
+
### `normalize_gas_percentage`
|
|
169
|
+
|
|
170
|
+
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.
|
|
171
|
+
|
|
172
|
+
### `convert_mv_to_concentration`
|
|
173
|
+
|
|
174
|
+
Converts raw or corrected gas-sensor signals from millivolts into concentration units using calibration against reference measurements.
|
|
175
|
+
|
|
176
|
+
## 3. Data processing and contextual enrichment
|
|
177
|
+
|
|
178
|
+
### `interpolate_gps_coordinates`
|
|
179
|
+
Interpolates short gaps in latitude and longitude using temporal linear interpolation and adds traceability information.
|
|
180
|
+
|
|
181
|
+
### `compute_displacement_speed`
|
|
182
|
+
Calculates displacement speed in km/h between consecutive geolocated observations.
|
|
183
|
+
|
|
184
|
+
### `classify_transport_mode`
|
|
185
|
+
Classifies observations into mobility categories from calculated speed. Categories include stationary periods, walking, bicycle/scooter, urban motorised transport, heavy transport, and train/motorway conditions.
|
|
186
|
+
|
|
187
|
+
### `classify_indoor_outdoor_co2`
|
|
188
|
+
Classifies observations as indoor, outdoor, or transition states from CO₂ measurements using configurable decision thresholds.
|
|
189
|
+
|
|
190
|
+
### `detect_cov_outliers`
|
|
191
|
+
Detects artefacts specific to the VOC signal and can flag them or replace affected values with missing values.
|
|
192
|
+
|
|
193
|
+
### `normalize_cov_percentage`
|
|
194
|
+
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`.
|
|
195
|
+
|
|
196
|
+
### `classify_indoor_outdoor_cov`
|
|
197
|
+
Combines CO₂-based information with VOC information to refine indoor/outdoor classification.
|
|
198
|
+
|
|
199
|
+
### `correlate_transport_environment`
|
|
200
|
+
Corrects physically inconsistent combinations between transport-mode and environment classifications according to explicit decision rules.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 4. Advanced exposure analysis
|
|
205
|
+
|
|
206
|
+
### `classify_exposure_level`
|
|
207
|
+
Assigns qualitative exposure levels to selected pollutants using configurable thresholds: low, moderate, high, and very high.
|
|
208
|
+
|
|
209
|
+
### `compute_exposure_indicators`
|
|
210
|
+
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.
|
|
211
|
+
|
|
212
|
+
### `stratify_life_rhythm`
|
|
213
|
+
Adds temporal strata describing periods of the day, day types, and user-defined life-rhythm segments.
|
|
214
|
+
|
|
215
|
+
### `compute_daily_exposure`
|
|
216
|
+
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.
|
|
217
|
+
|
|
218
|
+
### `identify_critical_locations`
|
|
219
|
+
Aggregates geolocated exposure data into spatial cells and identifies exposure hotspots according to configurable spatial criteria.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 5. Visualisation
|
|
224
|
+
|
|
225
|
+
### `visualize_exposure`
|
|
226
|
+
Produces configurable pollutant time series, concentration distributions, hour/day heatmaps, and GPS-based exposure maps when coordinates are available.
|
|
227
|
+
|
|
228
|
+
### `calendar_heatmap`
|
|
229
|
+
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.
|
|
230
|
+
|
|
231
|
+
### `statistical_summary_visual`
|
|
232
|
+
Creates a multi-panel statistical dashboard summarising exposure indicators, exposure-level distributions, normalised temporal dynamics, and optional stratifications.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 6. Reporting
|
|
237
|
+
|
|
238
|
+
### `statistical_summary_report`
|
|
239
|
+
Produces structured descriptive statistics at configurable temporal granularities: overall, hourly, daily, weekly, monthly, and stratified summaries.
|
|
240
|
+
|
|
241
|
+
### `generate_report`
|
|
242
|
+
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.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
# Example pipeline
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
from oeeil import (
|
|
250
|
+
standardize_db,
|
|
251
|
+
convert_timezone,
|
|
252
|
+
detect_extinction_periods,
|
|
253
|
+
filter_pollutant_outliers,
|
|
254
|
+
impute_missing_values,
|
|
255
|
+
interpolate_gps_coordinates,
|
|
256
|
+
compute_displacement_speed,
|
|
257
|
+
classify_transport_mode,
|
|
258
|
+
classify_exposure_level,
|
|
259
|
+
compute_daily_exposure,
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
df = standardize_db(df)
|
|
263
|
+
df = convert_timezone(df)
|
|
264
|
+
df = detect_extinction_periods(df)
|
|
265
|
+
df = filter_pollutant_outliers(df)
|
|
266
|
+
|
|
267
|
+
df, imputation_metadata = impute_missing_values(df)
|
|
268
|
+
|
|
269
|
+
df = interpolate_gps_coordinates(df)
|
|
270
|
+
df = compute_displacement_speed(df)
|
|
271
|
+
df = classify_transport_mode(df)
|
|
272
|
+
|
|
273
|
+
df = classify_exposure_level(df)
|
|
274
|
+
daily_exposure = compute_daily_exposure(df)
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
The exact return structure varies between functions. Some functions return a DataFrame directly, while others return additional metadata or structured result objects.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
# Validation
|
|
282
|
+
|
|
283
|
+
The initial package was developed and functionally tested using data from four OEEIL sensors collected during the MobiCard campaign in summer 2025:
|
|
284
|
+
|
|
285
|
+
| Sensor | Measurement period | Measurements |
|
|
286
|
+
|---|---:|---:|
|
|
287
|
+
| OEI0012 | 03/07–10/07/2025 | 36,844 |
|
|
288
|
+
| OEI0018 | 15/07–21/07/2025 | 30,015 |
|
|
289
|
+
| OEI0020 | 02/07–10/07/2025 | 37,853 |
|
|
290
|
+
| OEI0021 | 17/07–24/07/2025 | 32,075 |
|
|
291
|
+
|
|
292
|
+
The initial validation dataset contained **136,787 measurements** collected over approximately 7-9 days per sensor.
|
|
293
|
+
|
|
294
|
+
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.
|
|
295
|
+
|
|
296
|
+
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.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
# Project status
|
|
301
|
+
|
|
302
|
+
Version **0.1.0** is the first packaged release of the OEEIL processing framework.
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
# Authors
|
|
307
|
+
|
|
308
|
+
- **Hâjar Abdaoui**
|
|
309
|
+
- **Ines Yous**
|
|
310
|
+
|
|
311
|
+
University of Lille
|
|
312
|
+
UFR Health and Sports Sciences - ILIS
|
|
313
|
+
Master's degree in Health Engineering - Health Data Science
|
|
314
|
+
Academic year 2025–2026
|
|
315
|
+
|
|
316
|
+
Master's thesis:
|
|
317
|
+
*Development of a tool for the automated processing, visualisation and summarisation of data from an environmental air pollution sensor (OEEIL sensor)*
|
|
318
|
+
|
|
319
|
+
Supervision: **Dr Stephan Gabet**
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Acknowledgements
|
|
324
|
+
|
|
325
|
+
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.
|
|
326
|
+
|
|
327
|
+
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.
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Citation
|
|
332
|
+
|
|
333
|
+
If you use this package in academic work, please cite the associated Master's thesis until a dedicated software citation is provided:
|
|
334
|
+
|
|
335
|
+
> 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.
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## License
|
|
340
|
+
|
|
341
|
+
OEEIL is distributed under the **Apache License 2.0**.
|
|
342
|
+
|
|
343
|
+
See the [LICENSE](LICENSE) file for the full license terms and the [NOTICE](NOTICE) file for attribution information.
|