Update src/streamlit_app.py
Browse files- src/streamlit_app.py +32 -2
src/streamlit_app.py
CHANGED
|
@@ -16,6 +16,36 @@ st.markdown("""
|
|
| 16 |
text-align: center;
|
| 17 |
padding: 25px;
|
| 18 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</style>
|
| 20 |
""", unsafe_allow_html=True)
|
| 21 |
|
|
@@ -26,13 +56,13 @@ st.markdown(""" This application provides a suite of interactive visualizations
|
|
| 26 |
|
| 27 |
# 2. Data info & load
|
| 28 |
st.header("Dataset Information")
|
| 29 |
-
st.markdown(
|
| 30 |
"""
|
| 31 |
- **Source:** LAPD crime incidents dataset
|
| 32 |
- **Rows:** incidents (one per row)
|
| 33 |
- **Columns:** e.g. `crm_cd_desc` (crime type), `arrest` (boolean), `date`, `location_description`, etc.
|
| 34 |
- **Purpose:** Interactive exploration of top crime categories and arrest rates.
|
| 35 |
-
"""
|
| 36 |
)
|
| 37 |
|
| 38 |
# 1. Resolve the path to the CSV next to this script
|
|
|
|
| 16 |
text-align: center;
|
| 17 |
padding: 25px;
|
| 18 |
}
|
| 19 |
+
/* ROOT & BODY */
|
| 20 |
+
body {
|
| 21 |
+
background-color: #f8f9fa; /* light grey background */
|
| 22 |
+
color: #333333; /* dark grey text */
|
| 23 |
+
font-family: "Helvetica Neue", Arial, sans-serif;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
/* HEADINGS */
|
| 27 |
+
h1, h2, h3, h4, h5, h6 {
|
| 28 |
+
font-family: "Source Sans Pro", sans-serif;
|
| 29 |
+
color: #2c3e50; /* nice navy */
|
| 30 |
+
margin-top: 1.5em;
|
| 31 |
+
margin-bottom: 0.5em;
|
| 32 |
+
}
|
| 33 |
+
/* PARAGRAPHS */
|
| 34 |
+
p, .stMarkdown p {
|
| 35 |
+
font-size: 18px; /* comfortable reading size */
|
| 36 |
+
line-height: 1.6; /* good line spacing */
|
| 37 |
+
color: #4b4b4b; /* slightly lighter grey */
|
| 38 |
+
max-width: 800px; /* prevent overly long lines */
|
| 39 |
+
margin: 0.75em auto; /* vertical spacing, centered */
|
| 40 |
+
padding: 0 10px; /* small side padding */
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
/* OPTIONAL: a helper class for even tighter control */
|
| 44 |
+
.writeup {
|
| 45 |
+
max-width: 700px;
|
| 46 |
+
margin: 1em auto;
|
| 47 |
+
padding: 0 15px;
|
| 48 |
+
}
|
| 49 |
</style>
|
| 50 |
""", unsafe_allow_html=True)
|
| 51 |
|
|
|
|
| 56 |
|
| 57 |
# 2. Data info & load
|
| 58 |
st.header("Dataset Information")
|
| 59 |
+
st.markdown(<div class='p'><p>
|
| 60 |
"""
|
| 61 |
- **Source:** LAPD crime incidents dataset
|
| 62 |
- **Rows:** incidents (one per row)
|
| 63 |
- **Columns:** e.g. `crm_cd_desc` (crime type), `arrest` (boolean), `date`, `location_description`, etc.
|
| 64 |
- **Purpose:** Interactive exploration of top crime categories and arrest rates.
|
| 65 |
+
</p></div>"""
|
| 66 |
)
|
| 67 |
|
| 68 |
# 1. Resolve the path to the CSV next to this script
|