microsegments 0.2.0__tar.gz → 0.2.2__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.
- {microsegments-0.2.0 → microsegments-0.2.2}/PKG-INFO +5 -3
- {microsegments-0.2.0 → microsegments-0.2.2}/README.md +4 -2
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/_version.py +2 -2
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/html/export.py +7 -5
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/html/template.html +127 -130
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/io/coverage.py +24 -1
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/plot.py +70 -70
- microsegments-0.2.2/src/microsegments/scale.py +107 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_coverage.py +21 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_report_html.py +62 -3
- {microsegments-0.2.0 → microsegments-0.2.2}/.github/workflows/publish.yml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/.github/workflows/test.yml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/.gitignore +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/LICENSE +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/docs/report.jpg +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/examples/gtfsrt_csv.toml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/examples/make_synth.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/examples/stib1_platform.toml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/examples/stib55.toml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/examples/stib55_full.toml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/examples/stib71_platform.toml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/examples/synth.toml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/pyproject.toml +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/__init__.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/aggregate.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/cli.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/compare.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/config.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/contract.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/hotspots.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/html/__init__.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/html/leaflet.min.css +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/io/__init__.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/io/events.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/io/gtfsrt.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/io/ids.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/io/stib.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/io/tabular.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/io/timeutil.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/locate/__init__.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/locate/common.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/locate/linear.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/locate/mapmatch.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/locate/resample.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/metrics.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/network/__init__.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/network/calendar.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/network/geometry.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/network/keys.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/network/patterns.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/pipeline.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/py.typed +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/report.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/schema.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/segments.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/simulate.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/tracks.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/src/microsegments/tune.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/golden/buckets.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/golden/drops.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/golden/flen.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/golden/obs_day.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/golden/obs_dow.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/golden/passages.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/golden/summary.json +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/golden/validation.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/gtfs/agency.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/gtfs/calendar.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/gtfs/calendar_dates.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/gtfs/routes.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/gtfs/shapes.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/gtfs/stop_times.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/gtfs/stops.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/gtfs/trips.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/punctuality/route55.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/speed55_ref.json +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/vd55/20250318.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/vd55/20250318.snaps.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/vd55/20250319.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/fixtures/stib55/vd55/20250319.snaps.parquet +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/gtfs_fixtures.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/regression/make_golden.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/t4_fixtures.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_aggregate.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_compare.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_hotspots.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_hotspots_criteria.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_io_events.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_io_gtfsrt.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_io_stib.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_io_tabular.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_locate_linear.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_locate_mapmatch.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_metrics.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_network_geometry.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_network_patterns.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_pipeline_cli.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_regression_stib55.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_scaffold.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_segments.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_simulate.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_tracks.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_tune.py +0 -0
- {microsegments-0.2.0 → microsegments-0.2.2}/tests/test_versions_merge.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: microsegments
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Where do transit vehicles linger? Count vehicle position observations per micro-segment of a line, from GTFS + AVL / GTFS-RT positions.
|
|
5
5
|
Project-URL: Homepage, https://github.com/GaspardMerten/microsegments
|
|
6
6
|
Project-URL: Repository, https://github.com/GaspardMerten/microsegments
|
|
@@ -150,8 +150,10 @@ is therefore about 20 s of presence.
|
|
|
150
150
|
| `excess_obs_per_h`, `log2_ratio` | see `metrics.py` | |
|
|
151
151
|
|
|
152
152
|
All values are ratios of sums over the selected days (optionally post-stratified by weekday). Stop zones
|
|
153
|
-
(30 m before to 60 m after each stop) can be masked to bring out signals and junctions.
|
|
154
|
-
fixed
|
|
153
|
+
(30 m before to 60 m after each stop) can be masked to bring out signals and junctions. The colour scale is
|
|
154
|
+
one fixed function of the value for every line, period, hour and option (`microsegments.scale`): values are
|
|
155
|
+
brought to seconds per passage per 30 m of track and read on the STIB speed ramp (green 4 s ≈ 27 km/h, red
|
|
156
|
+
14 s ≈ 7.5 km/h, dark red ≥ 24 s); both excesses share it as 3 s + excess.
|
|
155
157
|
|
|
156
158
|
## Missing data and GTFS versions
|
|
157
159
|
|
|
@@ -112,8 +112,10 @@ is therefore about 20 s of presence.
|
|
|
112
112
|
| `excess_obs_per_h`, `log2_ratio` | see `metrics.py` | |
|
|
113
113
|
|
|
114
114
|
All values are ratios of sums over the selected days (optionally post-stratified by weekday). Stop zones
|
|
115
|
-
(30 m before to 60 m after each stop) can be masked to bring out signals and junctions.
|
|
116
|
-
fixed
|
|
115
|
+
(30 m before to 60 m after each stop) can be masked to bring out signals and junctions. The colour scale is
|
|
116
|
+
one fixed function of the value for every line, period, hour and option (`microsegments.scale`): values are
|
|
117
|
+
brought to seconds per passage per 30 m of track and read on the STIB speed ramp (green 4 s ≈ 27 km/h, red
|
|
118
|
+
14 s ≈ 7.5 km/h, dark red ≥ 24 s); both excesses share it as 3 s + excess.
|
|
117
119
|
|
|
118
120
|
## Missing data and GTFS versions
|
|
119
121
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.2.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
21
|
+
__version__ = version = '0.2.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 2)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -6,6 +6,7 @@ matrix, profile, hotspots and coverage calendar work offline. Leaflet's CSS is i
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
8
|
import html
|
|
9
|
+
import warnings
|
|
9
10
|
import json
|
|
10
11
|
import re
|
|
11
12
|
from importlib import resources
|
|
@@ -49,14 +50,15 @@ def _default_title(c: dict, lang: str) -> str:
|
|
|
49
50
|
|
|
50
51
|
def render(analysis_or_contract, *, title: str | None = None, lang: str = "fr", tiles: bool = True,
|
|
51
52
|
scales: dict | None = None, description: str | None = None, **contract_kw) -> str:
|
|
52
|
-
"""The full HTML document as a string. ``
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Analysis / RunResult is given."""
|
|
53
|
+
"""The full HTML document as a string. ``contract_kw`` go to ``to_contract`` when an Analysis /
|
|
54
|
+
RunResult is given. The colour scale is fixed for every page (``microsegments.scale``); ``scales`` is
|
|
55
|
+
deprecated and ignored."""
|
|
56
56
|
c = dict(_contract(analysis_or_contract, **contract_kw))
|
|
57
57
|
c["tiles"] = bool(tiles)
|
|
58
58
|
if scales:
|
|
59
|
-
|
|
59
|
+
warnings.warn("render(scales=...) is ignored: the colour scale is fixed (microsegments.scale)",
|
|
60
|
+
DeprecationWarning, stacklevel=2)
|
|
61
|
+
c.pop("scales", None)
|
|
60
62
|
if title:
|
|
61
63
|
c["title"] = title
|
|
62
64
|
page_title = c.get("title") or _default_title(c, lang)
|