wen11235 commited on
Commit
35111f7
·
verified ·
1 Parent(s): 26e03b2

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. 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()', 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(
 
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(