Austin Crash Analytics

Thomas Montgomery
Open Austin
Published in
4 min readNov 17, 2017
A prototype of the DWI map done for San Antonio

The goal of Austin Crash Analytics is to use publicly available data to investigate and map crash patterns on a city or county level. This is performed by sourcing data from the TXDoT Crash Records Information System (CRIS) for the years 2010–2017, converting to GIS and pandas data types, and analyzing spatial and temporal patterns.

This project is interesting because it has the ability to positively affect the higher than average per capita rates of automobile crash deaths in Texas (1). Helping law enforcement, civic planners, lawmakers, and citizens better understand the patterns of automobile accidents can provide a valuable resource for these parties, as well as a framework for Vision Zero and other organizations actively working to reduce traffic deaths. By joining together and using cool methods like spatial analysis and machine learning, it is possible to provide an impactful web platform for sharing maps, figures, and stories on this problem in Austin.

Crash Records Information System (CRIS)

This database contains all crash data reported by local and state agencies that have occurred and is an important source of data. The database includes data such as contributing factors, coordinates, time of day, day of week, year of each crash, daily average traffic flows (for major roads), among others. Geographic data seems to be of high quality from the analysis that I have done so far, and can be attributed to individual streets and intersections. Unfortunately the records do not have mm/dd/yy values, presenting a challenge for a regression analysis.

Intersections give us a useful way to aggregate crash incidents on a county or city scale. Crashes often occur at intersections because these are the locations where two or more roads cross each other and activities such as turning left, crossing over, and turning right have the potential for conflicts resulting in crashes (2). Identifying intersections where a high volume of crashes occur for specific reasons can give civic planners clear problems to investigate and solve.

Geographic Information System (GIS)

Patterns can be drawn from the CRIS data by converting records to GIS points and aggregating spatially. This is also how the data can be applied to a web map for public consumption. So far I have been doing this by using the ESRI python arcpy site package (requires ArcGIS) and pandas for prep and analysis, with carto for web mapping, but I am open to other solutions. GIS can also be used to calculate mode (most common) day, year, and times for intersection crashes in any given area.

Example (Bexar Crash Map 2010–2017)

I have also used the python libraries pandas, matplotlib and scipy to plot trends on the county scale using CRIS data (3). This could be done for each intersection, but again the data granularity (mm/dd/yy missing) presents a challenge:

Future Forward with Machine Learning

The big idea or goal now is to apply machine learning to the crash data, by combining it with 311 data and whatever other public data makes sense to do some predictive analytics. This can be done using python libraries such as scikit-learn or tensorflow. CRIS crash data includes location, daily traffic volume(for major roads), time, and day, along with dozens of other variables which could be used along with intersections and 311 & crime data to train a neural network. This neural network could be used to predict the chance or probability of an accident occurring at any given intersection on a given time & day.

View an example method using Gaussian Process Classification:
http://scikit-learn.org/stable/auto_examples/plot_cv_predict.html#sphx-glr-auto-examples-plot-cv-predict-py

Prototypes

Dig into some current prototypes

Help Make this Work

Interested in helping make this work? Join the conversation by doing some of the following:

  1. Leave a comment or start discussion on this blog post
  2. Visit the original project idea on github
  3. Poke around the Github Repo for this project
  4. Say hello in the Slack channel for this project by joining the Open Austin’s Slack and going to the #p-dwi-insight channel

Sources

  1. https://cdan.nhtsa.gov/
  2. https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/811366
  3. https://github.com/tom-montgomery/Texas-DWI-Insights/tree/master/StatsImg

--

--