liberatoratif commited on
Commit
9194817
1 Parent(s): 618f299

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ counties = st.selectbox('Select a County below', list(lats_longs.keys()))
30
 
31
  # but = st.button('SHOW')
32
 
33
- @st.cache
34
  def county_select(county):
35
  path = "county/{}.csv".format(county)
36
  crime = pd.read_csv(path)
@@ -128,5 +128,5 @@ st.markdown("<hr>", unsafe_allow_html=True)
128
  st.markdown("<h4 style='text-align: centre; color: red;'>MOST COMMON TYPES OF PLACES WHERE CRIMES OCCUR</h4>",
129
  unsafe_allow_html=True)
130
  yearcol7 = st.selectbox('Select Year', [2020, 2021, 2022, 2023], key = 'year8')
131
- ba = px.bar(pd.DataFrame(crime[crime['year'] == yearcol7].Location.value_counts()[:25]), y = 'count', width=1200, height=700)
132
  st.plotly_chart(ba)
 
30
 
31
  # but = st.button('SHOW')
32
 
33
+ @st.cache_data
34
  def county_select(county):
35
  path = "county/{}.csv".format(county)
36
  crime = pd.read_csv(path)
 
128
  st.markdown("<h4 style='text-align: centre; color: red;'>MOST COMMON TYPES OF PLACES WHERE CRIMES OCCUR</h4>",
129
  unsafe_allow_html=True)
130
  yearcol7 = st.selectbox('Select Year', [2020, 2021, 2022, 2023], key = 'year8')
131
+ ba = px.bar(pd.DataFrame(crime[crime['year'] == yearcol7].Location.value_counts()[:25]), y = 'counts', width=1200, height=700)
132
  st.plotly_chart(ba)