Spaces:
Build error
Build error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +8 -0
src/streamlit_app.py
CHANGED
|
@@ -229,6 +229,14 @@ line_chart = alt.Chart(filtered_crimes).mark_line(point=True).encode(
|
|
| 229 |
line_chart
|
| 230 |
|
| 231 |
### Use this one!!!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
# Identify top 10 crime types
|
| 233 |
top_10_crimes = df['crm_cd_desc'].value_counts().nlargest(10).index.tolist()
|
| 234 |
|
|
|
|
| 229 |
line_chart
|
| 230 |
|
| 231 |
### Use this one!!!
|
| 232 |
+
# Load geojson file.
|
| 233 |
+
gdf_counties = gpd.read_file("County_Boundary.geojson")
|
| 234 |
+
|
| 235 |
+
# Creat dropdown menu.
|
| 236 |
+
year_dropdown = ipywidgets.Dropdown(
|
| 237 |
+
options= sorted(df['year'].unique()),
|
| 238 |
+
description='Year:')
|
| 239 |
+
|
| 240 |
# Identify top 10 crime types
|
| 241 |
top_10_crimes = df['crm_cd_desc'].value_counts().nlargest(10).index.tolist()
|
| 242 |
|