Visualising UK Road Traffic Accidents Data with Tableau
By: Zhe Chyuan Yeap
Tags: Tableau, Data Science, Data Analysis, Charts, Data Visualization

Visualising the Dataset

Actionable insights can be extracted from visualisation. To provide an overview on how visualisation can aid in decision making, a total of nine example queries were listed in this section. Each query started with the choice of visualisation idiom used and its rationale, followed by analysis and interpretation of the result.

1) Which month had the highest number of traffic accidents in the UK?

Stacked bar chart was used. There are three reasons for using stacked bar chart. Firstly, total number of accidents occurred in each month can be shown and compared. Secondly, general trend of traffic accidents across months can be visualised. Finally, total number of accidents happened in each month can be further separated into 3 severity categories, and hence illustrates their part-to-whole relationship.

Figure 1. Stacked bar chart of the number of accidents for each month in the UK in 2014.

As shown in Figure 1, October month accounted for the highest number of road traffic accidents recorded in the UK in 2014, followed by November and July. On the other hand, the two lowest number of accidents reported were in February and April. In the UK, both October and November are in autumn, while April is in spring. Meanwhile, February marks the end of winter or in other words, the transition to spring. Therefore, seasonality may be one of the factors which causes traffic accidents. Besides, accidents with slight severity were the most commonly reported.

2) Which month had the highest number of fatal and serious traffic accidents in the UK?

Meanwhile, by applying filter on chart shown in Figure 1, accidents which were classified as fatal and serious can be visualised.

Figure 2. Stacked bar chart of the number of serious and fatal accidents for each month in the UK in 2014.

However, noted that one of the goals of highway operators and Public Works Department is to reduce the severity of injuries resulted from the traffic accidents, if they are unavoidable. Hence, Figure 2 is more relevant, rather than Figure 1, as the presence of accidents of slight severity occupies a large portion of each bar in Figure 1.

Meanwhile, Figure 2 reveals a different pattern than Figure 1. July topped the month of having the most serious and fatal accidents reported in the UK in 2014, followed by June and October. As both June and July are in summer, traffic accidents may be seasonal. Likewise, in the case for fatal accidents, December had the highest number of incidents reported.

3) Find the days of the week and hours of time with the highest number of accidents.

Heatmap was well suited to visualise the required information, as it can provide a general overview to users while using a relatively small space. These tasks required 168 values to be presented, as a result of combination of levels of two categorical attributes. Axes of the heatmap were represented by two categorical attributes, which were day of week and time in hour. There are 7 days in a week and 24 hours in a day. Besides, these 168 values were quantitative and encoded with colour to visualise the range.

Figure 3. Heatmap of the number of accidents across all day of the week and hour of time in 2014.

Figure 3 revealed some interesting patterns with two distinct clusters showing the day and time when most accidents occur. They comprise the day starting from Monday till Friday. The first cluster coincided with the morning rush hour, where it was between 7 a.m. and 8 a.m. The second cluster coincided with the evening rush hour, where it started as early as 3 p.m. until 6 p.m. Rush hour is when most people commute to and from work or school. During these periods, number of cars on the road increased substantially and hence it may be a factor which causes traffic accidents. Besides that, accidents were most likely to occur on Friday, as it had more cells coloured in darker red on average.

4) Find the days of the week and hours of time with the highest number of fatal accidents.

Similarly, heatmap was used to answer this query. The sole difference between query 3 and 4 was that an extra step of filtering was applied on this query to illustrate accidents which were categorised as fatal only.

Figure 4. Heatmap of the number of fatal accidents across all day of the week and hour of time in 2014.

By selecting only fatal accident via filtering, Saturday had the higher number of fatal accidents recorded in the UK in 2014, on average. Besides, fatal accidents on Saturday usually occurred around 11 a.m., 4 p.m., 7 p.m. Meanwhile, Sunday morning, which was between 12 a.m. and 2 a.m. had high count of fatal accidents as well. It may be mainly attributable to driving under the influence of alcohol resulted from late night drinking. Other slot which showed high number of fatal accidents include Sunday’s 4 p.m. and Thursday’s 3 p.m. They coincided with the UK’s evening rush hour.

5) Where are the accident hotspots in the UK?

Dot distribution map was used to show the distribution of accidents occurred in the UK, London and Central London. It was suitable for this question as longitude and latitude of every recorded traffic accident were readily available on the dataset. By using map, clusters and spatial distribution of accident hotspots can be visualised clearly. Besides, highway operators and Public Works Department personnel are well verse with road networks in the UK. It is an easy task for them to quickly identify specific road or junction based on its unique shape and geographical location.

On the map, each point symbolised a recorded traffic accident, whereas size of each point represented the category of number of casualties (0 to 5, 6 to 10, and more than 10). Three sizes were used, i.e. small, medium and large, to represent the three stated categories respectively. Meanwhile, each point was encoded with colour hue, with yellow, orange and red to represent accident severity of slight, serious and fatal respectively.

Figure 5. Dot distribution map of accident hotspots in the UK in 2014.

As shown in Figure 5, large cities such as London, Birmingham, Nottingham, Manchester, Liverpool, Leeds and Sunderland in the UK are areas which have a higher density of accident and deeper colour as compared to other parts of the UK. In other words, they are accident hotspots. This observation can be partly explained by higher number of cars and denser road networks found in these cities. Besides, study conducted by stated that locations of road accidents in the UK were not random and were highly concentrated in urban areas.

6) What is the distribution of the accident across different hours in a day in London?

In Tableau, a dashboard was created, where dot distribution map and stacked bar chart are shown side by side (Figure 6). This enables direct comparison between two views, without switching between tabs. An area can be selected on dot distribution map to highlight region of interest, i.e. London, and its corresponding time occurrence will be shown on the stacked bar chart.

Figure 6. Dot distribution map and stacked bar chart of number of accidents by severity in London in 2014.

The circle region in dot distribution map in Figure 6 encompasses traffic accidents occurred in London in 2014, while the stacked bar chart shows the time distribution of accidents by severity. In London, two notable peaks are seen in the stacked bar chart. The first peak represents the time between 8 a.m. and 9 a.m., whereas the second peak was the time between 6 p.m. and 7 p.m. They coincide with both morning and evening rush hours. The number of accidents reported increased since 4 a.m. in the morning and reached its first peak, followed by a sharp decline. It then increased gradually to reach its second peak, before it fell sharply after 7 p.m. Besides, severity level of most accidents happened in London were slight.

7) Where are the accident hotspots in Central London?

Figure 7. Dot distribution map of accident hotspots in Central London in 2014.

Figure 7 shows that most major roads in London had accidents in 2014 and areas highlighted in red oval are the four streets which recorded higher number of accidents. They are Clerkenwell Road, Piccadilly Circus, Holborn and Bond Street. Clerkenwell Road is the central portion of an intended cross-capital arterial road, linking West End and East End of London. Piccadilly Circus, a prominent landmark in London, is located at the junction of five busy streets. Besides, Holborn is an office-dominated street while Bond Street is a famous shopping district, offering high end fashion brands, luxury goods, fine jewels, art and antiques. As such, movement of passengers and vehicles can be considerable large in volume.

8) What were the factors of traffic accidents in the UK?

Packed bubble chart was used to show the distribution of each categorical attributes, i.e. carriageway hazard, special condition, pedestrian crossing — human control, pedestrian crossing — physical facilities, road type, road surface, weather and light condition. Size of bubble encoded the number of accidents happened due to the particular category for the respective factor. This is intuitive as larger size is often associated with higher value.

Figure 8. Packed bubbles chart of four factors of accident happened in the UK in 2014.

Figure 9. Packed bubbles chart of four factors of accident happened in the UK in 2014.

Based on Figure 8, none hazard in carriageway (98%), no special condition on road (98%) and no human control at pedestrian crossing area within 50 meters (99%) contributed a majority for the respective factors of accident happened in the UK in 2014. Thus, it can be concluded that they were not factors which led to occurrence of traffic accidents.

On the other hand, 81% of accidents happened in fine weather without high winds, while only 12% of accidents happened during raining. This may be correlated to the road surface factor, which 70% of accidents occurred in dry surface, whereas 29% happened in wet or damp surface. Besides, three quarters of total accidents occurred at single carriageway. Meanwhile, about 74% of accidents happened on daylight with the presence of street light. Generally, it can be viewed that most accidents occurred at fine condition, i.e. daylight, without strong winds or dry road surface. However, it cannot be ascertained yet as they were assessed at each factor independently.

9) What were the common external conditions for accidents to occur in the UK?

Treemap was used to show the distribution of combinations of external conditions. External conditions considered in this study were pedestrian crossing — physical facilities, road type, road surface, weather and light condition. Each block represented an output from the permutation of these five external conditions. Besides, each block was assigned with the number of accidents occurred under these conditions. They were encoded with size and colour. The larger the size and the darker the colour, the higher the number of accidents. Hence, by using treemap, the largest block when most accidents occurred in the UK can be immediately identified.

Figure 10. Treemap of factors of accident happened in the UK in 2014 (overview)

Figure 10 illustrates that block with the largest size and the darkest red colour has the highest accident numbers. About one third of accidents occurred in the UK in 2014 happened at single carriageway, daylight with the presence of street light, dry road surface, fine weather without high winds and no physical crossing within 50 meters. Thus, it can be concluded that one third of accidents happened under acceptable external condition. In other words, the cause may be resulted from number of cars on the road and drivers’ attitudes.