Spaces:
Build error
Build error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +4 -0
src/streamlit_app.py
CHANGED
|
@@ -249,6 +249,10 @@ line_chart
|
|
| 249 |
|
| 250 |
st.markdown(""" This plot is a line chart visualizing the annual number of incidents for the top 5 most frequent crime types over a five-year period, from 2020 to 2024. Each line represents a distinct crime type, allowing for easy comparison of trends across different categories. The x-axis represents the year, the y-axis indicates the number of incidents, and a legend identifies the color corresponding to each specific crime type: Battery - Simple Assault, Burglary From Vehicle, Theft of Identity, Vandalism - Felony , and Vehicle - Stolen. The plot highlights the fluctuations and overall trajectories of these major crime categories across the years.""")
|
| 251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 252 |
|
| 253 |
# Identify top 10 crime types
|
| 254 |
top_10_crimes = df['crm_cd_desc'].value_counts().nlargest(10).index.tolist()
|
|
|
|
| 249 |
|
| 250 |
st.markdown(""" This plot is a line chart visualizing the annual number of incidents for the top 5 most frequent crime types over a five-year period, from 2020 to 2024. Each line represents a distinct crime type, allowing for easy comparison of trends across different categories. The x-axis represents the year, the y-axis indicates the number of incidents, and a legend identifies the color corresponding to each specific crime type: Battery - Simple Assault, Burglary From Vehicle, Theft of Identity, Vandalism - Felony , and Vehicle - Stolen. The plot highlights the fluctuations and overall trajectories of these major crime categories across the years.""")
|
| 251 |
|
| 252 |
+
# Load data
|
| 253 |
+
with open("County_Boundary.geojson", "r", encoding="utf-8") as f:
|
| 254 |
+
geojson_data = json.load(f)
|
| 255 |
+
|
| 256 |
|
| 257 |
# Identify top 10 crime types
|
| 258 |
top_10_crimes = df['crm_cd_desc'].value_counts().nlargest(10).index.tolist()
|