Nirmal16 commited on
Commit
734e6ce
·
verified ·
1 Parent(s): cf0665a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -327,7 +327,12 @@ def main():
327
  key=f"map_{selected_year}",
328
  returned_objects=["null_drawing"]
329
  )
330
-
 
 
 
 
 
331
  with tab3:
332
  # Weather condition filter
333
  weather = ['All Conditions'] + sorted(df['Weather'].unique())
@@ -337,12 +342,6 @@ def main():
337
  st.markdown("### Crash Trend Over Time")
338
  trend_fig = create_crash_trend_chart(df, selected_weather)
339
  st.plotly_chart(trend_fig, use_container_width=True)
340
-
341
- # Create 5th Visualization: Injuries and fatalities chart
342
- injuries_fatalities_chart = create_injuries_fatalities_chart(df)
343
- st.altair_chart(injuries_fatalities_chart, use_container_width=True)
344
- st.markdown("#### TODO: add write-up for this 5th chart.")
345
-
346
 
347
  if __name__ == "__main__":
348
  main()
 
327
  key=f"map_{selected_year}",
328
  returned_objects=["null_drawing"]
329
  )
330
+
331
+ # Create 5th Visualization: Injuries and fatalities chart
332
+ injuries_fatalities_chart = create_injuries_fatalities_chart(df)
333
+ st.altair_chart(injuries_fatalities_chart, use_container_width=True)
334
+ st.markdown("#### TODO: add write-up for this 5th chart.")
335
+
336
  with tab3:
337
  # Weather condition filter
338
  weather = ['All Conditions'] + sorted(df['Weather'].unique())
 
342
  st.markdown("### Crash Trend Over Time")
343
  trend_fig = create_crash_trend_chart(df, selected_weather)
344
  st.plotly_chart(trend_fig, use_container_width=True)
 
 
 
 
 
 
345
 
346
  if __name__ == "__main__":
347
  main()