
GreenRoute — eco-routing for Nairobi that calculates the most fuel-efficient route, not just the fastest one.
Nairobi's road network hasn't kept pace with its population or vehicle growth, making it one of the most congested cities in the region. Congestion alone is estimated to cost the Kenyan economy close to $1 billion a year in lost productivity, with other estimates putting annual losses from delays and wasted fuel above KSh 160 billion. By 2021, a 10-minute cross-town trip averaged nearly an hour at peak times, and private cars made up most of the traffic volume while moving only a fraction of commuters. This congestion compounds an environmental problem: Kenya's transport sector is a meaningful and growing share of national emissions, with road transport responsible for nearly all of it, and transport is a major contributor to Nairobi's air pollution. Yet the navigation tools people actually use optimize only for distance and time. They ignore Nairobi's hilly terrain (climbs burn far more fuel), road surface quality, and give local operators no way to feed in real-time ground truth like closures or known hotspots. No tool lets drivers or fleets measure the fuel or emissions impact of routes they actually take. Result: avoidable fuel waste, cost, and emissions, with no way to route around it or measure it.
GreenRoute is an eco-routing engine for Nairobi that optimizes for fuel and emissions instead of just speed or distance: what's the route that burns the least fuel for this vehicle, given today's traffic and this road's real condition? It's a Django platform with a public client route planner and an internal admin panel, built on a custom routing engine over real Nairobi OpenStreetMap data. Core innovation — the eco_weight algorithm: every road segment gets a custom cost value instead of raw distance, built from: Elevation grade penalties: climbing a steep segment costs far more than descending one saves, mirroring real fuel use Surface-type penalties: unpaved, dirt, or gravel roads are penalized, steering routes toward paved alternatives Live traffic penalties: segments hit by active incidents are penalized to route around jams Access/closure penalties: roads marked private, restricted, or admin-closed are effectively avoided All penalty values are tunable system settings, not hardcoded. Built for speed: bounding-box subgraphing carves a small temporary graph around each trip instead of searching the whole city, and an A* search guided by a directional heuristic finds the route fast enough for live, interactive use. Quantified impact: every trip estimates fuel saved (vs. a standard-route baseline, with optional custom vehicle fuel economy/price) and CO2 prevented, logged for ongoing analytics. Two-sided platform: the client portal gives users an interactive planner, login, route history with CSV export, and admin chat. The admin panel lets operators define live road modifiers (closures, traffic zones) from real local knowledge, tune routing parameters, manage users, and monitor analytics — closing the gap where global map providers can't incorporate real-time, hyper-local ground truth. Live data: TomTom traffic incidents (with graceful fallback) and OSM-based place search scoped to Nairobi. Currently deployed on Railway, with M-Pesa integration scaffolded for future fleet/organization-tier monetization.
