Urbana Police Traffic Stops

Urbana Police traffic stop motivation information from 2012 to September 2018

Police Traffic Stops. Each record records the information about a driver who was stopped, as captured for the Illinois Department of Transportation (IDOT) Traffic Stop program. In addition to the fields captured for IDOT, these records include the incident code recorded in the stop. Data goes back to 2012, when IDOT began using the current reporting layout.

Examples

Basic Examples

Retrieve the resource:

In[1]:=
ResourceObject["Urbana Police Traffic Stops"]
Out[1]=

Retrieve the default content:

In[2]:=
ResourceData["Urbana Police Traffic Stops"]
Out[2]=

Plot the average age of drivers stopped in each year:

In[3]:=
DateListPlot[{{First[First[#]]["Year"]}, N[Mean[Last /@ #]]} & /@ Normal@(Values /@ GatherBy[
      ResourceData["Urbana Police Traffic Stops"][
        Select[#ResidencyCode == True && #CanineSearchConducted == True &]][
       All, {"TrafficDate", "AgeAtContact"}], #TrafficDate[
        "Year"] &]), PlotRange -> All]
Out[14]=

Create a PieChart of the races of stopped drivers:

In[15]:=
With[{data = Counts[ResourceData["Urbana Police Traffic Stops"][All, "RaceDescription"]]},
 PieChart[data, ChartLegends -> Normal@Keys@data]]
Out[15]=

Plot the number of stops with a one month moving average:

In[16]:=
Module[{data = ResourceData["Urbana Police Traffic Stops"], stops, means}, stops = TimeSeries[Normal[Tally[data[[All, "TrafficDate"]]]]]; means = MovingMap[Mean, stops, {1, "Month"}]; DateListPlot[{stops, means}, PlotRange -> All]]
Out[16]=

Generate a BarChart of traffic stops grouped by the day of the week:

In[17]:=
Module[{byday = SortBy[ Normal[
     Tally[DayName /@ ResourceData["Urbana Police Traffic Stops"][All, "TrafficDate"]]], Last]},
 BarChart[Last /@ byday, ChartLabels -> First /@ byday, ImageSize -> Large]]
Out[17]=

Wolfram Research, "Urbana Police Traffic Stops" from the Wolfram Data Repository (2018)  

Data Resource History

Source Metadata

Data Downloads

Publisher Information