4  Interactive graph

4.1 Context

Sometimes, cops decide to perform searches on drivers to ensure that the latter do not put public safety at risk in any way. Indeed, there might be a correlation between reckless driving and drug consumption, alcohol consumption and gun possession… Therefore it might be interesting to see in what type of situation a cop would think it is necessary to perform a search on a driver.

4.2 Interactive barplot

Number of stops per violation type

Type of violation

Source: https://d3-graph-gallery.com/graph/barplot_stacked_hover.html

We have plotted a bar chart that displays the count for each type of violation. It is possible to check the percentage of searched drivers by simply hovering the mouse over the different bars. Indeed, a tooltip will appear whenever the mouse is on top of a bar. It also displays the total count for a type of violation.

4.3 Interpretation

We notice that the type of violation that triggers the highest percentage of searches is “investigative_stop” with 12.3%. This seems coherent with the nature of this type of stop. Furthermore, child_restraint and seatbelt_violation come next with respectively 4.7% and 4.3%. This might be surprising as these violations might not seem too severe compared to safety_violation for instance. As a result, it may be difficult to understand how cops judge whether or not certain drivers are worthy of being searched or not. One hypothesis would have been to think that a safety_violation stop would trigger a higher percentage of searches but it does not seem to be the case.