Thamed-Chowdhury commited on
Commit
58eb520
·
verified ·
1 Parent(s): 90989e6

Upload 4 files

Browse files
Files changed (4) hide show
  1. app.py +111 -52
  2. combined_duplicates_removed.csv +33 -0
  3. test.ipynb +1977 -0
  4. updated_dataset.csv +67 -0
app.py CHANGED
@@ -1,52 +1,111 @@
1
- import streamlit as st
2
- import pandas as pd
3
- from datetime import datetime
4
-
5
- # Initialize the state for the excel file name
6
- if 'excel_file_name' not in st.session_state:
7
- st.session_state.excel_file_name = 'combined_duplicates_removed.csv'
8
-
9
- # Streamlit title
10
- st.title("Automated Road Accident Monitoring System")
11
-
12
- # Button to update the dataset
13
- if st.button("Update Dataset"):
14
- st.session_state.excel_file_name = 'updated.csv'
15
-
16
- # Get the current excel file name from session state
17
- excel_file_name = st.session_state.excel_file_name
18
-
19
- # Display a note to the user
20
- st.write("Please Note, First Date must be smaller than Last date. Example: First Date = 25-08-2024 and Last Date = 28-08-2024")
21
-
22
- # Get today's date
23
- today = datetime.strptime(datetime.today().strftime('%d-%m-%Y'), '%d-%m-%Y')
24
-
25
- # Input fields for date range
26
- start = st.date_input("Enter first date", max_value=today, format="DD-MM-YYYY")
27
- start_string = start.strftime('%d-%m-%Y')
28
- end = st.date_input("Enter last date", max_value=today, format="DD-MM-YYYY")
29
- end_string = end.strftime('%d-%m-%Y')
30
-
31
- # Button to generate dataset based on date range
32
- if st.button("Generate Dataset"):
33
- # Read the selected excel file
34
- df3 = pd.read_csv(excel_file_name)
35
-
36
- # Convert 'Publish Date' column to datetime with 'day-month-year' format
37
- df3['Publish Date'] = pd.to_datetime(df3['Publish Date'], format='%d-%m-%Y')
38
-
39
- # Convert user input dates to datetime
40
- start_date = pd.to_datetime(start_string, format='%d-%m-%Y')
41
- end_date = pd.to_datetime(end_string, format='%d-%m-%Y')
42
-
43
- # Filter rows based on the specified date range
44
- filtered_entries = df3[(df3['Publish Date'] >= start_date) & (df3['Publish Date'] <= end_date)]
45
- filtered_entries.reset_index(inplace=True, drop=True)
46
-
47
- # Display the filtered data
48
- st.dataframe(filtered_entries)
49
-
50
- # Display selected start and end dates
51
- st.write("Start date is:", start)
52
- st.write("End date is:", end)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import plotly.express as px
4
+ from datetime import datetime
5
+
6
+ excel_file_name = 'updated_dataset.csv'
7
+ # Streamlit title
8
+ st.title("Bangladesh Accident Monitoring System (BAMS)")
9
+
10
+
11
+ # Display a note to the user
12
+ st.write("Please Note, First Date must be smaller than Last date. Example: First Date = 25-08-2024 and Last Date = 28-08-2024")
13
+
14
+ # Get today's date
15
+ today = datetime.strptime(datetime.today().strftime('%d-%m-%Y'), '%d-%m-%Y')
16
+
17
+ # Input fields for date range
18
+ start = st.date_input("Enter first date", max_value=today, format="DD-MM-YYYY")
19
+ start_string = start.strftime('%d-%m-%Y')
20
+ end = st.date_input("Enter last date", max_value=today, format="DD-MM-YYYY")
21
+ end_string = end.strftime('%d-%m-%Y')
22
+
23
+ # Button to generate dataset based on date range
24
+ if st.button("Generate Dataset"):
25
+ # Read the selected excel file
26
+ df3 = pd.read_csv(excel_file_name)
27
+
28
+ # Convert 'Publish Date' column to datetime with 'day-month-year' format
29
+ df3['Publish Date'] = pd.to_datetime(df3['Publish Date'], format='%d-%m-%Y')
30
+
31
+ # Convert user input dates to datetime
32
+ start_date = pd.to_datetime(start_string, format='%d-%m-%Y')
33
+ end_date = pd.to_datetime(end_string, format='%d-%m-%Y')
34
+
35
+ # Filter rows based on the specified date range
36
+ filtered_entries = df3[(df3['Publish Date'] >= start_date) & (df3['Publish Date'] <= end_date)]
37
+ filtered_entries.reset_index(inplace=True, drop=True)
38
+
39
+ # Display the filtered data
40
+ st.dataframe(filtered_entries)
41
+
42
+ # Create a bar chart for accident count over days
43
+ if not filtered_entries.empty:
44
+ # Accident count over days
45
+ accident_counts = filtered_entries['Accident Date'].value_counts().sort_index()
46
+ accident_counts = accident_counts.reset_index()
47
+ accident_counts.columns = ['Accident Date', 'Accident Count']
48
+
49
+ fig1 = px.bar(accident_counts,
50
+ x='Accident Date',
51
+ y='Accident Count',
52
+ title="Accident Count Over Days",
53
+ labels={'Accident Date': 'Date', 'Accident Count': 'Number of Accidents'})
54
+ st.plotly_chart(fig1)
55
+
56
+ # Bar chart showing number of people killed each day
57
+ # Grouping by 'Publish Date' and summing 'Killed' column
58
+ killed_per_day = filtered_entries.groupby('Accident Date')['Killed'].sum().reset_index()
59
+ killed_per_day.columns = ['Accident Date', 'Total Killed']
60
+
61
+ fig2 = px.bar(killed_per_day,
62
+ x='Accident Date',
63
+ y='Total Killed',
64
+ title="Number of People Killed Each Day",
65
+ labels={'Accident Date': 'Date', 'Total Killed': 'Number of People Killed'},
66
+ color='Total Killed',
67
+ color_continuous_scale='Reds')
68
+ st.plotly_chart(fig2)
69
+
70
+ # Bar chart showing the number of accidents in each district
71
+ district_accidents = filtered_entries['District'].value_counts().reset_index()
72
+ district_accidents.columns = ['District', 'Number of Accidents']
73
+ fig3 = px.bar(district_accidents,
74
+ x='District',
75
+ y='Number of Accidents',
76
+ title="Accidents in Each District",
77
+ labels={'Number of Accidents': 'Number of Accidents', 'District': 'District'},
78
+ color='Number of Accidents',
79
+ color_continuous_scale='Blues')
80
+ st.plotly_chart(fig3)
81
+
82
+ ### Pie Chart Code ###
83
+ yes_count=0
84
+ no_count=0
85
+ not_available_count=0
86
+ for i in range(len(filtered_entries)):
87
+ if ('Yes' in filtered_entries['Pedestrian_Involved'][i] or 'yes' in filtered_entries['Pedestrian_Involved'][i]): yes_count+=1
88
+ if ('No' in filtered_entries['Pedestrian_Involved'][i] or 'no' in filtered_entries['Pedestrian_Involved'][i]): no_count+=1
89
+ if ('Not Available' in filtered_entries['Pedestrian_Involved'][i]): not_available_count+=1
90
+ Pedestrian_Involved_list = ['Yes', 'No', 'Not Available']
91
+ Count_list = [yes_count, no_count, not_available_count]
92
+ # dictionary of lists
93
+ dict = {'Pedestrian Involved': Pedestrian_Involved_list, 'Count':Count_list}
94
+ pedestrian_involvement = pd.DataFrame(dict)
95
+ # Pie chart showing the percentage of accidents involving pedestrians vs. those that don't
96
+ # pedestrian_involvement = filtered_entries['Pedestrian_Involved'].value_counts().reset_index()
97
+ # pedestrian_involvement.columns = ['Pedestrian Involved', 'Count']
98
+
99
+ fig4 = px.pie(pedestrian_involvement,
100
+ names='Pedestrian Involved',
101
+ values='Count',
102
+ title="Accidents Involving Pedestrians",
103
+ labels={'Pedestrian Involved': 'Pedestrian Involved'})
104
+ st.plotly_chart(fig4)
105
+
106
+ else:
107
+ st.write("No data available for the selected date range.")
108
+
109
+ # Display selected start and end dates
110
+ st.write("Start date is:", start)
111
+ st.write("End date is:", end)
combined_duplicates_removed.csv ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ News Title,News Link,Publish Date,Accident Date,Time,Killed,Injured,Location,Road_Characteristic,Pedestrian_Involved,Vehicles_involved,District
2
+ Hafez was killed in a collision between a motorcycle and a pickup in Kishoreganj,https://www.prothomalo.com/bangladesh/district/u93u1oom76,12-09-2024,11-09-2024, 10 am,1, 0, Akhrabazar area of Kishoreganj, Not Available, No,Motorcycle-Pickup van,Kishoreganj
3
+ "Mother's death while trying to save her son, madrasa teacher returned home as a dead body",https://www.prothomalo.com/bangladesh/district/mctzh3e58s,12-09-2024,11-09-2024, Evening,2, 0, Sadar Bazar area of Fulgazi Upazila, Highway, Yes,Truck-Motorcycle-Covered van,Feni
4
+ "Bus hits covered van in Comilla, body of bus driver's assistant is dismembered",https://www.prothomalo.com/bangladesh/district/r0rhz36tbg,11-09-2024,13-09-2024, 11:30 am,1, 14, Kamalapur area of ​​Sadar Dakshin Upazila on the Dhaka-Chittagong highway, Highway, Not Available,Bus-Covered Van,Chandpur
5
+ "Two motorcycles collided in Natore, 2 including the principal were killed",https://www.prothomalo.com/bangladesh/district/%E0%A6%A8%E0%A6%BE%E0%A6%9F%E0%A7%8B%E0%A6%B0%E0%A7%87-%E0%A6%A6%E0%A7%81%E0%A6%87-%E0%A6%AE%E0%A7%8B%E0%A6%9F%E0%A6%B0%E0%A6%B8%E0%A6%BE%E0%A6%87%E0%A6%95%E0%A7%87%E0%A6%B2%E0%A7%87%E0%A6%B0-%E0%A6%B8%E0%A6%82%E0%A6%98%E0%A6%B0%E0%A7%8D%E0%A6%B7-%E0%A6%85%E0%A6%A7%E0%A7%8D%E0%A6%AF%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A6%B8%E0%A6%B9-%E0%A6%A8%E0%A6%BF%E0%A6%B9%E0%A6%A4-%E0%A7%A8,11-09-2024,10-09-2024, 8 o'clock,3, 1, Dalsak intersection of Sadar upazila, Natore-Bogra highway, No,Motorcycle-Motorcycle,Rajshahi
6
+ 4 easybike riders killed in Bagerhat highway collision with pickup,https://www.prothomalo.com/bangladesh/district/actgi42zcn,09-09-2024,09-09-2024, 9 am,4, 2, Khulna-Bagerhat highway, Highway, Not Available,Battery-powered easy bike-Pickup van,Khulna
7
+ "Bus hits the back of a truck on Bangabandhu Bridge, 3 killed",https://www.prothomalo.com/bangladesh/district/501ral82u8,07-09-2024,06-09-2024, 5:30 a.m.,3, 11, Bangabandhu Bridge, Highway, Not Available,Bus-Truck,Sirajganj
8
+ "Another truck hit the back of the truck standing on the road, the driver's assistant died",https://www.prothomalo.com/bangladesh/district/r08hi8rgvq,06-09-2024,05-09-2024, 6:00 am,1, 1, Dinajpur-Gobindganj regional highway in the Kanagari Bazar area of Ghoraghat upazila, Highway, No,Truck-Truck,Dinajpur
9
+ "Bus hits behind microbus in Comilla, 4 killed",https://www.prothomalo.com/bangladesh/district/ktqnu1f700,06-09-2024,04-09-2024, 6:00 am,4, 5, Batisa Nankara area of Dhaka-Chittagong highway, Highway, Not Available,Microbus-Bus-Truck,Feni
10
+ Seventy-year-old woman killed in Jurain bus accident,https://www.prothomalo.com/bangladesh/capital/fw33c6xf1g,05-09-2024,02-09-2024, Afternoon,1, 0, Jurain area of ​​the capital, Not Available, Yes,Bus,Dhaka
11
+ One person was killed after being hit by a truck in the capital's Uttara,https://www.prothomalo.com/bangladesh/capital/mbr4fzonnp,05-09-2024,02-09-2024, Wednesday morning,1, 1, Azampur area of ​​the capital's Uttara, Not Available, Yes,Truck-Bicycle,Uttara
12
+ Chittagong University student Fahim did not go to the flood victims with relief,https://www.prothomalo.com/bangladesh/phde3rfaug,04-09-2024,26-08-2024, 3 o'clock,1, 3, Baryarhat area of ​​Mirsarai, Not Available, Not Available,Truck-Covered Van,Chattogram
13
+ 11 students-parents killed by school bus in China,https://www.prothomalo.com/world/asia/h0b1jvhefi,03-09-2024,01-09-2024, 7 am,11, 13, Tai'an city in eastern China's Shandong province, Not Available, Yes,School bus,Foreign
14
+ "Doctors returned to work after 12 hours, suffering all day",https://www.prothomalo.com/bangladesh/8vyl1xuo6g,02-09-2024,31-08-2024, 10 pm,0, 1, On the way back to Mirpur, Not Available, Not Available,Motorcycle,Dhaka
15
+ "Kishore Sadman, a US citizen, was killed by a truck, not murder",https://www.prothomalo.com/bangladesh/district/qlt7w1pwzs,01-09-2024,31-08-2024, 3:30 pm,1, 0, Polytechnic Institute area of ​​Khulshi police station, Not Available, Yes,Auto-rickshaw-Car-Truck,Chattogram
16
+ "8 passengers, including a child, died when a bus overturned in the United States",https://www.prothomalo.com/world/usa/nephzj2b5m,01-09-2024,31-08-2024, Not Available,8, 30+, Warren County, Not Available, No,Bus,Foreign
17
+ Three people died in separate road accidents in Godagari,https://www.prothomalo.com/bangladesh/district/nhy65ev9d7,28-08-2024,27-08-2024, 05:00 and 08:30,3, 0, Rajshahi-Chapainawabganj highway, Highway, Yes,Autorickshaw-Pickup-Bus,Chapainawabganj
18
+ "Bus hits passenger van in Gaibandha, 2 killed",https://www.prothomalo.com/bangladesh/district/wbndau15rz,28-08-2024,27-08-2024, 10:30 am,2, 1, Palashbari, Gaibandha-Palashbari road, No,Bus-Rickshaw,Gaibandha
19
+ Two motorcycle riders were killed in a collision with an autorickshaw,https://www.prothomalo.com/bangladesh/district/fut1wqny4q,25-08-2024,24-08-2024, 10:30 am,2, 5, Kodda area of ​​Sadar upazila on Akhaura-Agartala road, Highway, No,Motorcycle-CNG-powered auto-rickshaw,Brahmanbaria
20
+ Mother and son killed by bus in Gournadi,https://www.prothomalo.com/bangladesh/district/mi8g0t4yzm,25-08-2024,24-08-2024, 1:30 pm,2, 9, Mahilara area of ​​the Dhaka-Barisal highway, Highway, Not Available,Bus-Mahindra,Barisal
21
+ Two workers were killed when a cement-laden truck overturned in a pond in Chapainawabganj,https://www.prothomalo.com/bangladesh/district/if2u6ksb2r,23-08-2024,22-08-2024, 10:30 am,2, 4, Sonapur area of ​​Shahbazpur Union of Shibganj upazila, Not Available, Not Available,Truck,Chapainawabganj
22
+ Journalist killed in late night motorcycle accident in Sylhet,https://www.prothomalo.com/bangladesh/district/m95lo3kg5q,23-08-2024,22-08-2024, 3 am,1, 0, Madina Market area of Sylhet city, Sylhet-Sunamganj road, No,Motorcycle,Sylhet
23
+ Three killed after being hit by truck in Narail,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/three-killed-after-being-hit-truck-narail-3700166,11-09-2024,11-09-2024, 12:00am,3, 1, Lohagara upazila of Narail district, highway, Yes,Truck,Narail
24
+ Two RMG workers killed in Dhaka-Tangail highway accident,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/two-rmg-workers-killed-dhaka-tangail-highway-accident-3699366,10-09-2024,10-09-2024, Not Available,2, 3, Gazipur's Kaliakair, Highway, Yes,Cargo truck,Gazipur
25
+ Woman dies after being hit by battery-run rickshaw at Shahbag,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/woman-dies-after-being-hit-battery-run-rickshaw-shahbag-3698891,10-09-2024,10-09-2024, 3:00pm,1, 1, Shahbagh area, Not Available, Yes,Battery-run rickshaw,Dhaka
26
+ 4 dead in pickup-autorickshaw collision in Bagerhat,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/4-dead-pickup-autorickshaw-collision-bagerhat-3698246,09-09-2024,09-09-2024, 9:30am,4, 1, Bagerhat-Khulna highway in Bagerhat's Nawapara town, Highway, Not Available,Pickup truck-CNG-run auto-rickshaw,Bagerhat
27
+ Microbus driver killed in Gazipur accident,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/microbus-driver-killed-gazipur-accident-3697286,08-09-2024,08-09-2024, 5:00am,1, 0, Gazipur's Kapasia upazila, Highway, Not Available,Microbus-Truck,Gazipur
28
+ Three die as bus hits truck,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/three-die-bus-hits-truck-3696446,08-09-2024,08-09-2024, 5:30am,3, 10, Bangabandhu Bridge in Sirajganj, Bridge, Not Available,Bus-Truck,Sirajganj
29
+ Road accidents kill two in Rajshahi,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/road-accidents-kill-two-rajshahi-3696286,07-09-2024,07-09-2024, This noon,1, Not Available, Naogaon, Highway, No,Tractor-Motorbike - Drum truck-Motorbike,Naogaon
30
+ 4 killed as bus hits microbus in Cumilla,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/4-killed-bus-hits-microbus-cumilla-3695881,07-09-2024,07-09-2024, 6:00am,4, Not Available, Dhaka-Chattogram highway, Highway, No,"Bus-Microbus, Truck-Truck, Motorbike",Narayanganj
31
+ "6 killed as bus, truck collide in Gopalganj",https://www.thedailystar.net/news/bangladesh/accidents-fires/news/6-killed-bus-truck-collide-gopalganj-3691641,01-09-2024,01-09-2024, 7:45am,6, 24, Kashiani upazila of Gopalganj, Dhaka-Khulna highway, Not Available,Bus-Truck,Gopalganj
32
+ Four of a family die in Narsingdi road accident,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/four-family-die-narsingdi-road-accident-3691456,1-09-2024,01-09-2024, 9:30pm,4, 4, Dhaka-Sylhet Highway in Narsingdi, Highway, Not Available,Covered van-Microbus,Narsingdi
33
+ 4 of a family die in road crash,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/4-family-die-road-crash-3691551,01-09-2024,01-09-2024, 9:30pm,4, 4, Dhaka-Sylhet highway in Narsingdi's Basail area, Highway, Not Available,Microbus-Lorry,Narsingdi
test.ipynb ADDED
@@ -0,0 +1,1977 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 4,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "import pandas as pd\n",
10
+ "import plotly.express as px\n",
11
+ "from datetime import datetime"
12
+ ]
13
+ },
14
+ {
15
+ "cell_type": "code",
16
+ "execution_count": 5,
17
+ "metadata": {},
18
+ "outputs": [],
19
+ "source": [
20
+ "filtered_entries=pd.read_csv('test_set.csv')"
21
+ ]
22
+ },
23
+ {
24
+ "cell_type": "code",
25
+ "execution_count": 6,
26
+ "metadata": {},
27
+ "outputs": [],
28
+ "source": [
29
+ "if 'Yes' in filtered_entries['Pedestrian_Involved'][3]: print('Available')"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": 7,
35
+ "metadata": {},
36
+ "outputs": [],
37
+ "source": [
38
+ "yes_count=0\n",
39
+ "no_count=0\n",
40
+ "not_available_count=0\n",
41
+ "for i in range(len(filtered_entries)):\n",
42
+ " if ('Yes' in filtered_entries['Pedestrian_Involved'][i] or 'yes' in filtered_entries['Pedestrian_Involved'][i]): yes_count+=1\n",
43
+ " if ('No' in filtered_entries['Pedestrian_Involved'][i] or 'no' in filtered_entries['Pedestrian_Involved'][i]): no_count+=1\n",
44
+ " if ('Not Available' in filtered_entries['Pedestrian_Involved'][i]): not_available_count+=1\n"
45
+ ]
46
+ },
47
+ {
48
+ "cell_type": "code",
49
+ "execution_count": 8,
50
+ "metadata": {},
51
+ "outputs": [],
52
+ "source": [
53
+ "Pedestrian_Involved_list = ['Yes', 'No', 'Not Available']\n",
54
+ "Count_list = [yes_count, no_count, not_available_count]"
55
+ ]
56
+ },
57
+ {
58
+ "cell_type": "code",
59
+ "execution_count": 9,
60
+ "metadata": {},
61
+ "outputs": [
62
+ {
63
+ "data": {
64
+ "text/plain": [
65
+ "8"
66
+ ]
67
+ },
68
+ "execution_count": 9,
69
+ "metadata": {},
70
+ "output_type": "execute_result"
71
+ }
72
+ ],
73
+ "source": [
74
+ "yes_count"
75
+ ]
76
+ },
77
+ {
78
+ "cell_type": "code",
79
+ "execution_count": 10,
80
+ "metadata": {},
81
+ "outputs": [],
82
+ "source": [
83
+ "# dictionary of lists \n",
84
+ "dict = {'Pedestrian Involved': Pedestrian_Involved_list, 'Count':Count_list} \n",
85
+ "pedestrian_involvement = pd.DataFrame(dict)"
86
+ ]
87
+ },
88
+ {
89
+ "cell_type": "code",
90
+ "execution_count": 11,
91
+ "metadata": {},
92
+ "outputs": [
93
+ {
94
+ "data": {
95
+ "text/html": [
96
+ "<div>\n",
97
+ "<style scoped>\n",
98
+ " .dataframe tbody tr th:only-of-type {\n",
99
+ " vertical-align: middle;\n",
100
+ " }\n",
101
+ "\n",
102
+ " .dataframe tbody tr th {\n",
103
+ " vertical-align: top;\n",
104
+ " }\n",
105
+ "\n",
106
+ " .dataframe thead th {\n",
107
+ " text-align: right;\n",
108
+ " }\n",
109
+ "</style>\n",
110
+ "<table border=\"1\" class=\"dataframe\">\n",
111
+ " <thead>\n",
112
+ " <tr style=\"text-align: right;\">\n",
113
+ " <th></th>\n",
114
+ " <th>Pedestrian Involved</th>\n",
115
+ " <th>Count</th>\n",
116
+ " </tr>\n",
117
+ " </thead>\n",
118
+ " <tbody>\n",
119
+ " <tr>\n",
120
+ " <th>0</th>\n",
121
+ " <td>Yes</td>\n",
122
+ " <td>8</td>\n",
123
+ " </tr>\n",
124
+ " <tr>\n",
125
+ " <th>1</th>\n",
126
+ " <td>No</td>\n",
127
+ " <td>18</td>\n",
128
+ " </tr>\n",
129
+ " <tr>\n",
130
+ " <th>2</th>\n",
131
+ " <td>Not Available</td>\n",
132
+ " <td>12</td>\n",
133
+ " </tr>\n",
134
+ " </tbody>\n",
135
+ "</table>\n",
136
+ "</div>"
137
+ ],
138
+ "text/plain": [
139
+ " Pedestrian Involved Count\n",
140
+ "0 Yes 8\n",
141
+ "1 No 18\n",
142
+ "2 Not Available 12"
143
+ ]
144
+ },
145
+ "execution_count": 11,
146
+ "metadata": {},
147
+ "output_type": "execute_result"
148
+ }
149
+ ],
150
+ "source": [
151
+ "pedestrian_involvement"
152
+ ]
153
+ },
154
+ {
155
+ "cell_type": "code",
156
+ "execution_count": 12,
157
+ "metadata": {},
158
+ "outputs": [],
159
+ "source": [
160
+ "# Pie chart showing the percentage of accidents involving pedestrians vs. those that don't\n",
161
+ "# pedestrian_involvement = df['Pedestrian_Involved'].value_counts().reset_index()\n",
162
+ "# pedestrian_involvement.columns = ['Pedestrian Involved', 'Count']\n",
163
+ "\n",
164
+ "fig4 = px.pie(pedestrian_involvement, \n",
165
+ " names='Pedestrian Involved', \n",
166
+ " values='Count', \n",
167
+ " title=\"Accidents Involving Pedestrians\",\n",
168
+ " labels={'Pedestrian Involved': 'Pedestrian Involved'})\n"
169
+ ]
170
+ },
171
+ {
172
+ "cell_type": "code",
173
+ "execution_count": 13,
174
+ "metadata": {},
175
+ "outputs": [
176
+ {
177
+ "data": {
178
+ "application/vnd.plotly.v1+json": {
179
+ "config": {
180
+ "plotlyServerURL": "https://plot.ly"
181
+ },
182
+ "data": [
183
+ {
184
+ "domain": {
185
+ "x": [
186
+ 0,
187
+ 1
188
+ ],
189
+ "y": [
190
+ 0,
191
+ 1
192
+ ]
193
+ },
194
+ "hovertemplate": "Pedestrian Involved=%{label}<br>Count=%{value}<extra></extra>",
195
+ "labels": [
196
+ "Yes",
197
+ "No",
198
+ "Not Available"
199
+ ],
200
+ "legendgroup": "",
201
+ "name": "",
202
+ "showlegend": true,
203
+ "type": "pie",
204
+ "values": [
205
+ 8,
206
+ 18,
207
+ 12
208
+ ]
209
+ }
210
+ ],
211
+ "layout": {
212
+ "legend": {
213
+ "tracegroupgap": 0
214
+ },
215
+ "template": {
216
+ "data": {
217
+ "bar": [
218
+ {
219
+ "error_x": {
220
+ "color": "#2a3f5f"
221
+ },
222
+ "error_y": {
223
+ "color": "#2a3f5f"
224
+ },
225
+ "marker": {
226
+ "line": {
227
+ "color": "#E5ECF6",
228
+ "width": 0.5
229
+ },
230
+ "pattern": {
231
+ "fillmode": "overlay",
232
+ "size": 10,
233
+ "solidity": 0.2
234
+ }
235
+ },
236
+ "type": "bar"
237
+ }
238
+ ],
239
+ "barpolar": [
240
+ {
241
+ "marker": {
242
+ "line": {
243
+ "color": "#E5ECF6",
244
+ "width": 0.5
245
+ },
246
+ "pattern": {
247
+ "fillmode": "overlay",
248
+ "size": 10,
249
+ "solidity": 0.2
250
+ }
251
+ },
252
+ "type": "barpolar"
253
+ }
254
+ ],
255
+ "carpet": [
256
+ {
257
+ "aaxis": {
258
+ "endlinecolor": "#2a3f5f",
259
+ "gridcolor": "white",
260
+ "linecolor": "white",
261
+ "minorgridcolor": "white",
262
+ "startlinecolor": "#2a3f5f"
263
+ },
264
+ "baxis": {
265
+ "endlinecolor": "#2a3f5f",
266
+ "gridcolor": "white",
267
+ "linecolor": "white",
268
+ "minorgridcolor": "white",
269
+ "startlinecolor": "#2a3f5f"
270
+ },
271
+ "type": "carpet"
272
+ }
273
+ ],
274
+ "choropleth": [
275
+ {
276
+ "colorbar": {
277
+ "outlinewidth": 0,
278
+ "ticks": ""
279
+ },
280
+ "type": "choropleth"
281
+ }
282
+ ],
283
+ "contour": [
284
+ {
285
+ "colorbar": {
286
+ "outlinewidth": 0,
287
+ "ticks": ""
288
+ },
289
+ "colorscale": [
290
+ [
291
+ 0,
292
+ "#0d0887"
293
+ ],
294
+ [
295
+ 0.1111111111111111,
296
+ "#46039f"
297
+ ],
298
+ [
299
+ 0.2222222222222222,
300
+ "#7201a8"
301
+ ],
302
+ [
303
+ 0.3333333333333333,
304
+ "#9c179e"
305
+ ],
306
+ [
307
+ 0.4444444444444444,
308
+ "#bd3786"
309
+ ],
310
+ [
311
+ 0.5555555555555556,
312
+ "#d8576b"
313
+ ],
314
+ [
315
+ 0.6666666666666666,
316
+ "#ed7953"
317
+ ],
318
+ [
319
+ 0.7777777777777778,
320
+ "#fb9f3a"
321
+ ],
322
+ [
323
+ 0.8888888888888888,
324
+ "#fdca26"
325
+ ],
326
+ [
327
+ 1,
328
+ "#f0f921"
329
+ ]
330
+ ],
331
+ "type": "contour"
332
+ }
333
+ ],
334
+ "contourcarpet": [
335
+ {
336
+ "colorbar": {
337
+ "outlinewidth": 0,
338
+ "ticks": ""
339
+ },
340
+ "type": "contourcarpet"
341
+ }
342
+ ],
343
+ "heatmap": [
344
+ {
345
+ "colorbar": {
346
+ "outlinewidth": 0,
347
+ "ticks": ""
348
+ },
349
+ "colorscale": [
350
+ [
351
+ 0,
352
+ "#0d0887"
353
+ ],
354
+ [
355
+ 0.1111111111111111,
356
+ "#46039f"
357
+ ],
358
+ [
359
+ 0.2222222222222222,
360
+ "#7201a8"
361
+ ],
362
+ [
363
+ 0.3333333333333333,
364
+ "#9c179e"
365
+ ],
366
+ [
367
+ 0.4444444444444444,
368
+ "#bd3786"
369
+ ],
370
+ [
371
+ 0.5555555555555556,
372
+ "#d8576b"
373
+ ],
374
+ [
375
+ 0.6666666666666666,
376
+ "#ed7953"
377
+ ],
378
+ [
379
+ 0.7777777777777778,
380
+ "#fb9f3a"
381
+ ],
382
+ [
383
+ 0.8888888888888888,
384
+ "#fdca26"
385
+ ],
386
+ [
387
+ 1,
388
+ "#f0f921"
389
+ ]
390
+ ],
391
+ "type": "heatmap"
392
+ }
393
+ ],
394
+ "heatmapgl": [
395
+ {
396
+ "colorbar": {
397
+ "outlinewidth": 0,
398
+ "ticks": ""
399
+ },
400
+ "colorscale": [
401
+ [
402
+ 0,
403
+ "#0d0887"
404
+ ],
405
+ [
406
+ 0.1111111111111111,
407
+ "#46039f"
408
+ ],
409
+ [
410
+ 0.2222222222222222,
411
+ "#7201a8"
412
+ ],
413
+ [
414
+ 0.3333333333333333,
415
+ "#9c179e"
416
+ ],
417
+ [
418
+ 0.4444444444444444,
419
+ "#bd3786"
420
+ ],
421
+ [
422
+ 0.5555555555555556,
423
+ "#d8576b"
424
+ ],
425
+ [
426
+ 0.6666666666666666,
427
+ "#ed7953"
428
+ ],
429
+ [
430
+ 0.7777777777777778,
431
+ "#fb9f3a"
432
+ ],
433
+ [
434
+ 0.8888888888888888,
435
+ "#fdca26"
436
+ ],
437
+ [
438
+ 1,
439
+ "#f0f921"
440
+ ]
441
+ ],
442
+ "type": "heatmapgl"
443
+ }
444
+ ],
445
+ "histogram": [
446
+ {
447
+ "marker": {
448
+ "pattern": {
449
+ "fillmode": "overlay",
450
+ "size": 10,
451
+ "solidity": 0.2
452
+ }
453
+ },
454
+ "type": "histogram"
455
+ }
456
+ ],
457
+ "histogram2d": [
458
+ {
459
+ "colorbar": {
460
+ "outlinewidth": 0,
461
+ "ticks": ""
462
+ },
463
+ "colorscale": [
464
+ [
465
+ 0,
466
+ "#0d0887"
467
+ ],
468
+ [
469
+ 0.1111111111111111,
470
+ "#46039f"
471
+ ],
472
+ [
473
+ 0.2222222222222222,
474
+ "#7201a8"
475
+ ],
476
+ [
477
+ 0.3333333333333333,
478
+ "#9c179e"
479
+ ],
480
+ [
481
+ 0.4444444444444444,
482
+ "#bd3786"
483
+ ],
484
+ [
485
+ 0.5555555555555556,
486
+ "#d8576b"
487
+ ],
488
+ [
489
+ 0.6666666666666666,
490
+ "#ed7953"
491
+ ],
492
+ [
493
+ 0.7777777777777778,
494
+ "#fb9f3a"
495
+ ],
496
+ [
497
+ 0.8888888888888888,
498
+ "#fdca26"
499
+ ],
500
+ [
501
+ 1,
502
+ "#f0f921"
503
+ ]
504
+ ],
505
+ "type": "histogram2d"
506
+ }
507
+ ],
508
+ "histogram2dcontour": [
509
+ {
510
+ "colorbar": {
511
+ "outlinewidth": 0,
512
+ "ticks": ""
513
+ },
514
+ "colorscale": [
515
+ [
516
+ 0,
517
+ "#0d0887"
518
+ ],
519
+ [
520
+ 0.1111111111111111,
521
+ "#46039f"
522
+ ],
523
+ [
524
+ 0.2222222222222222,
525
+ "#7201a8"
526
+ ],
527
+ [
528
+ 0.3333333333333333,
529
+ "#9c179e"
530
+ ],
531
+ [
532
+ 0.4444444444444444,
533
+ "#bd3786"
534
+ ],
535
+ [
536
+ 0.5555555555555556,
537
+ "#d8576b"
538
+ ],
539
+ [
540
+ 0.6666666666666666,
541
+ "#ed7953"
542
+ ],
543
+ [
544
+ 0.7777777777777778,
545
+ "#fb9f3a"
546
+ ],
547
+ [
548
+ 0.8888888888888888,
549
+ "#fdca26"
550
+ ],
551
+ [
552
+ 1,
553
+ "#f0f921"
554
+ ]
555
+ ],
556
+ "type": "histogram2dcontour"
557
+ }
558
+ ],
559
+ "mesh3d": [
560
+ {
561
+ "colorbar": {
562
+ "outlinewidth": 0,
563
+ "ticks": ""
564
+ },
565
+ "type": "mesh3d"
566
+ }
567
+ ],
568
+ "parcoords": [
569
+ {
570
+ "line": {
571
+ "colorbar": {
572
+ "outlinewidth": 0,
573
+ "ticks": ""
574
+ }
575
+ },
576
+ "type": "parcoords"
577
+ }
578
+ ],
579
+ "pie": [
580
+ {
581
+ "automargin": true,
582
+ "type": "pie"
583
+ }
584
+ ],
585
+ "scatter": [
586
+ {
587
+ "fillpattern": {
588
+ "fillmode": "overlay",
589
+ "size": 10,
590
+ "solidity": 0.2
591
+ },
592
+ "type": "scatter"
593
+ }
594
+ ],
595
+ "scatter3d": [
596
+ {
597
+ "line": {
598
+ "colorbar": {
599
+ "outlinewidth": 0,
600
+ "ticks": ""
601
+ }
602
+ },
603
+ "marker": {
604
+ "colorbar": {
605
+ "outlinewidth": 0,
606
+ "ticks": ""
607
+ }
608
+ },
609
+ "type": "scatter3d"
610
+ }
611
+ ],
612
+ "scattercarpet": [
613
+ {
614
+ "marker": {
615
+ "colorbar": {
616
+ "outlinewidth": 0,
617
+ "ticks": ""
618
+ }
619
+ },
620
+ "type": "scattercarpet"
621
+ }
622
+ ],
623
+ "scattergeo": [
624
+ {
625
+ "marker": {
626
+ "colorbar": {
627
+ "outlinewidth": 0,
628
+ "ticks": ""
629
+ }
630
+ },
631
+ "type": "scattergeo"
632
+ }
633
+ ],
634
+ "scattergl": [
635
+ {
636
+ "marker": {
637
+ "colorbar": {
638
+ "outlinewidth": 0,
639
+ "ticks": ""
640
+ }
641
+ },
642
+ "type": "scattergl"
643
+ }
644
+ ],
645
+ "scattermapbox": [
646
+ {
647
+ "marker": {
648
+ "colorbar": {
649
+ "outlinewidth": 0,
650
+ "ticks": ""
651
+ }
652
+ },
653
+ "type": "scattermapbox"
654
+ }
655
+ ],
656
+ "scatterpolar": [
657
+ {
658
+ "marker": {
659
+ "colorbar": {
660
+ "outlinewidth": 0,
661
+ "ticks": ""
662
+ }
663
+ },
664
+ "type": "scatterpolar"
665
+ }
666
+ ],
667
+ "scatterpolargl": [
668
+ {
669
+ "marker": {
670
+ "colorbar": {
671
+ "outlinewidth": 0,
672
+ "ticks": ""
673
+ }
674
+ },
675
+ "type": "scatterpolargl"
676
+ }
677
+ ],
678
+ "scatterternary": [
679
+ {
680
+ "marker": {
681
+ "colorbar": {
682
+ "outlinewidth": 0,
683
+ "ticks": ""
684
+ }
685
+ },
686
+ "type": "scatterternary"
687
+ }
688
+ ],
689
+ "surface": [
690
+ {
691
+ "colorbar": {
692
+ "outlinewidth": 0,
693
+ "ticks": ""
694
+ },
695
+ "colorscale": [
696
+ [
697
+ 0,
698
+ "#0d0887"
699
+ ],
700
+ [
701
+ 0.1111111111111111,
702
+ "#46039f"
703
+ ],
704
+ [
705
+ 0.2222222222222222,
706
+ "#7201a8"
707
+ ],
708
+ [
709
+ 0.3333333333333333,
710
+ "#9c179e"
711
+ ],
712
+ [
713
+ 0.4444444444444444,
714
+ "#bd3786"
715
+ ],
716
+ [
717
+ 0.5555555555555556,
718
+ "#d8576b"
719
+ ],
720
+ [
721
+ 0.6666666666666666,
722
+ "#ed7953"
723
+ ],
724
+ [
725
+ 0.7777777777777778,
726
+ "#fb9f3a"
727
+ ],
728
+ [
729
+ 0.8888888888888888,
730
+ "#fdca26"
731
+ ],
732
+ [
733
+ 1,
734
+ "#f0f921"
735
+ ]
736
+ ],
737
+ "type": "surface"
738
+ }
739
+ ],
740
+ "table": [
741
+ {
742
+ "cells": {
743
+ "fill": {
744
+ "color": "#EBF0F8"
745
+ },
746
+ "line": {
747
+ "color": "white"
748
+ }
749
+ },
750
+ "header": {
751
+ "fill": {
752
+ "color": "#C8D4E3"
753
+ },
754
+ "line": {
755
+ "color": "white"
756
+ }
757
+ },
758
+ "type": "table"
759
+ }
760
+ ]
761
+ },
762
+ "layout": {
763
+ "annotationdefaults": {
764
+ "arrowcolor": "#2a3f5f",
765
+ "arrowhead": 0,
766
+ "arrowwidth": 1
767
+ },
768
+ "autotypenumbers": "strict",
769
+ "coloraxis": {
770
+ "colorbar": {
771
+ "outlinewidth": 0,
772
+ "ticks": ""
773
+ }
774
+ },
775
+ "colorscale": {
776
+ "diverging": [
777
+ [
778
+ 0,
779
+ "#8e0152"
780
+ ],
781
+ [
782
+ 0.1,
783
+ "#c51b7d"
784
+ ],
785
+ [
786
+ 0.2,
787
+ "#de77ae"
788
+ ],
789
+ [
790
+ 0.3,
791
+ "#f1b6da"
792
+ ],
793
+ [
794
+ 0.4,
795
+ "#fde0ef"
796
+ ],
797
+ [
798
+ 0.5,
799
+ "#f7f7f7"
800
+ ],
801
+ [
802
+ 0.6,
803
+ "#e6f5d0"
804
+ ],
805
+ [
806
+ 0.7,
807
+ "#b8e186"
808
+ ],
809
+ [
810
+ 0.8,
811
+ "#7fbc41"
812
+ ],
813
+ [
814
+ 0.9,
815
+ "#4d9221"
816
+ ],
817
+ [
818
+ 1,
819
+ "#276419"
820
+ ]
821
+ ],
822
+ "sequential": [
823
+ [
824
+ 0,
825
+ "#0d0887"
826
+ ],
827
+ [
828
+ 0.1111111111111111,
829
+ "#46039f"
830
+ ],
831
+ [
832
+ 0.2222222222222222,
833
+ "#7201a8"
834
+ ],
835
+ [
836
+ 0.3333333333333333,
837
+ "#9c179e"
838
+ ],
839
+ [
840
+ 0.4444444444444444,
841
+ "#bd3786"
842
+ ],
843
+ [
844
+ 0.5555555555555556,
845
+ "#d8576b"
846
+ ],
847
+ [
848
+ 0.6666666666666666,
849
+ "#ed7953"
850
+ ],
851
+ [
852
+ 0.7777777777777778,
853
+ "#fb9f3a"
854
+ ],
855
+ [
856
+ 0.8888888888888888,
857
+ "#fdca26"
858
+ ],
859
+ [
860
+ 1,
861
+ "#f0f921"
862
+ ]
863
+ ],
864
+ "sequentialminus": [
865
+ [
866
+ 0,
867
+ "#0d0887"
868
+ ],
869
+ [
870
+ 0.1111111111111111,
871
+ "#46039f"
872
+ ],
873
+ [
874
+ 0.2222222222222222,
875
+ "#7201a8"
876
+ ],
877
+ [
878
+ 0.3333333333333333,
879
+ "#9c179e"
880
+ ],
881
+ [
882
+ 0.4444444444444444,
883
+ "#bd3786"
884
+ ],
885
+ [
886
+ 0.5555555555555556,
887
+ "#d8576b"
888
+ ],
889
+ [
890
+ 0.6666666666666666,
891
+ "#ed7953"
892
+ ],
893
+ [
894
+ 0.7777777777777778,
895
+ "#fb9f3a"
896
+ ],
897
+ [
898
+ 0.8888888888888888,
899
+ "#fdca26"
900
+ ],
901
+ [
902
+ 1,
903
+ "#f0f921"
904
+ ]
905
+ ]
906
+ },
907
+ "colorway": [
908
+ "#636efa",
909
+ "#EF553B",
910
+ "#00cc96",
911
+ "#ab63fa",
912
+ "#FFA15A",
913
+ "#19d3f3",
914
+ "#FF6692",
915
+ "#B6E880",
916
+ "#FF97FF",
917
+ "#FECB52"
918
+ ],
919
+ "font": {
920
+ "color": "#2a3f5f"
921
+ },
922
+ "geo": {
923
+ "bgcolor": "white",
924
+ "lakecolor": "white",
925
+ "landcolor": "#E5ECF6",
926
+ "showlakes": true,
927
+ "showland": true,
928
+ "subunitcolor": "white"
929
+ },
930
+ "hoverlabel": {
931
+ "align": "left"
932
+ },
933
+ "hovermode": "closest",
934
+ "mapbox": {
935
+ "style": "light"
936
+ },
937
+ "paper_bgcolor": "white",
938
+ "plot_bgcolor": "#E5ECF6",
939
+ "polar": {
940
+ "angularaxis": {
941
+ "gridcolor": "white",
942
+ "linecolor": "white",
943
+ "ticks": ""
944
+ },
945
+ "bgcolor": "#E5ECF6",
946
+ "radialaxis": {
947
+ "gridcolor": "white",
948
+ "linecolor": "white",
949
+ "ticks": ""
950
+ }
951
+ },
952
+ "scene": {
953
+ "xaxis": {
954
+ "backgroundcolor": "#E5ECF6",
955
+ "gridcolor": "white",
956
+ "gridwidth": 2,
957
+ "linecolor": "white",
958
+ "showbackground": true,
959
+ "ticks": "",
960
+ "zerolinecolor": "white"
961
+ },
962
+ "yaxis": {
963
+ "backgroundcolor": "#E5ECF6",
964
+ "gridcolor": "white",
965
+ "gridwidth": 2,
966
+ "linecolor": "white",
967
+ "showbackground": true,
968
+ "ticks": "",
969
+ "zerolinecolor": "white"
970
+ },
971
+ "zaxis": {
972
+ "backgroundcolor": "#E5ECF6",
973
+ "gridcolor": "white",
974
+ "gridwidth": 2,
975
+ "linecolor": "white",
976
+ "showbackground": true,
977
+ "ticks": "",
978
+ "zerolinecolor": "white"
979
+ }
980
+ },
981
+ "shapedefaults": {
982
+ "line": {
983
+ "color": "#2a3f5f"
984
+ }
985
+ },
986
+ "ternary": {
987
+ "aaxis": {
988
+ "gridcolor": "white",
989
+ "linecolor": "white",
990
+ "ticks": ""
991
+ },
992
+ "baxis": {
993
+ "gridcolor": "white",
994
+ "linecolor": "white",
995
+ "ticks": ""
996
+ },
997
+ "bgcolor": "#E5ECF6",
998
+ "caxis": {
999
+ "gridcolor": "white",
1000
+ "linecolor": "white",
1001
+ "ticks": ""
1002
+ }
1003
+ },
1004
+ "title": {
1005
+ "x": 0.05
1006
+ },
1007
+ "xaxis": {
1008
+ "automargin": true,
1009
+ "gridcolor": "white",
1010
+ "linecolor": "white",
1011
+ "ticks": "",
1012
+ "title": {
1013
+ "standoff": 15
1014
+ },
1015
+ "zerolinecolor": "white",
1016
+ "zerolinewidth": 2
1017
+ },
1018
+ "yaxis": {
1019
+ "automargin": true,
1020
+ "gridcolor": "white",
1021
+ "linecolor": "white",
1022
+ "ticks": "",
1023
+ "title": {
1024
+ "standoff": 15
1025
+ },
1026
+ "zerolinecolor": "white",
1027
+ "zerolinewidth": 2
1028
+ }
1029
+ }
1030
+ },
1031
+ "title": {
1032
+ "text": "Accidents Involving Pedestrians"
1033
+ }
1034
+ }
1035
+ }
1036
+ },
1037
+ "metadata": {},
1038
+ "output_type": "display_data"
1039
+ }
1040
+ ],
1041
+ "source": [
1042
+ "fig4"
1043
+ ]
1044
+ },
1045
+ {
1046
+ "cell_type": "code",
1047
+ "execution_count": 15,
1048
+ "metadata": {},
1049
+ "outputs": [],
1050
+ "source": [
1051
+ "yes_count=0\n",
1052
+ "no_count=0\n",
1053
+ "not_available_count=0\n",
1054
+ "for i in range(len(filtered_entries)):\n",
1055
+ " if ('Yes' in filtered_entries['Pedestrian_Involved'][i] or 'yes' in filtered_entries['Pedestrian_Involved'][i]): yes_count+=1\n",
1056
+ " if ('No' in filtered_entries['Pedestrian_Involved'][i] or 'no' in filtered_entries['Pedestrian_Involved'][i]): no_count+=1\n",
1057
+ " if ('Not Available' in filtered_entries['Pedestrian_Involved'][i]): not_available_count+=1\n",
1058
+ "Pedestrian_Involved_list = ['Yes', 'No', 'Not Available']\n",
1059
+ "Count_list = [yes_count, no_count, not_available_count]\n",
1060
+ "# dictionary of lists \n",
1061
+ "dict = {'Pedestrian Involved': Pedestrian_Involved_list, 'Count':Count_list} \n",
1062
+ "pedestrian_involvement = pd.DataFrame(dict)\n",
1063
+ "# Pie chart showing the percentage of accidents involving pedestrians vs. those that don't\n",
1064
+ "# pedestrian_involvement = filtered_entries['Pedestrian_Involved'].value_counts().reset_index()\n",
1065
+ "# pedestrian_involvement.columns = ['Pedestrian Involved', 'Count']\n",
1066
+ "\n",
1067
+ "fig4 = px.pie(pedestrian_involvement, \n",
1068
+ " names='Pedestrian Involved', \n",
1069
+ " values='Count', \n",
1070
+ " title=\"Accidents Involving Pedestrians\",\n",
1071
+ " labels={'Pedestrian Involved': 'Pedestrian Involved'})"
1072
+ ]
1073
+ },
1074
+ {
1075
+ "cell_type": "code",
1076
+ "execution_count": 16,
1077
+ "metadata": {},
1078
+ "outputs": [
1079
+ {
1080
+ "data": {
1081
+ "application/vnd.plotly.v1+json": {
1082
+ "config": {
1083
+ "plotlyServerURL": "https://plot.ly"
1084
+ },
1085
+ "data": [
1086
+ {
1087
+ "domain": {
1088
+ "x": [
1089
+ 0,
1090
+ 1
1091
+ ],
1092
+ "y": [
1093
+ 0,
1094
+ 1
1095
+ ]
1096
+ },
1097
+ "hovertemplate": "Pedestrian Involved=%{label}<br>Count=%{value}<extra></extra>",
1098
+ "labels": [
1099
+ "Yes",
1100
+ "No",
1101
+ "Not Available"
1102
+ ],
1103
+ "legendgroup": "",
1104
+ "name": "",
1105
+ "showlegend": true,
1106
+ "type": "pie",
1107
+ "values": [
1108
+ 8,
1109
+ 18,
1110
+ 12
1111
+ ]
1112
+ }
1113
+ ],
1114
+ "layout": {
1115
+ "legend": {
1116
+ "tracegroupgap": 0
1117
+ },
1118
+ "template": {
1119
+ "data": {
1120
+ "bar": [
1121
+ {
1122
+ "error_x": {
1123
+ "color": "#2a3f5f"
1124
+ },
1125
+ "error_y": {
1126
+ "color": "#2a3f5f"
1127
+ },
1128
+ "marker": {
1129
+ "line": {
1130
+ "color": "#E5ECF6",
1131
+ "width": 0.5
1132
+ },
1133
+ "pattern": {
1134
+ "fillmode": "overlay",
1135
+ "size": 10,
1136
+ "solidity": 0.2
1137
+ }
1138
+ },
1139
+ "type": "bar"
1140
+ }
1141
+ ],
1142
+ "barpolar": [
1143
+ {
1144
+ "marker": {
1145
+ "line": {
1146
+ "color": "#E5ECF6",
1147
+ "width": 0.5
1148
+ },
1149
+ "pattern": {
1150
+ "fillmode": "overlay",
1151
+ "size": 10,
1152
+ "solidity": 0.2
1153
+ }
1154
+ },
1155
+ "type": "barpolar"
1156
+ }
1157
+ ],
1158
+ "carpet": [
1159
+ {
1160
+ "aaxis": {
1161
+ "endlinecolor": "#2a3f5f",
1162
+ "gridcolor": "white",
1163
+ "linecolor": "white",
1164
+ "minorgridcolor": "white",
1165
+ "startlinecolor": "#2a3f5f"
1166
+ },
1167
+ "baxis": {
1168
+ "endlinecolor": "#2a3f5f",
1169
+ "gridcolor": "white",
1170
+ "linecolor": "white",
1171
+ "minorgridcolor": "white",
1172
+ "startlinecolor": "#2a3f5f"
1173
+ },
1174
+ "type": "carpet"
1175
+ }
1176
+ ],
1177
+ "choropleth": [
1178
+ {
1179
+ "colorbar": {
1180
+ "outlinewidth": 0,
1181
+ "ticks": ""
1182
+ },
1183
+ "type": "choropleth"
1184
+ }
1185
+ ],
1186
+ "contour": [
1187
+ {
1188
+ "colorbar": {
1189
+ "outlinewidth": 0,
1190
+ "ticks": ""
1191
+ },
1192
+ "colorscale": [
1193
+ [
1194
+ 0,
1195
+ "#0d0887"
1196
+ ],
1197
+ [
1198
+ 0.1111111111111111,
1199
+ "#46039f"
1200
+ ],
1201
+ [
1202
+ 0.2222222222222222,
1203
+ "#7201a8"
1204
+ ],
1205
+ [
1206
+ 0.3333333333333333,
1207
+ "#9c179e"
1208
+ ],
1209
+ [
1210
+ 0.4444444444444444,
1211
+ "#bd3786"
1212
+ ],
1213
+ [
1214
+ 0.5555555555555556,
1215
+ "#d8576b"
1216
+ ],
1217
+ [
1218
+ 0.6666666666666666,
1219
+ "#ed7953"
1220
+ ],
1221
+ [
1222
+ 0.7777777777777778,
1223
+ "#fb9f3a"
1224
+ ],
1225
+ [
1226
+ 0.8888888888888888,
1227
+ "#fdca26"
1228
+ ],
1229
+ [
1230
+ 1,
1231
+ "#f0f921"
1232
+ ]
1233
+ ],
1234
+ "type": "contour"
1235
+ }
1236
+ ],
1237
+ "contourcarpet": [
1238
+ {
1239
+ "colorbar": {
1240
+ "outlinewidth": 0,
1241
+ "ticks": ""
1242
+ },
1243
+ "type": "contourcarpet"
1244
+ }
1245
+ ],
1246
+ "heatmap": [
1247
+ {
1248
+ "colorbar": {
1249
+ "outlinewidth": 0,
1250
+ "ticks": ""
1251
+ },
1252
+ "colorscale": [
1253
+ [
1254
+ 0,
1255
+ "#0d0887"
1256
+ ],
1257
+ [
1258
+ 0.1111111111111111,
1259
+ "#46039f"
1260
+ ],
1261
+ [
1262
+ 0.2222222222222222,
1263
+ "#7201a8"
1264
+ ],
1265
+ [
1266
+ 0.3333333333333333,
1267
+ "#9c179e"
1268
+ ],
1269
+ [
1270
+ 0.4444444444444444,
1271
+ "#bd3786"
1272
+ ],
1273
+ [
1274
+ 0.5555555555555556,
1275
+ "#d8576b"
1276
+ ],
1277
+ [
1278
+ 0.6666666666666666,
1279
+ "#ed7953"
1280
+ ],
1281
+ [
1282
+ 0.7777777777777778,
1283
+ "#fb9f3a"
1284
+ ],
1285
+ [
1286
+ 0.8888888888888888,
1287
+ "#fdca26"
1288
+ ],
1289
+ [
1290
+ 1,
1291
+ "#f0f921"
1292
+ ]
1293
+ ],
1294
+ "type": "heatmap"
1295
+ }
1296
+ ],
1297
+ "heatmapgl": [
1298
+ {
1299
+ "colorbar": {
1300
+ "outlinewidth": 0,
1301
+ "ticks": ""
1302
+ },
1303
+ "colorscale": [
1304
+ [
1305
+ 0,
1306
+ "#0d0887"
1307
+ ],
1308
+ [
1309
+ 0.1111111111111111,
1310
+ "#46039f"
1311
+ ],
1312
+ [
1313
+ 0.2222222222222222,
1314
+ "#7201a8"
1315
+ ],
1316
+ [
1317
+ 0.3333333333333333,
1318
+ "#9c179e"
1319
+ ],
1320
+ [
1321
+ 0.4444444444444444,
1322
+ "#bd3786"
1323
+ ],
1324
+ [
1325
+ 0.5555555555555556,
1326
+ "#d8576b"
1327
+ ],
1328
+ [
1329
+ 0.6666666666666666,
1330
+ "#ed7953"
1331
+ ],
1332
+ [
1333
+ 0.7777777777777778,
1334
+ "#fb9f3a"
1335
+ ],
1336
+ [
1337
+ 0.8888888888888888,
1338
+ "#fdca26"
1339
+ ],
1340
+ [
1341
+ 1,
1342
+ "#f0f921"
1343
+ ]
1344
+ ],
1345
+ "type": "heatmapgl"
1346
+ }
1347
+ ],
1348
+ "histogram": [
1349
+ {
1350
+ "marker": {
1351
+ "pattern": {
1352
+ "fillmode": "overlay",
1353
+ "size": 10,
1354
+ "solidity": 0.2
1355
+ }
1356
+ },
1357
+ "type": "histogram"
1358
+ }
1359
+ ],
1360
+ "histogram2d": [
1361
+ {
1362
+ "colorbar": {
1363
+ "outlinewidth": 0,
1364
+ "ticks": ""
1365
+ },
1366
+ "colorscale": [
1367
+ [
1368
+ 0,
1369
+ "#0d0887"
1370
+ ],
1371
+ [
1372
+ 0.1111111111111111,
1373
+ "#46039f"
1374
+ ],
1375
+ [
1376
+ 0.2222222222222222,
1377
+ "#7201a8"
1378
+ ],
1379
+ [
1380
+ 0.3333333333333333,
1381
+ "#9c179e"
1382
+ ],
1383
+ [
1384
+ 0.4444444444444444,
1385
+ "#bd3786"
1386
+ ],
1387
+ [
1388
+ 0.5555555555555556,
1389
+ "#d8576b"
1390
+ ],
1391
+ [
1392
+ 0.6666666666666666,
1393
+ "#ed7953"
1394
+ ],
1395
+ [
1396
+ 0.7777777777777778,
1397
+ "#fb9f3a"
1398
+ ],
1399
+ [
1400
+ 0.8888888888888888,
1401
+ "#fdca26"
1402
+ ],
1403
+ [
1404
+ 1,
1405
+ "#f0f921"
1406
+ ]
1407
+ ],
1408
+ "type": "histogram2d"
1409
+ }
1410
+ ],
1411
+ "histogram2dcontour": [
1412
+ {
1413
+ "colorbar": {
1414
+ "outlinewidth": 0,
1415
+ "ticks": ""
1416
+ },
1417
+ "colorscale": [
1418
+ [
1419
+ 0,
1420
+ "#0d0887"
1421
+ ],
1422
+ [
1423
+ 0.1111111111111111,
1424
+ "#46039f"
1425
+ ],
1426
+ [
1427
+ 0.2222222222222222,
1428
+ "#7201a8"
1429
+ ],
1430
+ [
1431
+ 0.3333333333333333,
1432
+ "#9c179e"
1433
+ ],
1434
+ [
1435
+ 0.4444444444444444,
1436
+ "#bd3786"
1437
+ ],
1438
+ [
1439
+ 0.5555555555555556,
1440
+ "#d8576b"
1441
+ ],
1442
+ [
1443
+ 0.6666666666666666,
1444
+ "#ed7953"
1445
+ ],
1446
+ [
1447
+ 0.7777777777777778,
1448
+ "#fb9f3a"
1449
+ ],
1450
+ [
1451
+ 0.8888888888888888,
1452
+ "#fdca26"
1453
+ ],
1454
+ [
1455
+ 1,
1456
+ "#f0f921"
1457
+ ]
1458
+ ],
1459
+ "type": "histogram2dcontour"
1460
+ }
1461
+ ],
1462
+ "mesh3d": [
1463
+ {
1464
+ "colorbar": {
1465
+ "outlinewidth": 0,
1466
+ "ticks": ""
1467
+ },
1468
+ "type": "mesh3d"
1469
+ }
1470
+ ],
1471
+ "parcoords": [
1472
+ {
1473
+ "line": {
1474
+ "colorbar": {
1475
+ "outlinewidth": 0,
1476
+ "ticks": ""
1477
+ }
1478
+ },
1479
+ "type": "parcoords"
1480
+ }
1481
+ ],
1482
+ "pie": [
1483
+ {
1484
+ "automargin": true,
1485
+ "type": "pie"
1486
+ }
1487
+ ],
1488
+ "scatter": [
1489
+ {
1490
+ "fillpattern": {
1491
+ "fillmode": "overlay",
1492
+ "size": 10,
1493
+ "solidity": 0.2
1494
+ },
1495
+ "type": "scatter"
1496
+ }
1497
+ ],
1498
+ "scatter3d": [
1499
+ {
1500
+ "line": {
1501
+ "colorbar": {
1502
+ "outlinewidth": 0,
1503
+ "ticks": ""
1504
+ }
1505
+ },
1506
+ "marker": {
1507
+ "colorbar": {
1508
+ "outlinewidth": 0,
1509
+ "ticks": ""
1510
+ }
1511
+ },
1512
+ "type": "scatter3d"
1513
+ }
1514
+ ],
1515
+ "scattercarpet": [
1516
+ {
1517
+ "marker": {
1518
+ "colorbar": {
1519
+ "outlinewidth": 0,
1520
+ "ticks": ""
1521
+ }
1522
+ },
1523
+ "type": "scattercarpet"
1524
+ }
1525
+ ],
1526
+ "scattergeo": [
1527
+ {
1528
+ "marker": {
1529
+ "colorbar": {
1530
+ "outlinewidth": 0,
1531
+ "ticks": ""
1532
+ }
1533
+ },
1534
+ "type": "scattergeo"
1535
+ }
1536
+ ],
1537
+ "scattergl": [
1538
+ {
1539
+ "marker": {
1540
+ "colorbar": {
1541
+ "outlinewidth": 0,
1542
+ "ticks": ""
1543
+ }
1544
+ },
1545
+ "type": "scattergl"
1546
+ }
1547
+ ],
1548
+ "scattermapbox": [
1549
+ {
1550
+ "marker": {
1551
+ "colorbar": {
1552
+ "outlinewidth": 0,
1553
+ "ticks": ""
1554
+ }
1555
+ },
1556
+ "type": "scattermapbox"
1557
+ }
1558
+ ],
1559
+ "scatterpolar": [
1560
+ {
1561
+ "marker": {
1562
+ "colorbar": {
1563
+ "outlinewidth": 0,
1564
+ "ticks": ""
1565
+ }
1566
+ },
1567
+ "type": "scatterpolar"
1568
+ }
1569
+ ],
1570
+ "scatterpolargl": [
1571
+ {
1572
+ "marker": {
1573
+ "colorbar": {
1574
+ "outlinewidth": 0,
1575
+ "ticks": ""
1576
+ }
1577
+ },
1578
+ "type": "scatterpolargl"
1579
+ }
1580
+ ],
1581
+ "scatterternary": [
1582
+ {
1583
+ "marker": {
1584
+ "colorbar": {
1585
+ "outlinewidth": 0,
1586
+ "ticks": ""
1587
+ }
1588
+ },
1589
+ "type": "scatterternary"
1590
+ }
1591
+ ],
1592
+ "surface": [
1593
+ {
1594
+ "colorbar": {
1595
+ "outlinewidth": 0,
1596
+ "ticks": ""
1597
+ },
1598
+ "colorscale": [
1599
+ [
1600
+ 0,
1601
+ "#0d0887"
1602
+ ],
1603
+ [
1604
+ 0.1111111111111111,
1605
+ "#46039f"
1606
+ ],
1607
+ [
1608
+ 0.2222222222222222,
1609
+ "#7201a8"
1610
+ ],
1611
+ [
1612
+ 0.3333333333333333,
1613
+ "#9c179e"
1614
+ ],
1615
+ [
1616
+ 0.4444444444444444,
1617
+ "#bd3786"
1618
+ ],
1619
+ [
1620
+ 0.5555555555555556,
1621
+ "#d8576b"
1622
+ ],
1623
+ [
1624
+ 0.6666666666666666,
1625
+ "#ed7953"
1626
+ ],
1627
+ [
1628
+ 0.7777777777777778,
1629
+ "#fb9f3a"
1630
+ ],
1631
+ [
1632
+ 0.8888888888888888,
1633
+ "#fdca26"
1634
+ ],
1635
+ [
1636
+ 1,
1637
+ "#f0f921"
1638
+ ]
1639
+ ],
1640
+ "type": "surface"
1641
+ }
1642
+ ],
1643
+ "table": [
1644
+ {
1645
+ "cells": {
1646
+ "fill": {
1647
+ "color": "#EBF0F8"
1648
+ },
1649
+ "line": {
1650
+ "color": "white"
1651
+ }
1652
+ },
1653
+ "header": {
1654
+ "fill": {
1655
+ "color": "#C8D4E3"
1656
+ },
1657
+ "line": {
1658
+ "color": "white"
1659
+ }
1660
+ },
1661
+ "type": "table"
1662
+ }
1663
+ ]
1664
+ },
1665
+ "layout": {
1666
+ "annotationdefaults": {
1667
+ "arrowcolor": "#2a3f5f",
1668
+ "arrowhead": 0,
1669
+ "arrowwidth": 1
1670
+ },
1671
+ "autotypenumbers": "strict",
1672
+ "coloraxis": {
1673
+ "colorbar": {
1674
+ "outlinewidth": 0,
1675
+ "ticks": ""
1676
+ }
1677
+ },
1678
+ "colorscale": {
1679
+ "diverging": [
1680
+ [
1681
+ 0,
1682
+ "#8e0152"
1683
+ ],
1684
+ [
1685
+ 0.1,
1686
+ "#c51b7d"
1687
+ ],
1688
+ [
1689
+ 0.2,
1690
+ "#de77ae"
1691
+ ],
1692
+ [
1693
+ 0.3,
1694
+ "#f1b6da"
1695
+ ],
1696
+ [
1697
+ 0.4,
1698
+ "#fde0ef"
1699
+ ],
1700
+ [
1701
+ 0.5,
1702
+ "#f7f7f7"
1703
+ ],
1704
+ [
1705
+ 0.6,
1706
+ "#e6f5d0"
1707
+ ],
1708
+ [
1709
+ 0.7,
1710
+ "#b8e186"
1711
+ ],
1712
+ [
1713
+ 0.8,
1714
+ "#7fbc41"
1715
+ ],
1716
+ [
1717
+ 0.9,
1718
+ "#4d9221"
1719
+ ],
1720
+ [
1721
+ 1,
1722
+ "#276419"
1723
+ ]
1724
+ ],
1725
+ "sequential": [
1726
+ [
1727
+ 0,
1728
+ "#0d0887"
1729
+ ],
1730
+ [
1731
+ 0.1111111111111111,
1732
+ "#46039f"
1733
+ ],
1734
+ [
1735
+ 0.2222222222222222,
1736
+ "#7201a8"
1737
+ ],
1738
+ [
1739
+ 0.3333333333333333,
1740
+ "#9c179e"
1741
+ ],
1742
+ [
1743
+ 0.4444444444444444,
1744
+ "#bd3786"
1745
+ ],
1746
+ [
1747
+ 0.5555555555555556,
1748
+ "#d8576b"
1749
+ ],
1750
+ [
1751
+ 0.6666666666666666,
1752
+ "#ed7953"
1753
+ ],
1754
+ [
1755
+ 0.7777777777777778,
1756
+ "#fb9f3a"
1757
+ ],
1758
+ [
1759
+ 0.8888888888888888,
1760
+ "#fdca26"
1761
+ ],
1762
+ [
1763
+ 1,
1764
+ "#f0f921"
1765
+ ]
1766
+ ],
1767
+ "sequentialminus": [
1768
+ [
1769
+ 0,
1770
+ "#0d0887"
1771
+ ],
1772
+ [
1773
+ 0.1111111111111111,
1774
+ "#46039f"
1775
+ ],
1776
+ [
1777
+ 0.2222222222222222,
1778
+ "#7201a8"
1779
+ ],
1780
+ [
1781
+ 0.3333333333333333,
1782
+ "#9c179e"
1783
+ ],
1784
+ [
1785
+ 0.4444444444444444,
1786
+ "#bd3786"
1787
+ ],
1788
+ [
1789
+ 0.5555555555555556,
1790
+ "#d8576b"
1791
+ ],
1792
+ [
1793
+ 0.6666666666666666,
1794
+ "#ed7953"
1795
+ ],
1796
+ [
1797
+ 0.7777777777777778,
1798
+ "#fb9f3a"
1799
+ ],
1800
+ [
1801
+ 0.8888888888888888,
1802
+ "#fdca26"
1803
+ ],
1804
+ [
1805
+ 1,
1806
+ "#f0f921"
1807
+ ]
1808
+ ]
1809
+ },
1810
+ "colorway": [
1811
+ "#636efa",
1812
+ "#EF553B",
1813
+ "#00cc96",
1814
+ "#ab63fa",
1815
+ "#FFA15A",
1816
+ "#19d3f3",
1817
+ "#FF6692",
1818
+ "#B6E880",
1819
+ "#FF97FF",
1820
+ "#FECB52"
1821
+ ],
1822
+ "font": {
1823
+ "color": "#2a3f5f"
1824
+ },
1825
+ "geo": {
1826
+ "bgcolor": "white",
1827
+ "lakecolor": "white",
1828
+ "landcolor": "#E5ECF6",
1829
+ "showlakes": true,
1830
+ "showland": true,
1831
+ "subunitcolor": "white"
1832
+ },
1833
+ "hoverlabel": {
1834
+ "align": "left"
1835
+ },
1836
+ "hovermode": "closest",
1837
+ "mapbox": {
1838
+ "style": "light"
1839
+ },
1840
+ "paper_bgcolor": "white",
1841
+ "plot_bgcolor": "#E5ECF6",
1842
+ "polar": {
1843
+ "angularaxis": {
1844
+ "gridcolor": "white",
1845
+ "linecolor": "white",
1846
+ "ticks": ""
1847
+ },
1848
+ "bgcolor": "#E5ECF6",
1849
+ "radialaxis": {
1850
+ "gridcolor": "white",
1851
+ "linecolor": "white",
1852
+ "ticks": ""
1853
+ }
1854
+ },
1855
+ "scene": {
1856
+ "xaxis": {
1857
+ "backgroundcolor": "#E5ECF6",
1858
+ "gridcolor": "white",
1859
+ "gridwidth": 2,
1860
+ "linecolor": "white",
1861
+ "showbackground": true,
1862
+ "ticks": "",
1863
+ "zerolinecolor": "white"
1864
+ },
1865
+ "yaxis": {
1866
+ "backgroundcolor": "#E5ECF6",
1867
+ "gridcolor": "white",
1868
+ "gridwidth": 2,
1869
+ "linecolor": "white",
1870
+ "showbackground": true,
1871
+ "ticks": "",
1872
+ "zerolinecolor": "white"
1873
+ },
1874
+ "zaxis": {
1875
+ "backgroundcolor": "#E5ECF6",
1876
+ "gridcolor": "white",
1877
+ "gridwidth": 2,
1878
+ "linecolor": "white",
1879
+ "showbackground": true,
1880
+ "ticks": "",
1881
+ "zerolinecolor": "white"
1882
+ }
1883
+ },
1884
+ "shapedefaults": {
1885
+ "line": {
1886
+ "color": "#2a3f5f"
1887
+ }
1888
+ },
1889
+ "ternary": {
1890
+ "aaxis": {
1891
+ "gridcolor": "white",
1892
+ "linecolor": "white",
1893
+ "ticks": ""
1894
+ },
1895
+ "baxis": {
1896
+ "gridcolor": "white",
1897
+ "linecolor": "white",
1898
+ "ticks": ""
1899
+ },
1900
+ "bgcolor": "#E5ECF6",
1901
+ "caxis": {
1902
+ "gridcolor": "white",
1903
+ "linecolor": "white",
1904
+ "ticks": ""
1905
+ }
1906
+ },
1907
+ "title": {
1908
+ "x": 0.05
1909
+ },
1910
+ "xaxis": {
1911
+ "automargin": true,
1912
+ "gridcolor": "white",
1913
+ "linecolor": "white",
1914
+ "ticks": "",
1915
+ "title": {
1916
+ "standoff": 15
1917
+ },
1918
+ "zerolinecolor": "white",
1919
+ "zerolinewidth": 2
1920
+ },
1921
+ "yaxis": {
1922
+ "automargin": true,
1923
+ "gridcolor": "white",
1924
+ "linecolor": "white",
1925
+ "ticks": "",
1926
+ "title": {
1927
+ "standoff": 15
1928
+ },
1929
+ "zerolinecolor": "white",
1930
+ "zerolinewidth": 2
1931
+ }
1932
+ }
1933
+ },
1934
+ "title": {
1935
+ "text": "Accidents Involving Pedestrians"
1936
+ }
1937
+ }
1938
+ }
1939
+ },
1940
+ "metadata": {},
1941
+ "output_type": "display_data"
1942
+ }
1943
+ ],
1944
+ "source": [
1945
+ "fig4"
1946
+ ]
1947
+ },
1948
+ {
1949
+ "cell_type": "code",
1950
+ "execution_count": null,
1951
+ "metadata": {},
1952
+ "outputs": [],
1953
+ "source": []
1954
+ }
1955
+ ],
1956
+ "metadata": {
1957
+ "kernelspec": {
1958
+ "display_name": "langchain_venv",
1959
+ "language": "python",
1960
+ "name": "python3"
1961
+ },
1962
+ "language_info": {
1963
+ "codemirror_mode": {
1964
+ "name": "ipython",
1965
+ "version": 3
1966
+ },
1967
+ "file_extension": ".py",
1968
+ "mimetype": "text/x-python",
1969
+ "name": "python",
1970
+ "nbconvert_exporter": "python",
1971
+ "pygments_lexer": "ipython3",
1972
+ "version": "3.12.3"
1973
+ }
1974
+ },
1975
+ "nbformat": 4,
1976
+ "nbformat_minor": 2
1977
+ }
updated_dataset.csv ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ News Title,News Link,Publish Date,Accident Date,Time,Killed,Injured,Location,Road_Characteristic,Pedestrian_Involved,Vehicles_involved,District
2
+ "Bus hits covered van in Comilla, body of bus driver's assistant is dismembered",https://www.prothomalo.com/bangladesh/district/r0rhz36tbg,11-09-2024,13-09-2024, 11:30 am,1, 14, Kamalapur area of ​​Sadar Dakshin Upazila on the Dhaka-Chittagong highway, Highway, Not Available,Bus-Covered Van,Chandpur
3
+ "Two motorcycles collided in Natore, 2 including the principal were killed",https://www.prothomalo.com/bangladesh/district/%E0%A6%A8%E0%A6%BE%E0%A6%9F%E0%A7%8B%E0%A6%B0%E0%A7%87-%E0%A6%A6%E0%A7%81%E0%A6%87-%E0%A6%AE%E0%A7%8B%E0%A6%9F%E0%A6%B0%E0%A6%B8%E0%A6%BE%E0%A6%87%E0%A6%95%E0%A7%87%E0%A6%B2%E0%A7%87%E0%A6%B0-%E0%A6%B8%E0%A6%82%E0%A6%98%E0%A6%B0%E0%A7%8D%E0%A6%B7-%E0%A6%85%E0%A6%A7%E0%A7%8D%E0%A6%AF%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A6%B8%E0%A6%B9-%E0%A6%A8%E0%A6%BF%E0%A6%B9%E0%A6%A4-%E0%A7%A8,11-09-2024,10-09-2024, 8 o'clock,3, 1, Dalsak intersection of Sadar upazila, Natore-Bogra highway, No,Motorcycle-Motorcycle,Rajshahi
4
+ "Bus hits behind microbus in Comilla, 4 killed",https://www.prothomalo.com/bangladesh/district/ktqnu1f700,06-09-2024,04-09-2024, 6:00 am,4, 5, Batisa Nankara area of Dhaka-Chittagong highway, Highway, Not Available,Microbus-Bus-Truck,Feni
5
+ One person was killed after being hit by a truck in the capital's Uttara,https://www.prothomalo.com/bangladesh/capital/mbr4fzonnp,05-09-2024,02-09-2024, Wednesday morning,1, 1, Azampur area of ​​the capital's Uttara, Not Available, Yes,Truck-Bicycle,Uttara
6
+ Chittagong University student Fahim did not go to the flood victims with relief,https://www.prothomalo.com/bangladesh/phde3rfaug,04-09-2024,26-08-2024, 3 o'clock,1, 3, Baryarhat area of ​​Mirsarai, Not Available, Not Available,Truck-Covered Van,Chattogram
7
+ 11 students-parents killed by school bus in China,https://www.prothomalo.com/world/asia/h0b1jvhefi,03-09-2024,01-09-2024, 7 am,11, 13, Tai'an city in eastern China's Shandong province, Not Available, Yes,School bus,Foreign
8
+ "Doctors returned to work after 12 hours, suffering all day",https://www.prothomalo.com/bangladesh/8vyl1xuo6g,02-09-2024,31-08-2024, 10 pm,0, 1, On the way back to Mirpur, Not Available, Not Available,Motorcycle,Dhaka
9
+ "Kishore Sadman, a US citizen, was killed by a truck, not murder",https://www.prothomalo.com/bangladesh/district/qlt7w1pwzs,01-09-2024,31-08-2024, 3:30 pm,1, 0, Polytechnic Institute area of ​​Khulshi police station, Not Available, Yes,Auto-rickshaw-Car-Truck,Chattogram
10
+ "8 passengers, including a child, died when a bus overturned in the United States",https://www.prothomalo.com/world/usa/nephzj2b5m,01-09-2024,31-08-2024, Not Available,8, 30+, Warren County, Not Available, No,Bus,Foreign
11
+ Three people died in separate road accidents in Godagari,https://www.prothomalo.com/bangladesh/district/nhy65ev9d7,28-08-2024,27-08-2024, 05:00 and 08:30,3, 0, Rajshahi-Chapainawabganj highway, Highway, Yes,Autorickshaw-Pickup-Bus,Chapainawabganj
12
+ "Bus hits passenger van in Gaibandha, 2 killed",https://www.prothomalo.com/bangladesh/district/wbndau15rz,28-08-2024,27-08-2024, 10:30 am,2, 1, Palashbari, Gaibandha-Palashbari road, No,Bus-Rickshaw,Gaibandha
13
+ Two motorcycle riders were killed in a collision with an autorickshaw,https://www.prothomalo.com/bangladesh/district/fut1wqny4q,25-08-2024,24-08-2024, 10:30 am,2, 5, Kodda area of ​​Sadar upazila on Akhaura-Agartala road, Highway, No,Motorcycle-CNG-powered auto-rickshaw,Brahmanbaria
14
+ Mother and son killed by bus in Gournadi,https://www.prothomalo.com/bangladesh/district/mi8g0t4yzm,25-08-2024,24-08-2024, 1:30 pm,2, 9, Mahilara area of ​​the Dhaka-Barisal highway, Highway, Not Available,Bus-Mahindra,Barisal
15
+ Two workers were killed when a cement-laden truck overturned in a pond in Chapainawabganj,https://www.prothomalo.com/bangladesh/district/if2u6ksb2r,23-08-2024,22-08-2024, 10:30 am,2, 4, Sonapur area of ​​Shahbazpur Union of Shibganj upazila, Not Available, Not Available,Truck,Chapainawabganj
16
+ Journalist killed in late night motorcycle accident in Sylhet,https://www.prothomalo.com/bangladesh/district/m95lo3kg5q,23-08-2024,22-08-2024, 3 am,1, 0, Madina Market area of Sylhet city, Sylhet-Sunamganj road, No,Motorcycle,Sylhet
17
+ Microbus driver killed in Gazipur accident,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/microbus-driver-killed-gazipur-accident-3697286,08-09-2024,08-09-2024, 5:00am,1, 0, Gazipur's Kapasia upazila, Highway, Not Available,Microbus-Truck,Gazipur
18
+ Three die as bus hits truck,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/three-die-bus-hits-truck-3696446,08-09-2024,08-09-2024, 5:30am,3, 10, Bangabandhu Bridge in Sirajganj, Bridge, Not Available,Bus-Truck,Sirajganj
19
+ Road accidents kill two in Rajshahi,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/road-accidents-kill-two-rajshahi-3696286,07-09-2024,07-09-2024, This noon,1, Not Available, Naogaon, Highway, No,Tractor-Motorbike - Drum truck-Motorbike,Naogaon
20
+ 4 killed as bus hits microbus in Cumilla,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/4-killed-bus-hits-microbus-cumilla-3695881,07-09-2024,07-09-2024, 6:00am,4, Not Available, Dhaka-Chattogram highway, Highway, No,"Bus-Microbus, Truck-Truck, Motorbike",Narayanganj
21
+ "6 killed as bus, truck collide in Gopalganj",https://www.thedailystar.net/news/bangladesh/accidents-fires/news/6-killed-bus-truck-collide-gopalganj-3691641,01-09-2024,01-09-2024, 7:45am,6, 24, Kashiani upazila of Gopalganj, Dhaka-Khulna highway, Not Available,Bus-Truck,Gopalganj
22
+ 4 of a family die in road crash,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/4-family-die-road-crash-3691551,01-09-2024,01-09-2024, 9:30pm,4, 4, Dhaka-Sylhet highway in Narsingdi's Basail area, Highway, Not Available,Microbus-Lorry,Narsingdi
23
+ Teacher dies in road accident while going to school in Gazipur,https://www.prothomalo.com/bangladesh/district/iqrle7n5c3,17-09-2024,17-09-2024, 9:30 am,1, 3, Gazipur's Kapasia, regional road, no,Motorcycle-Motorcycle,Gazipur
24
+ Chhatra Dal leader and 2 killed in Habiganj truck crash,https://www.prothomalo.com/bangladesh/district/prg8sosnjf,15-09-2024,15-09-2024, 10 pm,2, 0, Chunarughat, Highway, No,Motorcycle-Truck,Habiganj
25
+ "Autorickshaw lost control and hit a tree, one passenger was killed",https://www.prothomalo.com/bangladesh/ikhiavndum,14-09-2024,13-09-2024, 7 pm,1, 1, Sagaria Bazar in Burirachar Union of Hatia upazila, Road, No,Auto-rickshaw,Noakhali
26
+ Grandparents killed by bus while crossing highway in Comilla,https://www.prothomalo.com/bangladesh/district/d5j7xocwjh,14-09-2024,14-09-2024, 1:15,2, 0, Kalakchua area of ​​the highway, Highway, Yes,Bus,Dhaka
27
+ Sajedur lost his life in a road accident on his wedding day,https://www.prothomalo.com/bangladesh/district/oawvu23ld2,14-09-2024,14-09-2024, 12 noon,1, 1, Sutkigacha area of ​​Atrai-Bandhaikhara road, road, no,Motorcycle,Naogaon
28
+ "After hitting the pedestrian, he fell on the road and killed 2 including the motorcyclist",https://www.prothomalo.com/bangladesh/district/y0o8a8mnoc,14-09-2024,14-09-2024, 8,2, 2, Jairampur Kanthaltala, road, yes,Motorcycle,Rangpur
29
+ Hafez was killed in a collision between a pickup and a motorcycle in Kishoreganj,https://www.prothomalo.com/bangladesh/district/u93u1oom76,12-09-2024,12-09-2024, 10 am,1, 0, Kishoreganj, municipal office road, No,Motorcycle-Pickup van,Kishoreganj
30
+ "Mother's death while trying to save her son, madrasa teacher returned home as a dead body",https://www.prothomalo.com/bangladesh/district/mctzh3e58s,12-09-2024,12-09-2024, evening,1, 0, Fulgazi Upazila Sadar, road, yes,Truck-Motorcycle-Covered van,Feni
31
+ "Bus hits covered van in Comilla, body of bus driver's assistant is dismembered",https://www.prothomalo.com/bangladesh/district/r0rhz36tbg,11-09-2024,11-09-2024, 11:30 am,1, 14, Kamalapur area of ​​Sadar Dakshin Upazila, highway, No,Bus-Covered van, Jamalpur
32
+ "Two motorcycles collided in Natore, 2 including the principal were killed",https://www.prothomalo.com/bangladesh/district/%E0%A6%A8%E0%A6%BE%E0%A6%9F%E0%A7%8B%E0%A6%B0%E0%A7%87-%E0%A6%A6%E0%A7%81%E0%A6%87-%E0%A6%AE%E0%A7%8B%E0%A6%9F%E0%A6%B0%E0%A6%B8%E0%A6%BE%E0%A6%87%E0%A6%95%E0%A7%87%E0%A6%B2%E0%A7%87%E0%A6%B0-%E0%A6%B8%E0%A6%82%E0%A6%98%E0%A6%B0%E0%A7%8D%E0%A6%B7-%E0%A6%85%E0%A6%A7%E0%A7%8D%E0%A6%AF%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A6%B8%E0%A6%B9-%E0%A6%A8%E0%A6%BF%E0%A6%B9%E0%A6%A4-%E0%A7%A8,11-09-2024,11-09-2024, around eight o'clock,2, 2, Dalsak intersection of Sadar upazila, highway, no,Motorcycle-Motorcycle,Rajbari
33
+ 4 easybike riders killed in Bagerhat highway collision with pickup,https://www.prothomalo.com/bangladesh/district/actgi42zcn,09-09-2024,09-09-2024, 9 am,4, 2, Fakirhat upazila of Bagerhat, highway, no,Easy bike-Pickup van,Bagerhat
34
+ "Bus hits the back of a truck on Bangabandhu Bridge, 3 killed",https://www.prothomalo.com/bangladesh/district/501ral82u8,07-09-2024,07-09-2024, 5:30 a.m.,3, 8, Bangabandhu Bridge, Highway, No,Bus-Truck,Sirajganj
35
+ "Another truck hit the back of the truck standing on the road, the driver's assistant died",https://www.prothomalo.com/bangladesh/district/r08hi8rgvq,06-09-2024,06-09-2024, 6 am,1, 1, Dinajpur-Gobindganj regional highway, Highway, No,Truck-Truck,Dinajpur
36
+ Seventy-year-old woman killed in Jurain bus crash,https://www.prothomalo.com/bangladesh/capital/fw33c6xf1g,05-09-2024,05-09-2024, afternoon,1, 1, Jurain, road, yes,Bus,Dhaka
37
+ 2 die as motorcycles crash into auto-rickshaw in Gazipur,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/2-die-motorcycles-crash-auto-rickshaw-gazipur-3706046,18-09-2024,18-09-2024, 1:00pm,2, 2, Dhaka-Monohardi Road, Road, No,Motorcycles-Auto-rickshaw,Narshingdi
38
+ Five killed as lorry rams autorickshaw,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/five-killed-lorry-rams-autorickshaw-3703381,16-09-2024,16-09-2024, 11:00pm,5, 1, Kaliganj, bypass road, no,Lorry-Autorickshaw,Jhenaidah
39
+ "Two dead, seven injured as bus hits battery-run auto-rickshaw in Pabna",https://www.thedailystar.net/news/bangladesh/accidents-fires/news/two-dead-seven-injured-bus-hits-battery-run-auto-rickshaw-pabna-3703686,15-09-2024,15-09-2024, this afternoon,2, 7, Pabna-Rajshahi highway, highway, no,Bus-Auto-rickshaw,Pabna
40
+ Three killed after being hit by truck in Narail,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/three-killed-after-being-hit-truck-narail-3700166,11-09-2024,11-09-2024, 12:00am,3, 1, Dhaka-Narail highway, Highway, Yes,Truck,Narail
41
+ Two RMG workers killed in Dhaka-Tangail highway accident,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/two-rmg-workers-killed-dhaka-tangail-highway-accident-3699366,10-09-2024,10-09-2024, this afternoon,2, 3, Dhaka-Tangail highway in Gazipur's Kaliakair, highway, yes,Cargo truck,Gazipur
42
+ Woman dies after being hit by battery-run rickshaw at Shahbag,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/woman-dies-after-being-hit-battery-run-rickshaw-shahbag-3698891,10-09-2024,09-09-2024, 3:00pm,1, 1, Shahbagh area, unspecified, yes,Battery-run rickshaw,Dhaka
43
+ 9 killed as car drives into crowd near Seoul city hall,https://www.dhakatribune.com/world/asia/350767/9-killed-as-car-drives-into-crowd-near-seoul-city,01-07-2024,01-07-2024, unknown,9, 4, near Seoul city hall, crosswalk, yes,Car-car,Foreign
44
+ Two brothers killed as truck rams motorcycle in Dhaka,https://www.dhakatribune.com/bangladesh/dhaka/350447/one-dead-two-injured-in-khilkhet-pickup-truck,28-06-2024,28-06-2024, around midnight,2, 0, Kalshi Road, , yes,Truck-Motorcycle,Rajshahi
45
+ Four killed as private car hits tree in Pabna,https://www.dhakatribune.com/bangladesh/nation/351116/four-killed-as-private-car-hits-tree-in-pabna,05-07-2024,05-07-2024, 9pm,4, 3, Pabna-Ishwardi highway, Highway, No,Car,Pabna
46
+ Barguna bridge collapse: 6-member probe body formed,https://www.dhakatribune.com/bangladesh/nation/350004/probe-committee-formed-to-investigate-as-bridge,23-06-2024,23-06-2024, 1:30pm,9, 0," Amtali, Barguna", Bridge, No,Microbus-Auto-rickshaw,Barguna
47
+ 9 of a wedding party killed in Barguna bridge collapse,https://www.dhakatribune.com/bangladesh/nation/349937/7-killed-as-microbus-carrying-wedding-party-falls,22-06-2024,22-06-2024, 2pm,9, 0," Amtali, Barguna", Bridge, No,Microbus-Auto-rickshaw,Barguna
48
+ Private car-human hauler collision leaves 2 dead in Tangail,https://www.dhakatribune.com/bangladesh/nation/349857/private-car-human-hauler-collision-leaves-2-dead,21-06-2024,21-06-2024, 9:30,2, 9," Malauri area, Tangail", opposite direction, no,Human hauler-Car,Tangail
49
+ "Two killed, 3 injured in Dhaka road crash",https://www.dhakatribune.com/bangladesh/349637/two-killed-3-injured-in-dhaka-road-crash,18-06-2024,18-06-2024, 1:30,2, 3," Bangabandhu International Conference Center, Dhaka", unknown, no,Car,Dhaka
50
+ "Truck driver killed in road accident in Banani, Dhaka",https://www.prothomalo.com/bangladesh/capital/3v26g4lhju,20-09-2024,19-09-2024,2 o'clock,1,1,Kakali area,side of the road,no,Truck,Sylhet
51
+ "Two passenger buses collide in Chittagong, 12 injured",https://www.prothomalo.com/bangladesh/district/yihg0a0vfh,20-09-2024,20-09-2024, 9 am,0, 2, C&B area of ​​Chittagong city, road, No,Bus-Bus,Chittagong
52
+ "Road accidents in 4 districts: 8 killed, 4 injured in a day",https://www.thedailystar.net/news/bangladesh/accidents-fires/news/road-accidents-4-districts-8-killed-4-injured-day-3707981,21-09-2024,21-09-2024, morning,2, 1, Dhanbari upazila, road, yes,Truck-Easy bike-CNG-run auto-rickshaw-Motorcycle-Tractor-Microbus,Tangail
53
+ 5 killed as pickup hits autorickshaw in Bagerhat,https://www.dhakatribune.com/bangladesh/nation/357791/4-killed-as-pickup-hits-autorickshaw-in-bagerhat,09-09-2024,09-09-2024, Monday morning,5, 0, Khulna-Bagerhat highway, Highway, No,Autorickshaw-Pickup van,Khulna
54
+ 18 killed as bus collides with milk tanker in India,https://www.dhakatribune.com/world/south-asia/351639/18-killed-as-bus-collides-with-milk-tanker-in,10-07-2024,10-07-2024, early on Wednesday,18, 19, Unnao district of Uttar Pradesh state, expressway, no,Bus-Milk Tanker,Foreign
55
+ Bus-covered van collision leaves 4 dead in Bogra,https://www.dhakatribune.com/bangladesh/nation/351483/bus-covered-van-collision-leaves-4-dead-in-bogra,09-07-2024,07-07-2024, 3:40am,4, 7, Bogra, filling station, no,Bus-Covered Van,Bogura
56
+ 8 killed in 2 accidents in Dinajpur,https://www.dhakatribune.com/bangladesh/nation/351127/5-including-child-killed-in-dinajpur-bus-truck,05-07-2024,05-07-2024, Friday morning,6, dozens," Panchbari, Dinajpur Sadar upazila", Regional Highway, No,Truck-Bus-Nasimon-Motorcycle,Dinajpur
57
+ "The driver pushed the pedestrian and dragged him for a kilometer, setting fire to the bus",https://www.prothomalo.com/bangladesh/district/kmiix37dyi,24-09-2024,24-09-2024, 21:00, 1, 1, Dhaka-Mymensingh highway, Highway, Yes,Bus,Gazipur
58
+ 2 killed in separate road accidents in the capital,https://www.prothomalo.com/bangladesh/capital/ejojakvowt,22-09-2024,22-09-2024, 12:15, 1, 1, Kajla in Jatrabari, road, yes,Truck-Truck,Dhaka
59
+ "Truck driver killed in road accident in Banani, Dhaka",https://www.prothomalo.com/bangladesh/capital/3v26g4lhju,20-09-2024,19-09-2024,2 o'clock,1,1,Banani,side of the road,no,Truck,Dhaka
60
+ The imam who was celebrated for 4 decades of imam died in a road accident while going to Makkah to perform Umrah.,https://www.prothomalo.com/bangladesh/district/e8qyyq6qat,20-09-2024,15-09-2024, 9:30 a.m., 1, 0," Makkah, Saudi Arabia", road, yes,Car,Foreign
61
+ Two traders killed in Jhenaidah road accident,https://www.thedailystar.net/news/bangladesh/accidents-fires/news/two-traders-killed-jhenaidah-road-accident-3711171,24-09-2024,24-09-2024, 4:50am, 2, 1, Jhenaidah's Sadar upazila, highway, no,Mini truck-Truck,Jhenaidah
62
+ "1 killed, 8 hurt as truck falls on 2 auto-rickshaws in Karnaphuli bridge area",https://www.thedailystar.net/news/bangladesh/accidents-fires/news/1-killed-8-hurt-truck-falls-2-auto-rickshaws-karnaphuli-bridge-area-3710716,24-09-2024,24-09-2024, 23:00, 1, 8, Karnaphuli Shah Amanat Bridge area, Bridge, No,Truck-CNG-run auto-rickshaws,Chattogram
63
+ "2 killed, 5 injured in bus-tractor collision in Rangpur",https://www.thedailystar.net/news/bangladesh/accidents-fires/news/2-killed-5-injured-bus-tractor-collision-rangpur-3709296,22-09-2024,22-09-2024, 8:30 PM, 2, 5," Mithapukur upazila, Rangpur", Highway, No,Bus-Tractor trolley,Rangpur
64
+ 5 killed as pickup hits autorickshaw in Bagerhat,https://www.dhakatribune.com/bangladesh/nation/357791/4-killed-as-pickup-hits-autorickshaw-in-bagerhat,09-09-2024,09-09-2024, Monday morning, 5, 0, Khulna-Bagerhat highway, Highway, No,Autorickshaw-Pickup van,Jessore
65
+ Four killed in Comilla crash,https://www.dhakatribune.com/bangladesh/nation/357461/four-killed-in-microbus-bus-collision-in-comilla,06-09-2024,06-09-2024, 7am, 4, 2, Dhaka-Chittagong highway, Highway, No,Microbus-Bus,Narayanganj
66
+ Four of a family killed in Sirajganj road accident,https://www.dhakatribune.com/bangladesh/nation/355248/four-of-a-family-killed-in-sirajganj-road-accident,19-08-2024,19-08-2024, 3:30, 4, 1, Hatikumrul-Banpara highway, Highway, No,Truck-Car,Sirajganj
67
+ 3 killed in Narail road accident,https://www.dhakatribune.com/bangladesh/nation/358046/3-dead-1-injured-in-narial-road-accident,11-09-2024,11-09-2024, midnight, 3, 1, Lohagara, highway, yes,Truck,Chattogram