Update src/streamlit_app.py
Browse files- src/streamlit_app.py +4 -4
src/streamlit_app.py
CHANGED
|
@@ -29,7 +29,7 @@ st.markdown("""
|
|
| 29 |
padding: 0 10px 20px; /* side & bottom padding */
|
| 30 |
font-family: 'Helvetica Neue', Arial, sans-serif;
|
| 31 |
}
|
| 32 |
-
.
|
| 33 |
font-family: 'Source Sans Pro', sans-serif;
|
| 34 |
font-size: 32px;
|
| 35 |
color: #2c3e50;
|
|
@@ -51,7 +51,7 @@ These insights can help police departments, community organizations, and policym
|
|
| 51 |
design targeted strategies to improve public safety.</div>""",unsafe_allow_html=True)
|
| 52 |
|
| 53 |
# 2. Data info & load
|
| 54 |
-
st.markdown("<div class='
|
| 55 |
st.markdown(
|
| 56 |
"""
|
| 57 |
- **Source:** LAPD crime incidents dataset
|
|
@@ -78,12 +78,12 @@ if df.empty:
|
|
| 78 |
st.stop()
|
| 79 |
|
| 80 |
# 3. Data preview
|
| 81 |
-
st.markdown("<div class='
|
| 82 |
st.write(f"Total records: {df.shape[0]} | Total columns: {df.shape[1]}")
|
| 83 |
st.dataframe(df.head())
|
| 84 |
|
| 85 |
# Pie Chart 1: Top 10 Crime Types
|
| 86 |
-
st.markdown("<div class='
|
| 87 |
|
| 88 |
years = sorted(df["year"].dropna().astype(int).unique())
|
| 89 |
# Prepend an “All” option
|
|
|
|
| 29 |
padding: 0 10px 20px; /* side & bottom padding */
|
| 30 |
font-family: 'Helvetica Neue', Arial, sans-serif;
|
| 31 |
}
|
| 32 |
+
.sectionheader {
|
| 33 |
font-family: 'Source Sans Pro', sans-serif;
|
| 34 |
font-size: 32px;
|
| 35 |
color: #2c3e50;
|
|
|
|
| 51 |
design targeted strategies to improve public safety.</div>""",unsafe_allow_html=True)
|
| 52 |
|
| 53 |
# 2. Data info & load
|
| 54 |
+
st.markdown("<div class='sectionheader'> Dataset Information</div>")
|
| 55 |
st.markdown(
|
| 56 |
"""
|
| 57 |
- **Source:** LAPD crime incidents dataset
|
|
|
|
| 78 |
st.stop()
|
| 79 |
|
| 80 |
# 3. Data preview
|
| 81 |
+
st.markdown("<div class='sectionheader'> Data Preview</div>")
|
| 82 |
st.write(f"Total records: {df.shape[0]} | Total columns: {df.shape[1]}")
|
| 83 |
st.dataframe(df.head())
|
| 84 |
|
| 85 |
# Pie Chart 1: Top 10 Crime Types
|
| 86 |
+
st.markdown("<div class='sectionheader'> Top 10 Crime Types by Year </div>")
|
| 87 |
|
| 88 |
years = sorted(df["year"].dropna().astype(int).unique())
|
| 89 |
# Prepend an “All” option
|