Logo Lanfrica

M-Linet/assignment-repo

Domain:

mobility

Record type:

software
Creator:
M-L
Host:
It is a Python application designed to provide insights into traffic conditions in Nairobi, Kenya. # 🚦 TRAFFIC-FLOW-TRACKER **Traffic Flow Tracker** is an open-source smart city traffic monitoring system designed for Nairobi. It leverages commodity hardware and Python-based simulation to provide actionable insights into traffic congestion, patterns, and route optimization. ## 🌟 Key Features ### πŸ™οΈ Nairobi-Specific Modeling - Monitors 8 major routes: Thika Road, Mombasa Road, Waiyaki Way, etc. - Custom algorithms for: - **Matatu patterns** - **VIP convoys** - **Rush hour surges (7–10am, 4–7pm)** - 15% chance of dynamic events (accidents, roadworks) ### πŸ“Š Smart Traffic Analysis - Three-tier status system: **Light**, **Moderate**, **Heavy** - Trend indicators: `↑↑`, `↑`, `β†’`, `↓`, `↓↓` - Delay predictions ranging from **5 minutes to over 1 hour** ### πŸ–₯️ Intuitive Dashboard - Color-coded indicators: **Green**, **Yellow**, **Red** - Auto-refreshes every 30 seconds - Top 4 recommended alternative routes ## πŸ›  Technologies Used - **Python** β€” for simulation and backend logic - **Tkinter** β€” interactive GUI - **Pandas & NumPy** β€” data processing - **Matplotlib / Seaborn** β€” visualizations - **Statsmodels / SciPy** β€” for statistical insights ## πŸ“„ File Breakdown ### `traffic_data.py` - Simulates Nairobi traffic conditions using stochastic and rule-based models - Calculates congestion levels on a scale from **0–100** - Generates live route recommendations based on congestion severity - Applies **GMT+3** timezone logic for accurate refresh cycles and delay predictions ### `interface.py` - Builds a responsive GUI using **Tkinter** - Displays traffic cards for each route with: - Real-time congestion indicators - Trend symbols (`↑↑`, `↑`, `β†’`, `↓`, `↓↓`) - Tailored route suggestions - Integrates a **30-second auto-refresh** system for dynamic updates ### `main.py` - Launches the full application - Bridges backend traffic logic with frontend GUI components - Handles the **main event loop** for continuous operation ## πŸš€ Usage Run the application from terminal: ```bash …