accidents | R Documentation |
Road accidents and their causes are of particular importance to road safety experts looking to prevent them.
accidents
A tibble with 768 rows and 31 variables:
Accident ID
Easting of accident location
Northing of accident location
Longitude of accident location
Latitude of accident location
Police force
Accident severity: Fatal, Serious, Slight
Number of vehicles involved in accident
Number of people injured in the accident
Date of the accident
Day of the week of the accident
Time of the accident on the 24h clock
Local authority district
Local authority highway
Class of 1st road involved in accident: Motorway, A(M) road (A-road with motorway restrictions), A-road, B-road, C-road, Unclassified
ID of 1st road (0 if unclassified)
Type of road: Roundabout, One way street, Dual carriageway, Single carriageway, Slip road
Speed limit on the road in mph
Detail on junction where accident occurred: Crossroads, Mini-roundabout, More than 4 arms, Not within 20 meters of junction, Other junction, Private drive or entrance, Roundabout, Slip road, T or staggered junction
How junction was controlled: authorized person, Auto traffic signal, Give way or uncontrolled, Missing / Out of range, Stop sign
Class of 2st road involved in accident: A-road, B-road, C-road, Missing / Out of range, Motorway, Unclassified
ID of 2nd road (0 if unclassified)
Level of human control at a pedestrian crossing: Control by other authorized person, Control by school crossing patrol, None within 50 meters
Level of facilities controlling a pedestrian crossing: Central refuge, No physical crossing facilities within 50 meters, Non-junction crossing (pelican, puffin, toucan or similar light crossing), Pedestrian phase at traffic signal junction, Zebra crossing
Light condition at the time of accident: Daylight, Darkness - lights lit, Darkness - lights unlit, Darkness - no lighting, Darkness - lighting unknown
Weather condition at the time of accident: Fine + no high winds, Raining + no high winds, Snowing + no high winds, Fine + high winds, Raining + high winds, Snowing + high winds, Fog or mist, Other, Unknown
Road surface conditions at the time of the accident: Dry, Wet or damp, Snow, Frost or ice, Flood over 3cm deep
Special condition at the site of the accident: None, Road sign or marking defective or obscured, Roadworks, Road surface defective
Carriageway hazards: None, Other object on road, Previous accident, Pedestrian in carriageway - not injured
Type of area the accident occurred in: 1 - urban, 2 - rural
Did police officer attend the scene of the accident: No, No + accident self reported (using a self completion form), Yes
The data come from the UK Government at roadtraffic.dft.gov.uk. It's been modified to better serve the goals of introductory data science education.
https://roadtraffic.dft.gov.uk/custom-downloads/road-accidents
library(ggplot2)
ggplot(accidents, aes(x = speed_limit)) +
geom_bar()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.