vgosavi2 commited on
Commit
a5e7021
·
verified ·
1 Parent(s): c569588

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +4 -4
src/streamlit_app.py CHANGED
@@ -37,7 +37,7 @@ st.markdown("""
37
  margin-bottom: 10px;
38
  border-bottom: 3px solid #ccc;
39
  padding-bottom: 8px;
40
- }
41
  </style>
42
  """, unsafe_allow_html=True)
43
 
@@ -51,7 +51,7 @@ These insights can help police departments, community organizations, and policym
51
  design targeted strategies to improve public safety.</div>""",unsafe_allow_html=True)
52
 
53
  # 2. Data info & load
54
- st.header("<div class='section-header'> Dataset Information </div>")
55
  st.markdown(
56
  """
57
  - **Source:** LAPD crime incidents dataset
@@ -78,12 +78,12 @@ if df.empty:
78
  st.stop()
79
 
80
  # 3. Data preview
81
- st.header("<div class='section-header'> Data Preview</div>")
82
  st.write(f"Total records: {df.shape[0]} | Total columns: {df.shape[1]}")
83
  st.dataframe(df.head())
84
 
85
  # Pie Chart 1: Top 10 Crime Types
86
- st.header("<div class='section-header'> Top 10 Crime Types by Year </div>")
87
 
88
  years = sorted(df["year"].dropna().astype(int).unique())
89
  # Prepend an “All” option
 
37
  margin-bottom: 10px;
38
  border-bottom: 3px solid #ccc;
39
  padding-bottom: 8px;
40
+ }
41
  </style>
42
  """, unsafe_allow_html=True)
43
 
 
51
  design targeted strategies to improve public safety.</div>""",unsafe_allow_html=True)
52
 
53
  # 2. Data info & load
54
+ st.markdown("<div class='section-header'> Dataset Information</div>")
55
  st.markdown(
56
  """
57
  - **Source:** LAPD crime incidents dataset
 
78
  st.stop()
79
 
80
  # 3. Data preview
81
+ st.markdown("<div class='section-header'> Data Preview</div>")
82
  st.write(f"Total records: {df.shape[0]} | Total columns: {df.shape[1]}")
83
  st.dataframe(df.head())
84
 
85
  # Pie Chart 1: Top 10 Crime Types
86
+ st.markdown("<div class='section-header'> Top 10 Crime Types by Year </div>")
87
 
88
  years = sorted(df["year"].dropna().astype(int).unique())
89
  # Prepend an “All” option