Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -2
src/streamlit_app.py
CHANGED
|
@@ -9,7 +9,7 @@ st.title("Phase 02: Interactive Crime Data Pie Charts")
|
|
| 9 |
st.header("Dataset Information")
|
| 10 |
st.markdown(
|
| 11 |
"""
|
| 12 |
-
- **Source:**
|
| 13 |
- **Rows:** incidents (one per row)
|
| 14 |
- **Columns:** e.g. `crm_cd_desc` (crime type), `arrest` (boolean), `date`, `location_description`, etc.
|
| 15 |
- **Purpose:** Explore crime-type distribution and arrest outcomes via pie charts.
|
|
@@ -18,7 +18,8 @@ st.markdown(
|
|
| 18 |
|
| 19 |
@st.cache_data
|
| 20 |
def load_data():
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
df = load_data()
|
| 24 |
|
|
|
|
| 9 |
st.header("Dataset Information")
|
| 10 |
st.markdown(
|
| 11 |
"""
|
| 12 |
+
- **Source:** LAPD crime incidents dataset
|
| 13 |
- **Rows:** incidents (one per row)
|
| 14 |
- **Columns:** e.g. `crm_cd_desc` (crime type), `arrest` (boolean), `date`, `location_description`, etc.
|
| 15 |
- **Purpose:** Explore crime-type distribution and arrest outcomes via pie charts.
|
|
|
|
| 18 |
|
| 19 |
@st.cache_data
|
| 20 |
def load_data():
|
| 21 |
+
data_path = "crime_data.csv"
|
| 22 |
+
return pd.read_csv(data_path)
|
| 23 |
|
| 24 |
df = load_data()
|
| 25 |
|