# Kakinada Port Road Repair Status Dashboard

## PURPOSE
A Streamlit + Plotly dashboard that visualises pothole reports and repair status
along the main road from Kumbhabhishekam Port in Kakinada towards the tidal area.
It shows severity by segment, the daily volume of two-wheeler commuters exposed,
and a bar chart of unresolved tickets — the evidence a citizens' group or a
reporter needs when pressing officials to repair the road.

## WHY THIS MATTERS
The transcript ends with locals "urging officials to immediately repair the road
before any loss of life occurs." A dashboard converts that appeal into a visible,
shareable picture: where the worst potholes are, how long they have been open, how
many workers are exposed daily. Visual accountability is what moves a grievance
from a complaint to a public agenda item.

## HOW TO BUILD
Use Streamlit for the UI and Plotly for interactive charts.
1. `pip install streamlit plotly pandas`
2. Load a complaint CSV or the SQLAlchemy DB from the service project.
3. Add sidebar filters for road segment and severity.
4. Render three views: a severity heat/bar by segment, a time series of new
   reports, and a KPI row of open critical tickets.
5. Run `streamlit run starter/main.py`.

Key chart call:

```python
fig = px.bar(
    grouped, x="segment", y="reports", color="severity",
    title="Two-wheeler commuters exposed by segment and severity",
)
st.plotly_chart(fig, use_container_width=True)
```

## WHEN TO USE IN PRODUCTION
Use it for public road-safety dashboards, a newsroom data desk, an NGO advocacy
page, or an internal municipal review meeting. Do NOT use it as the system of
record — it should read from the grievance service or an export, never own the
data. Also avoid heavy traffic dashboards behind a login when public transparency
is the goal; keep the default view open.

## HOW IT HELPS STUDENTS
Students learn dashboard information architecture, filter state, Plotly figure
construction and the discipline of separating presentation from data ownership.
They also practise framing a local issue for a non-technical audience.

## STARTER CODE
See `starter/main.py` — a Streamlit app with sidebar filters, a Plotly severity bar
chart, a report-volume line chart and `# TODO` markers for live DB and map views.
