Update src/streamlit_app.py
Browse files- src/streamlit_app.py +11 -7
src/streamlit_app.py
CHANGED
|
@@ -51,12 +51,17 @@ design targeted strategies to improve public safety.</div>""",unsafe_allow_html=
|
|
| 51 |
# 2. Data info & load
|
| 52 |
st.markdown("<div class='sectionheader'> Dataset Information </div>", unsafe_allow_html=True)
|
| 53 |
st.markdown(
|
| 54 |
-
"""
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
)
|
| 61 |
|
| 62 |
# 1. Resolve the path to the CSV next to this script
|
|
@@ -77,7 +82,6 @@ if df.empty:
|
|
| 77 |
|
| 78 |
# 3. Data preview
|
| 79 |
st.markdown("<div class='sectionheader'> Data Preview </div>", unsafe_allow_html=True)
|
| 80 |
-
st.write(f"Total records: {df.shape[0]} | Total columns: {df.shape[1]}")
|
| 81 |
st.markdown(
|
| 82 |
f"<div class='description'>"
|
| 83 |
f"Total records: <strong>{df.shape[0]:,}</strong> | "
|
|
|
|
| 51 |
# 2. Data info & load
|
| 52 |
st.markdown("<div class='sectionheader'> Dataset Information </div>", unsafe_allow_html=True)
|
| 53 |
st.markdown(
|
| 54 |
+
"""
|
| 55 |
+
<div class="description">
|
| 56 |
+
<ul>
|
| 57 |
+
<li><strong>Source:</strong> LAPD crime incidents dataset</li>
|
| 58 |
+
<li><strong>Rows:</strong> one incident per row</li>
|
| 59 |
+
<li><strong>Columns:</strong> e.g. <code>crm_cd_desc</code> (crime type), <code>arrest</code> (boolean), <code>year</code>, <code>location_description</code>, etc.</li>
|
| 60 |
+
<li><strong>Purpose:</strong> Interactive exploration of top crime categories and arrest rates.</li>
|
| 61 |
+
</ul>
|
| 62 |
+
</div>
|
| 63 |
+
""",
|
| 64 |
+
unsafe_allow_html=True
|
| 65 |
)
|
| 66 |
|
| 67 |
# 1. Resolve the path to the CSV next to this script
|
|
|
|
| 82 |
|
| 83 |
# 3. Data preview
|
| 84 |
st.markdown("<div class='sectionheader'> Data Preview </div>", unsafe_allow_html=True)
|
|
|
|
| 85 |
st.markdown(
|
| 86 |
f"<div class='description'>"
|
| 87 |
f"Total records: <strong>{df.shape[0]:,}</strong> | "
|