on my 3rd research question

i have having difficalty figuring out the best way to plot the data for this one
might have to use dataframes i havent learned yet
This commit is contained in:
tsmith37
2025-11-08 18:37:04 -05:00
parent ca517d7d43
commit ab6d2bea02
4 changed files with 1066 additions and 530 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,52 @@
State,number_drivers_fatal_billion_miles,percentage_drivers_fatal_speeding,percentage_drivers_fatal_alcohol_impaired,percentage_drivers_fatal_not_distracted,percentage_drivers_fatal_no_previous_accidents,car_insurance_premiums,region
Alabama,18.8,39,30,96,80,784.55,Southeast
Alaska,18.1,41,25,90,94,1053.48,West
Arizona,18.6,35,28,84,96,899.47,Southeast
Arkansas,22.4,18,26,94,95,827.34,Southeast
California,12,35,28,91,89,878.41,West
Colorado,13.6,37,28,79,95,835.5,West
Connecticut,10.8,46,36,87,82,1068.73,Northwest
Delaware,16.2,38,30,87,99,1137.87,Northwest
District of Columbia,5.9,34,27,100,100,1273.89,Northwest
Florida,17.9,21,29,92,94,1160.13,Southeast
Georgia,15.6,19,25,95,93,913.15,Southeast
Hawaii,17.5,54,41,82,87,861.18,West
Idaho,15.3,36,29,85,98,641.96,West
Illinois,12.8,36,34,94,96,803.11,Midwest
Indiana,14.5,25,29,95,95,710.46,Midwest
Iowa,15.7,17,25,97,87,649.06,Midwest
Kansas,17.8,27,24,77,85,780.45,Midwest
Kentucky,21.4,19,23,78,76,872.51,Southeast
Louisiana,20.5,35,33,73,98,1281.55,Southeast
Maine,15.1,38,30,87,84,661.88,Northeast
Maryland,12.5,34,32,71,99,1048.78,Northeast
Massachusetts,8.2,23,35,87,80,1011.14,Northeast
Michigan,14.1,24,28,95,77,1110.61,Midwest
Minnesota,9.6,23,29,88,88,777.18,Midwest
Mississippi,17.6,15,31,10,100,896.07,Southeast
Missouri,16.1,43,34,92,84,790.32,Midwest
Montana,21.4,39,44,84,85,816.21,West
Nebraska,14.9,13,35,93,90,732.28,Midwest
Nevada,14.7,37,32,95,99,1029.87,West
New Hampshire,11.6,35,30,87,83,746.54,Northeast
New Jersey,11.2,16,28,86,78,1301.52,Northeast
New Mexico,18.4,19,27,67,98,869.85,Southeast
New York,12.3,32,29,88,80,1234.31,Northeast
North Carolina,16.8,39,31,94,81,708.24,Southeast
North Dakota,23.9,23,42,99,86,688.75,Midwest
Ohio,14.1,28,34,99,82,697.73,Midwest
Oklahoma,19.9,32,29,92,94,881.51,Southeast
Oregon,12.8,33,26,67,90,804.71,West
Pennsylvania,18.2,50,31,96,88,905.99,Northeast
Rhode Island,11.1,34,38,92,79,1148.99,Northeast
South Carolina,23.9,38,41,96,81,858.97,Southeast
South Dakota,19.4,31,33,98,86,669.31,Midwest
Tennessee,19.5,21,29,82,81,767.91,Southeast
Texas,19.4,40,38,91,87,1004.75,Southeast
Utah,11.3,43,16,88,96,809.38,West
Vermont,13.6,30,30,96,95,716.2,Northeast
Virginia,12.7,19,27,87,88,768.95,Southeast
Washington,10.6,42,33,82,86,890.03,West
West Virginia,23.8,34,28,97,87,992.61,Southeast
Wisconsin,13.8,36,33,39,84,670.31,Midwest
Wyoming,17.4,42,32,81,90,791.14,West
1 State number_drivers_fatal_billion_miles percentage_drivers_fatal_speeding percentage_drivers_fatal_alcohol_impaired percentage_drivers_fatal_not_distracted percentage_drivers_fatal_no_previous_accidents car_insurance_premiums region
2 Alabama 18.8 39 30 96 80 784.55 Southeast
3 Alaska 18.1 41 25 90 94 1053.48 West
4 Arizona 18.6 35 28 84 96 899.47 Southeast
5 Arkansas 22.4 18 26 94 95 827.34 Southeast
6 California 12 35 28 91 89 878.41 West
7 Colorado 13.6 37 28 79 95 835.5 West
8 Connecticut 10.8 46 36 87 82 1068.73 Northwest
9 Delaware 16.2 38 30 87 99 1137.87 Northwest
10 District of Columbia 5.9 34 27 100 100 1273.89 Northwest
11 Florida 17.9 21 29 92 94 1160.13 Southeast
12 Georgia 15.6 19 25 95 93 913.15 Southeast
13 Hawaii 17.5 54 41 82 87 861.18 West
14 Idaho 15.3 36 29 85 98 641.96 West
15 Illinois 12.8 36 34 94 96 803.11 Midwest
16 Indiana 14.5 25 29 95 95 710.46 Midwest
17 Iowa 15.7 17 25 97 87 649.06 Midwest
18 Kansas 17.8 27 24 77 85 780.45 Midwest
19 Kentucky 21.4 19 23 78 76 872.51 Southeast
20 Louisiana 20.5 35 33 73 98 1281.55 Southeast
21 Maine 15.1 38 30 87 84 661.88 Northeast
22 Maryland 12.5 34 32 71 99 1048.78 Northeast
23 Massachusetts 8.2 23 35 87 80 1011.14 Northeast
24 Michigan 14.1 24 28 95 77 1110.61 Midwest
25 Minnesota 9.6 23 29 88 88 777.18 Midwest
26 Mississippi 17.6 15 31 10 100 896.07 Southeast
27 Missouri 16.1 43 34 92 84 790.32 Midwest
28 Montana 21.4 39 44 84 85 816.21 West
29 Nebraska 14.9 13 35 93 90 732.28 Midwest
30 Nevada 14.7 37 32 95 99 1029.87 West
31 New Hampshire 11.6 35 30 87 83 746.54 Northeast
32 New Jersey 11.2 16 28 86 78 1301.52 Northeast
33 New Mexico 18.4 19 27 67 98 869.85 Southeast
34 New York 12.3 32 29 88 80 1234.31 Northeast
35 North Carolina 16.8 39 31 94 81 708.24 Southeast
36 North Dakota 23.9 23 42 99 86 688.75 Midwest
37 Ohio 14.1 28 34 99 82 697.73 Midwest
38 Oklahoma 19.9 32 29 92 94 881.51 Southeast
39 Oregon 12.8 33 26 67 90 804.71 West
40 Pennsylvania 18.2 50 31 96 88 905.99 Northeast
41 Rhode Island 11.1 34 38 92 79 1148.99 Northeast
42 South Carolina 23.9 38 41 96 81 858.97 Southeast
43 South Dakota 19.4 31 33 98 86 669.31 Midwest
44 Tennessee 19.5 21 29 82 81 767.91 Southeast
45 Texas 19.4 40 38 91 87 1004.75 Southeast
46 Utah 11.3 43 16 88 96 809.38 West
47 Vermont 13.6 30 30 96 95 716.2 Northeast
48 Virginia 12.7 19 27 87 88 768.95 Southeast
49 Washington 10.6 42 33 82 86 890.03 West
50 West Virginia 23.8 34 28 97 87 992.61 Southeast
51 Wisconsin 13.8 36 33 39 84 670.31 Midwest
52 Wyoming 17.4 42 32 81 90 791.14 West

View File

@@ -1,52 +0,0 @@
State,Number of drivers involved in fatal collisions per billion miles,Percentage Of Drivers Involved In Fatal Collisions Who Were Speeding,Percentage Of Drivers Involved In Fatal Collisions Who Were Alcohol-Impaired,Percentage Of Drivers Involved In Fatal Collisions Who Were Not Distracted,Percentage Of Drivers Involved In Fatal Collisions Who Had Not Been Involved In Any Previous Accidents,Car Insurance Premiums ($),Losses incurred by insurance companies for collisions per insured driver ($)
Alabama,18.8,39,30,96,80,784.55,145.08
Alaska,18.1,41,25,90,94,1053.48,133.93
Arizona,18.6,35,28,84,96,899.47,110.35
Arkansas,22.4,18,26,94,95,827.34,142.39
California,12,35,28,91,89,878.41,165.63
Colorado,13.6,37,28,79,95,835.5,139.91
Connecticut,10.8,46,36,87,82,1068.73,167.02
Delaware,16.2,38,30,87,99,1137.87,151.48
District of Columbia,5.9,34,27,100,100,1273.89,136.05
Florida,17.9,21,29,92,94,1160.13,144.18
Georgia,15.6,19,25,95,93,913.15,142.8
Hawaii,17.5,54,41,82,87,861.18,120.92
Idaho,15.3,36,29,85,98,641.96,82.75
Illinois,12.8,36,34,94,96,803.11,139.15
Indiana,14.5,25,29,95,95,710.46,108.92
Iowa,15.7,17,25,97,87,649.06,114.47
Kansas,17.8,27,24,77,85,780.45,133.8
Kentucky,21.4,19,23,78,76,872.51,137.13
Louisiana,20.5,35,33,73,98,1281.55,194.78
Maine,15.1,38,30,87,84,661.88,96.57
Maryland,12.5,34,32,71,99,1048.78,192.7
Massachusetts,8.2,23,35,87,80,1011.14,135.63
Michigan,14.1,24,28,95,77,1110.61,152.26
Minnesota,9.6,23,29,88,88,777.18,133.35
Mississippi,17.6,15,31,10,100,896.07,155.77
Missouri,16.1,43,34,92,84,790.32,144.45
Montana,21.4,39,44,84,85,816.21,85.15
Nebraska,14.9,13,35,93,90,732.28,114.82
Nevada,14.7,37,32,95,99,1029.87,138.71
New Hampshire,11.6,35,30,87,83,746.54,120.21
New Jersey,11.2,16,28,86,78,1301.52,159.85
New Mexico,18.4,19,27,67,98,869.85,120.75
New York,12.3,32,29,88,80,1234.31,150.01
North Carolina,16.8,39,31,94,81,708.24,127.82
North Dakota,23.9,23,42,99,86,688.75,109.72
Ohio,14.1,28,34,99,82,697.73,133.52
Oklahoma,19.9,32,29,92,94,881.51,178.86
Oregon,12.8,33,26,67,90,804.71,104.61
Pennsylvania,18.2,50,31,96,88,905.99,153.86
Rhode Island,11.1,34,38,92,79,1148.99,148.58
South Carolina,23.9,38,41,96,81,858.97,116.29
South Dakota,19.4,31,33,98,86,669.31,96.87
Tennessee,19.5,21,29,82,81,767.91,155.57
Texas,19.4,40,38,91,87,1004.75,156.83
Utah,11.3,43,16,88,96,809.38,109.48
Vermont,13.6,30,30,96,95,716.2,109.61
Virginia,12.7,19,27,87,88,768.95,153.72
Washington,10.6,42,33,82,86,890.03,111.62
West Virginia,23.8,34,28,97,87,992.61,152.56
Wisconsin,13.8,36,33,39,84,670.31,106.62
Wyoming,17.4,42,32,81,90,791.14,122.04
1 State Number of drivers involved in fatal collisions per billion miles Percentage Of Drivers Involved In Fatal Collisions Who Were Speeding Percentage Of Drivers Involved In Fatal Collisions Who Were Alcohol-Impaired Percentage Of Drivers Involved In Fatal Collisions Who Were Not Distracted Percentage Of Drivers Involved In Fatal Collisions Who Had Not Been Involved In Any Previous Accidents Car Insurance Premiums ($) Losses incurred by insurance companies for collisions per insured driver ($)
2 Alabama 18.8 39 30 96 80 784.55 145.08
3 Alaska 18.1 41 25 90 94 1053.48 133.93
4 Arizona 18.6 35 28 84 96 899.47 110.35
5 Arkansas 22.4 18 26 94 95 827.34 142.39
6 California 12 35 28 91 89 878.41 165.63
7 Colorado 13.6 37 28 79 95 835.5 139.91
8 Connecticut 10.8 46 36 87 82 1068.73 167.02
9 Delaware 16.2 38 30 87 99 1137.87 151.48
10 District of Columbia 5.9 34 27 100 100 1273.89 136.05
11 Florida 17.9 21 29 92 94 1160.13 144.18
12 Georgia 15.6 19 25 95 93 913.15 142.8
13 Hawaii 17.5 54 41 82 87 861.18 120.92
14 Idaho 15.3 36 29 85 98 641.96 82.75
15 Illinois 12.8 36 34 94 96 803.11 139.15
16 Indiana 14.5 25 29 95 95 710.46 108.92
17 Iowa 15.7 17 25 97 87 649.06 114.47
18 Kansas 17.8 27 24 77 85 780.45 133.8
19 Kentucky 21.4 19 23 78 76 872.51 137.13
20 Louisiana 20.5 35 33 73 98 1281.55 194.78
21 Maine 15.1 38 30 87 84 661.88 96.57
22 Maryland 12.5 34 32 71 99 1048.78 192.7
23 Massachusetts 8.2 23 35 87 80 1011.14 135.63
24 Michigan 14.1 24 28 95 77 1110.61 152.26
25 Minnesota 9.6 23 29 88 88 777.18 133.35
26 Mississippi 17.6 15 31 10 100 896.07 155.77
27 Missouri 16.1 43 34 92 84 790.32 144.45
28 Montana 21.4 39 44 84 85 816.21 85.15
29 Nebraska 14.9 13 35 93 90 732.28 114.82
30 Nevada 14.7 37 32 95 99 1029.87 138.71
31 New Hampshire 11.6 35 30 87 83 746.54 120.21
32 New Jersey 11.2 16 28 86 78 1301.52 159.85
33 New Mexico 18.4 19 27 67 98 869.85 120.75
34 New York 12.3 32 29 88 80 1234.31 150.01
35 North Carolina 16.8 39 31 94 81 708.24 127.82
36 North Dakota 23.9 23 42 99 86 688.75 109.72
37 Ohio 14.1 28 34 99 82 697.73 133.52
38 Oklahoma 19.9 32 29 92 94 881.51 178.86
39 Oregon 12.8 33 26 67 90 804.71 104.61
40 Pennsylvania 18.2 50 31 96 88 905.99 153.86
41 Rhode Island 11.1 34 38 92 79 1148.99 148.58
42 South Carolina 23.9 38 41 96 81 858.97 116.29
43 South Dakota 19.4 31 33 98 86 669.31 96.87
44 Tennessee 19.5 21 29 82 81 767.91 155.57
45 Texas 19.4 40 38 91 87 1004.75 156.83
46 Utah 11.3 43 16 88 96 809.38 109.48
47 Vermont 13.6 30 30 96 95 716.2 109.61
48 Virginia 12.7 19 27 87 88 768.95 153.72
49 Washington 10.6 42 33 82 86 890.03 111.62
50 West Virginia 23.8 34 28 97 87 992.61 152.56
51 Wisconsin 13.8 36 33 39 84 670.31 106.62
52 Wyoming 17.4 42 32 81 90 791.14 122.04