Filtering Crash Data


Having identified a dataset, you would like to work with does not mean you have to download the entire dataset. An important capability of the MassDOT Crash Open Data Portal is the ability to filter the dataset prior to downloading. To filter the data:

 

1. Search for Crash Data and select a dataset of interest.

2. Click on the "Data" tab.

 

 

3. Click on the filter icon in the header of the field that you would like to filter on.

 

4. The field will be added to the top of the grid and, if available, the unique values will be provided for filtering on.  To configure your filter, click on the blue drop-down arrow next to the field and select your filter values. Once selected the filter will be applied and, when complete, your record count will update.

 

Filtering Tips


 

üDepending on the data type you may be presented with a text entry box, a date picker, or a drop down multi-select list.

 


 

üTo remove a filter simply click on the "x" in the filter listing.


 

üTo filter on a time-based field (e.g. Crash Time) you must enter a fully qualified time with leading 0's if necessary.  For example, entering "1:00 AM" will match Crash Times of "1:00 AM" and "11:00 AM".  To get just Crash Times of "1:00 AM" you must enter "01:00 AM". You must also enter AM and/or PM accordingly. Alternatively, you can download the full dataset and do more complex and robust filtering using basic office automation tools such as a spreadsheet. Alternatively, you can use crash hour to filter for specific crash hour ranges.

 


 

üIf a field has more than 24 unique values the filter capability will show a text entry box. In this case you must know the value you are trying to search for. If, however, there are less than 24 unique values in the field a mutli-select listing with check boxes will be provided for rapid selection of the unique value(s) of choice.

 


 

üAll filters are processed as "like" searches.  Meaning, the filter is executed using the field name, the operator "like", and the provided value.  For example, filtering with "west" would be applied as: "Get all values where City Town Name like 'west'". The results would include Westwood, Westford, West Springfield, Weston, etc.... This can be helpful but also prevent specific searches. For example, if you want to search for a Weather Condition of just "Snow" you will be unable to.  It will return "Snow" as well as "Clear/Blowing sand, snow", "Snow/Cloudy", "Snow/Sleet", etc. To search only for "Snow" you will have to download the dataset and use a back-office tool.

 


 

üIn the drop down multi-select lists the number of features represented by a unique value are presented in the ellipses. These values represent the number of features with the given value across the entire dataset regardless if you have already applied a filter.  For example, in the image below the data set is filtered for Crash Severity = Fatal injury resulting in 338 total records.  Adding the Crash Hour filter, you will note that for the value "05:00PM to 05:59PM" it notes 9,552 in the ellipses.  That value represents the total number of features with that Crash Hour across the entire, unfiltered dataset.

 


 

üSome longer mutli-select listing with check boxes can get cut off in the browser.  To work around this simply select a single value in the list. Collapse the list and then re-open it. The list should then expand to accommodate all the listings and allow the entire list to be visible on your screen.

 


 

üUnfortunately, you cannot filter for "null" values.  You will need to download the dataset and use a back-office tool to do that.

 


 

üFiltering can sometimes result in an error message. If you receive the notice: "An error occurred fetching data" you will need to clear your filter and re-create it.

 

 


 

 

 

 


Data Extraction > Open Data Portal >