Open Source · Cloud-Native Geospatial

Learn to build opentrash, one lesson at a time.

A hands-on course that walks you through building a real open source Python package for residential waste operations — from an empty repository to a published, documented, installable tool. You watch each lesson, then build that slice of the package yourself.

Stack: Python · DuckDB · GeoPandas · MapLibre Output: a package + its docs site Ships to: PyPI · conda-forge

1 What you’ll build

opentrash is an open source Python package for analyzing residential solid waste collection operations using GPS telematics, enterprise waste-management data, and municipal parcel layers. By the end you’ll have built two working products and published the package.

A

RouteView

Given one route and one day, produce a polished interactive HTML map showing the route polygon, the serving vehicle’s GPS trail, landfill tips, parcels served vs missed, and tonnage delivered. Runs in seconds. Embeddable in apps, notebooks, or a batch job writing hundreds of HTMLs to a folder.

B

Patterns

Given a long GPS history, detect each parcel’s weekly and biweekly service signature — typical day, hour, vehicle, regularity. Produces a portable parquet file RouteView can optionally consume to compare today’s operation against the yearly pattern.

The same tools enterprise fleet software sells for six figures — built on open standards and open data, runnable on a laptop. The goal: package years of operational practice cleanly, teach it, and let any agency benefit without starting from scratch.

2 Roadmap

Where the project heads after the core release. None of these are built in the current run — they’re named so you know the direction of travel.

Future

RouteEdit

A third sister product alongside RouteView and Patterns. An interactive HTML map for editing routes — selection tools (click, lasso, polygon), a side panel listing selected parcels and route assignments, and an audit trail of every move. The open source counterpart to enterprise tools like EasyRoute.

Sister module: routeedit/, peer to routeview/.

Future

Sample synthetic data

A small, redistributable synthetic dataset so anyone can clone the repo and run RouteView and Patterns end-to-end without operational data. Critical for tutorials, onboarding, and reproducibility.

Future

Cloud-hosted demo

A live, publicly browsable RouteView instance running on the synthetic dataset, deployed via Streamlit or similar. Lets evaluators try it before installing anything.

Future

Hardware integrations

Experimental: an ESP32 + RFID reader to read container tags, and a low-cost vehicle-mounted LiDAR (Raspberry Pi) to measure alley widths for routing safety. Surfaced from real operational pain points.

3 Who this course is for

  • Learners and students who want to learn applied geospatial software engineering by building something real.
  • Contributors — engineers, data scientists, GIS folks who want to build on a working foundation.
  • Public-sector and civic-tech folks curious how a cloud-native waste-ops tool comes together.

Just want to use the package rather than build it? You’ll want the opentrash package documentation site instead — this course is about learning to build it from scratch.

4 Before you start

Three things get you grounded before Lesson 1. Plan roughly 75 minutes of focused time, spread across the week.

  1. 1

    Understand the domain ~15 min

    Watch “GIS for Solid Waste Management” (GIS Day 2024). You’ll learn what a residential pickup operation looks like, the three-tier GIS data taxonomy (operational, support, strategic), and the auto vs manual vehicle distinction. Short, dense, no fluff.

  2. 2

    See the product in action ~15 min

    Watch the RouteView live demo (first ~17 min) of the ASPRS SDSU Chapter presentation on cloud-native geospatial integration. You’ll see the tool running on real data — parquet compression, DuckDB speed, MapLibre HTML output, GitHub Pages deployment. This is what you’ll be building.

  3. 3

    Set up your development environment ~45 min

    Follow the Setup Guide — a step-by-step walkthrough for macOS, Windows, and Linux that gets your machine ready and your repository created. Prefer watching to reading? Dr. Wu’s Geographic Software Design lectures 2 and 3 (in Resources) cover the same ground.

That’s the prep. Everything deeper, you’ll build through the lessons. You don’t need to understand the code before you start — building it is how you understand it.

5 Lesson series

Each lesson is a recorded screencast. You watch it, then build that layer of the package yourself. Lessons unlock as the series progresses. Companion resources are listed per lesson when available — optional supporting material; the lessons are self-contained.

#LessonCore conceptsCompanionStatus
0From notebook to packageRepo skeleton; prep/sites; install & CIPEP 621; src vs flat layoutsAvailable
1Orientation — repo, environment, package anatomypyproject.toml, editable installs, the layout mappip editable installs; PEP 621 optional depsAvailable
2The foundation — CRS, DuckDB, parcelscore/{crs,duckdb_session}; prep/parcelsEPSG:2230; DuckDB spatial extensionAvailable
3Routes & facilitiesprep/static_layers — routes (AUTO + HTC) and facilitiesHTC buffer rule; dissolve-by-attributeAvailable
4Sites — customer accountsprep/sites — points layer, spatial join to parcelsGeoPandas sjoin; point-in-polygonAvailable
5Tonnage — Excel to parquettonnage/*; core/vehicle_ids; docs deployidempotent upsert; hash-based dedup; MkDocs MaterialAvailable
6GPS adapters & cacheadapters/gps/{base,geotab,postgres}; cache/gps_cacheProtocol; env-var config; cache-first readsAvailable
7The substrate — indexes & WKBprep/parcels_wkb; cache/{gps_indexes,master_index}WKB; STAC-like bbox cross-joinAvailable
8Routing engine — enrichmentengine/{enrichment,config} — ping ↔ all GIS layersOne DuckDB CTAS; speed-gated parcel attributionAvailable
9Segments — load-organized timelineengine/segments — depot / windshield / collection / dump + violationshaversine; gap-and-island; load-numberingAvailable
10Pattern detection — route-agnostic chunked DuckDBpatterns/{config,window,detector,runner,validator}(parcel, vehicle) ranking; composite biweekly; idempotent chunksAvailable
11RouteView — the interactive maprouteview/{rank,trail,parcel_eval,render,runner}MapLibre HTML; trail as dots; patterns overlayAvailable
12PublishingLICENSE · README · CHANGELOG · CITATION · release.ymlApache 2.0; PyPI; the repeatable release loopAvailable

6 Resources

Required for the course

Development environment

  • Setup Guide — step-by-step for macOS, Windows, Linux.
  • Dr. Wu — Geographic Software Design, Lecture 2 (software setup) link to be added
  • Dr. Wu — Geographic Software Design, Lecture 3 (Python environments) link to be added

Recommended if you want to go deeper

Dr. Wu — Open Science Workshop Series

  • Open Code — Git, GitHub, VS Code, UV link to be added
  • Open Data — FAIR principles; GitHub Releases & Hugging Face
  • Open Results — MkDocs templates, notebook-driven sites, GitHub Pages
  • Open Publishing — MyST markdown for tutorials, papers, books

The full courses

  • Geographic Software Design (Dr. Qiusheng Wu, UTK) — 38-lecture course on Python packaging, GeoPandas, mapping libraries, widgets, conda-forge publishing. playlist link to be added
  • DuckDB for Geospatial (Dr. Qiusheng Wu, UTK) — 12-lecture course on DuckDB fundamentals, SQL, spatial extensions, cloud-native analytics. playlist link to be added
  • Open Science Workshop Series (Dr. Qiusheng Wu, UTK) — the four workshops above. playlist link to be added

7 How we work

Be curious Ask early Ship small Write it down Help each other
  • Cadence: work through lessons at the pace set for your cohort or your own schedule.
  • Preparation matters. Show up having tried the thing. It’s fine to be stuck; it’s not fine to be absent from your own learning.
  • Honor code. Credit your sources. Attribute code you adapt. Be honest about what you built and what you borrowed. This is open source — the ethics are the craft.
  • Expect change. This is a working product shaped in real time. Specs will shift. That’s engineering.