opentrash
A geospatial Python package for residential waste collection analytics. Vehicle GPS telematics + parcel polygons + route polygons → per-parcel service signatures and self-contained interactive route maps.
opentrash is for waste-collection agencies, civic technologists, and
operations researchers working with vehicle-fleet data. It ingests GPS
telematics, parcel polygons, route polygons, and facility locations,
performs a single disciplined spatial-join pass — the routing engine —
and produces two analytical products on top:
- Patterns — per-parcel service signatures (weekly, weekly-double, biweekly) derived from months or years of pings. Answers "for this parcel, who serves it regularly, on what day, at what hour?"
- RouteView — a self-contained interactive HTML map for one route + day + vehicle. The truck's trail renders as colored GPS dots, parcels color by served / missed / unknown, and patterns expectations overlay on today's reality. Drop it on a USB stick, email it, host it static.
The architectural principle is spatial joins are infrastructure; products are calculations. Everything downstream of the engine is pure aggregation on enriched pings.
Install
pip install opentrash
Optional extras for specific data sources:
pip install "opentrash[geotab]" # Geotab GPS adapter
pip install "opentrash[postgres]" # PostgreSQL/PostGIS GPS adapter
pip install "opentrash[dev]" # pytest, ruff, and test dependencies
Requires Python 3.11 or newer.
Quickstart
After installation, verify that the package and command-line entry point are available:
opentrash --help
opentrash --version
opentrash doctor
You can also run the package as a module:
python -m opentrash
The current CLI is intentionally lightweight. It provides package discovery, version reporting, and environment checks while higher-level workflow commands are being developed.
opentrash modules # list core package modules
opentrash doctor # check core imports and optional dependency groups
For Python users, opentrash currently exposes module-level building blocks
for GPS adapters, cache/index management, static-layer preparation, routing
engine enrichment, pattern detection, route rendering, and tonnage ingest.
Example imports:
from opentrash.core.vehicle_ids import parse_vehicle_id
from opentrash.engine.enrichment import enrich_pings
from opentrash.patterns.runner import run_patterns
from opentrash.routeview.runner import render_routeview
from opentrash.tonnage.pipeline import run_ingest
The package is in alpha. APIs are usable, but some workflow-level wrappers, sample-data tutorials, and fuller CLI pipeline commands are still being built.
Architecture
GPS ingest → cache → engine (the only spatial-join layer)
│
↓ enriched pings
│
┌───────────┴───────────┐
↓ ↓
patterns (macro) segments (timeline)
per-parcel signatures │
across the window ↓
RouteView (micro)
one (route, day, vehicle)
as interactive HTML
Patterns is the macro view; RouteView is the micro view. Together they form a validation loop: long-period patterns predict who should show up; the single-day RouteView shows who actually did.
Documentation
Full documentation, including a getting-started guide, architecture overview, and roadmap, lives at opentrash.app.
Source repository
opentrash is currently in alpha. The published package artifacts are
available through PyPI, while the GitHub repository remains private during
early API, documentation, and sample-data hardening. The public repository
will be opened after the package interface and contributor workflow stabilize.
How it's built
opentrash uses DuckDB for set-based aggregations
(chunked and idempotent for large datasets),
GeoPandas + Shapely
for in-memory geometry, PyProj for
projections, and MapLibre GL JS for rendered HTML
maps. No commercial dependencies, no tile-provider lock-in.
License
Apache License 2.0.
You may use, modify, and redistribute opentrash for any purpose,
including commercial use, provided you retain the license and copyright
notices.
Citation
Citation metadata will be published with the public source repository. Until
then, please cite the PyPI package name, version, and documentation site when
referencing opentrash in academic or public-facing work.
Acknowledgments
Developed under AI Research Corps (AIRC), a 501(c)(3) nonprofit. A free 12-lesson course covering the package implementation is available at airesearchcorps.org/opentrash.
Metadata
Release files for opentrash 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opentrash-0.2.1.tar.gz | 115.0 kB | Without provenance | Details for opentrash-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opentrash-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for opentrash-0.2.1-py3-none-any.whl |
Total release size: 218.2 kB
Release files / opentrash-0.2.1.tar.gz
| Download URL | opentrash-0.2.1.tar.gz |
|---|---|
| Size | 115.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e2a934be6afe316dc57c3c086876afa63f3fb2c41eba1e2ae0d58883989c369
|
|
BLAKE2b-256 checksum How to use checksums |
41ec5832b726d3986ac8d88324be669abd7a968be51c8df6b1537af3907512a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / opentrash-0.2.1-py3-none-any.whl
| Download URL | opentrash-0.2.1-py3-none-any.whl |
|---|---|
| Size | 103.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e17639333623a65beecc162d82907621d436c4b6b5051bd9a470a7ce66b11beb
|
|
BLAKE2b-256 checksum How to use checksums |
9459dbc8df2b2abd8ea1649499243e8abe6352a0f2c1e049fb1e574bff77a9d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for opentrash 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.