namdini commited on
Commit
ffa7f90
·
verified ·
1 Parent(s): 41058b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -444,7 +444,15 @@ def main():
444
  # Create 5th Visualization: Injuries and fatalities chart
445
  injuries_fatalities_chart = create_injuries_fatalities_chart(df, unit_type)
446
  st.altair_chart(injuries_fatalities_chart, use_container_width=True)
447
- st.markdown("#### TODO: add write-up for this 5th chart.")
 
 
 
 
 
 
 
 
448
 
449
  with tab5:
450
  # Dropdown for category selection
 
444
  # Create 5th Visualization: Injuries and fatalities chart
445
  injuries_fatalities_chart = create_injuries_fatalities_chart(df, unit_type)
446
  st.altair_chart(injuries_fatalities_chart, use_container_width=True)
447
+ st.markdown("""
448
+ This line chart shows the **total number of injuries and fatalities by month for the selected unit type pair**. The blue line represents total injuries, while the red line represents total fatalities. Observing the trends over the months can help identify any seasonal patterns or peaks in traffic incidents involving specific unit types.
449
+
450
+ - **Total Injuries**: The blue line indicates how injuries vary over different months, highlighting any particular spikes or declines.
451
+ - **Total Fatalities**: The red line shows the trend for fatalities, which is generally much lower compared to injuries.
452
+ - **Unit Types**: The dropdown selection allows users to filter the data by specific unit type pairs (e.g., Driver vs Pedestrian) or view the overall trend across all types.
453
+
454
+ This visualization aims to provide an intuitive understanding of how injuries and fatalities are distributed across the year, helping stakeholders develop targeted safety measures.
455
+ """)
456
 
457
  with tab5:
458
  # Dropdown for category selection