# Bhadradri Weather & Crop Alert Dashboard

## PURPOSE
An interactive Streamlit dashboard (Plotly charts) that visualises the two-day weather picture for Bhadradri Kothagudem district: the falling temperature, the hourly rain and thunder risk, and per-mandal crop exposure. It gives an agriculture officer or local TV reporter a single screen that mirrors the bulletin — "cool all of a sudden... thunder and lightning for the next two days... light rains in several places" — and lets them drill into the places most at risk.

## WHY THIS MATTERS
The transcript is a broadcast warning; a warning is only useful when people can see and understand it quickly. Dashboards turn tables of numbers into shared situational awareness. Students learn to move from raw records to visual storytelling — the same skill every newsroom, control room, and agri-extension office relies on during a weather event.

## HOW TO BUILD
1. Load a small weather table (or the CSV from v024__p2) with columns `date`, `place`, `rain_mm`, `temp_c`, `thunder`.
2. Add Streamlit sidebar filters for `place` and date range.
3. Build three Plotly figures: a line chart of temperature over time, a bar chart of rain by place, and a risk heatmap (place × hour) of rain/thunder probability.

```python
import streamlit as st, plotly.express as px, pandas as pd

df = pd.DataFrame(...)  # load weather rows
st.sidebar.multiselect("Place", df["place"].unique(), default=list(df["place"].unique()))
st.title("Bhadradri Kothagudem - 2-Day Weather & Crop Alert")
fig = px.line(df, x="date", y="temp_c", color="place",
              title="Sudden cooling trend")
st.plotly_chart(fig, use_container_width=True)
```

## WHEN TO USE IN PRODUCTION
Use it for extension offices, district control rooms, or news graphics that need a live view of forecast risk. Do NOT use it as an alerting mechanism on its own — nobody watches a dashboard at 3 a.m., so pair it with the push service in v024__p4. It is also unsuitable when data is confidential or when sub-minute latency is required.

## HOW IT HELPS STUDENTS
Students gain practical skills in Streamlit layout and widgets, Plotly/Express charting, Pandas filtering, and designing for a non-technical audience. They learn to connect a data source to a visual decision surface — a high-value, portfolio-ready deliverable.

## STARTER CODE
See `starter/main.py` for a runnable Streamlit app with deterministic sample data, three Plotly figures, and `# TODO` markers for a live data source.
