Spaces:
Build error
Build error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -2
src/streamlit_app.py
CHANGED
|
@@ -358,8 +358,8 @@ df_top = df[df['crm_cd_desc'].isin(top_crimes)]
|
|
| 358 |
heatmap1_df = df_top.groupby(['crm_cd_desc', 'year']).size().reset_index(name='count')
|
| 359 |
|
| 360 |
# Create the slider based on the previous heatmap.
|
| 361 |
-
year_slider = alt.binding_range(min=heatmap1_df['year'].min(), max=heatmap1_df['year'].max()
|
| 362 |
-
year_select = alt.selection_point(fields=['year'], bind=year_slider,value=2022, name="Select")
|
| 363 |
|
| 364 |
# Convert the heatmap into bar chart.
|
| 365 |
barchart = alt.Chart(heatmap1_df).mark_bar().encode(
|
|
|
|
| 358 |
heatmap1_df = df_top.groupby(['crm_cd_desc', 'year']).size().reset_index(name='count')
|
| 359 |
|
| 360 |
# Create the slider based on the previous heatmap.
|
| 361 |
+
year_slider = alt.binding_range(min=heatmap1_df['year'].min(), max=heatmap1_df['year'].max(), step=1)
|
| 362 |
+
year_select = alt.selection_point(fields=['year'], bind=year_slider, value = 2022, name="Select")
|
| 363 |
|
| 364 |
# Convert the heatmap into bar chart.
|
| 365 |
barchart = alt.Chart(heatmap1_df).mark_bar().encode(
|