Inspiration

Grocery receipts hide the real climate cost. People want quick, trustworthy feedback without new habits or accounts. A simple desktop tool that works offline lowers friction and builds awareness.

What it does

Paste a shopping list or load a .txt receipt. Normalizes items (lowercase, hyphens/spaces, simple plurals) and matches them to a CO₂e dataset. Calculates total emissions and per‑item breakdown. Displays a clear bar chart. Lists unknown items and lets users add their own CO₂e estimates to a local “custom” category.

How i built it

Python 3, Tkinter for UI, Matplotlib for charts. JSON dataset (dbx) with categories → items → kg CO₂e per unit. Text parser for quantities like “2 apples”, “apples x2”, “2x apples”, or just “apples”. Matching service: normalization + a few lookup variants (singular/no‑space). Calculator aggregates per‑item and per‑category totals. Unknown-item dialog writes user estimates back to dbx for persistence.

Challenges i ran into

Item name normalization and avoiding false matches. Handling unknown items without blocking the flow. Cross‑platform dependencies (Tkinter via OS packages vs pip). Keeping the UI minimal yet informative. GitHub auth (PATs vs passwords) during repo setup.

Accomplishments that i'm proud of

A working MVP that loads receipts, computes totals, and visualizes results. Clean unknown‑item workflow with instant persistence. Offline, privacy‑friendly design with an editable dataset. Simple code structure that’s easy to extend.

What i learned

Good normalization beats ad‑hoc matching for messy inputs. Users need transparency around assumed factors and units. Small UX touches (defaults, clear errors) matter for trust

What's next for Greentracker

OCR/PDF parsing for photo and PDF receipts. Smarter fuzzy matching and multi‑language support. Units and weights (g/kg/ml) with price/weight heuristics. Export/share (CSV, image, PDF) and “compare trips” history. Community dataset sync and curation. Packaging for Windows/macOS/Linux as standalone apps.

Built With

Share this project:

Updates