vgosavi2 commited on
Commit
19f42ee
·
verified ·
1 Parent(s): d49e66a

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +20 -33
src/streamlit_app.py CHANGED
@@ -15,54 +15,41 @@ st.markdown("""
15
  .title {
16
  text-align: center;
17
  padding: 25px;
 
 
18
  }
19
- /* ROOT & BODY */
20
- body {
21
- background-color: #f8f9fa; /* light grey background */
22
- color: #333333; /* dark grey text */
23
- font-family: "Helvetica Neue", Arial, sans-serif;
24
- }
25
-
26
- /* HEADINGS */
27
- h1, h2, h3, h4, h5, h6 {
28
- font-family: "Source Sans Pro", sans-serif;
29
- color: #2c3e50; /* nice navy */
30
- margin-top: 1.5em;
31
- margin-bottom: 0.5em;
32
- }
33
- /* PARAGRAPHS */
34
- p, .stMarkdown p {
35
- font-size: 18px; /* comfortable reading size */
36
- line-height: 1.6; /* good line spacing */
37
- color: #4b4b4b; /* slightly lighter grey */
38
- max-width: 800px; /* prevent overly long lines */
39
- margin: 0.75em auto; /* vertical spacing, centered */
40
- padding: 0 10px; /* small side padding */
41
- }
42
-
43
- /* OPTIONAL: a helper class for even tighter control */
44
- .writeup {
45
- max-width: 700px;
46
- margin: 1em auto;
47
- padding: 0 15px;
48
- }
49
  </style>
50
  """, unsafe_allow_html=True)
51
 
52
  st.markdown("<div class='title'><h1> LAPD Crime Insights Dashboard </h1></div>", unsafe_allow_html=True)
53
 
54
  # 1. Page title
55
- st.markdown(""" This application provides a suite of interactive visualizations—pie charts, bar charts, scatter plots, and more—that let you explore crime patterns in the LAPD dataset from multiple angles. Quickly see which offense categories dominate, compare arrest rates against non-arrests, track how crime volumes change over time, and examine geographic hotspots. These insights can help police departments, community organizations, and policymakers allocate resources more effectively and design targeted strategies to improve public safety.""")
 
 
 
 
56
 
57
  # 2. Data info & load
58
  st.header("Dataset Information")
59
  st.markdown(
60
- """<div class='p'><p>
61
  - **Source:** LAPD crime incidents dataset
62
  - **Rows:** incidents (one per row)
63
  - **Columns:** e.g. `crm_cd_desc` (crime type), `arrest` (boolean), `date`, `location_description`, etc.
64
  - **Purpose:** Interactive exploration of top crime categories and arrest rates.
65
- </p></div>"""
66
  )
67
 
68
  # 1. Resolve the path to the CSV next to this script
 
15
  .title {
16
  text-align: center;
17
  padding: 25px;
18
+ color: #2c3e50;
19
+ font-family: 'Source Sans Pro', sans-serif;
20
  }
21
+ /* Paragraph/write-up styling */
22
+ .description {
23
+ max-width: 800px; /* prevent super long lines */
24
+ margin: 0 auto; /* center the block */
25
+ font-size: 18px; /* comfortable reading size */
26
+ line-height: 1.6; /* good spacing */
27
+ color: #4b4b4b; /* dark grey text */
28
+ text-align: justify; /* nice full-justified look */
29
+ padding: 0 10px 20px; /* side & bottom padding */
30
+ font-family: 'Helvetica Neue', Arial, sans-serif;
31
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  </style>
33
  """, unsafe_allow_html=True)
34
 
35
  st.markdown("<div class='title'><h1> LAPD Crime Insights Dashboard </h1></div>", unsafe_allow_html=True)
36
 
37
  # 1. Page title
38
+ st.markdown(""" <div class='description'> This application provides a suite of interactive visualizations—pie charts,
39
+ bar charts, scatter plots, and more—that let you explore crime patterns in the LAPD dataset from multiple angles.
40
+ Quickly see which offense categories dominate, compare arrest rates against non-arrests, track how crime volumes change over time, and examine geographic hotspots.
41
+ These insights can help police departments, community organizations, and policymakers allocate resources more effectively and
42
+ design targeted strategies to improve public safety. </div>""")
43
 
44
  # 2. Data info & load
45
  st.header("Dataset Information")
46
  st.markdown(
47
+ """
48
  - **Source:** LAPD crime incidents dataset
49
  - **Rows:** incidents (one per row)
50
  - **Columns:** e.g. `crm_cd_desc` (crime type), `arrest` (boolean), `date`, `location_description`, etc.
51
  - **Purpose:** Interactive exploration of top crime categories and arrest rates.
52
+ """
53
  )
54
 
55
  # 1. Resolve the path to the CSV next to this script