wanwanlin0521 commited on
Commit
9565121
·
verified ·
1 Parent(s): 51e3afc

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +4 -2
src/streamlit_app.py CHANGED
@@ -8,8 +8,6 @@ Path(os.environ["STREAMLIT_CONFIG_DIR"]).mkdir(parents=True, exist_ok=True)
8
  import streamlit as st
9
  # …the rest of your imports and code…
10
 
11
-
12
-
13
  # Imports.
14
  import streamlit as st
15
  import seaborn as sns
@@ -252,6 +250,10 @@ line_chart
252
  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.""")
253
 
254
  ### Use this one!!!
 
 
 
 
255
  # Identify top 10 crime types
256
  top_10_crimes = df['crm_cd_desc'].value_counts().nlargest(10).index.tolist()
257
 
 
8
  import streamlit as st
9
  # …the rest of your imports and code…
10
 
 
 
11
  # Imports.
12
  import streamlit as st
13
  import seaborn as sns
 
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
  ### Use this one!!!
253
+ # Load data
254
+ with open("County_Boundary.geojson", "r", encoding="utf-8") as f:
255
+ geojson_data = json.load(f)
256
+
257
  # Identify top 10 crime types
258
  top_10_crimes = df['crm_cd_desc'].value_counts().nlargest(10).index.tolist()
259