Explore space-time patterns

Florida's interstates are among the deadliest in the United States. Brevard County, located near Orlando and home to more than 600,000 people, has had an increasing number of traffic accidents in recent years. Determining the county's most dangerous roads is the first step toward actionable policies that can prevent more accidents.

First, you'll download car crash data for the years 2010 to 2015 in Brevard County. Then, you'll visualize trends in crashes over space and time and become familiar with data for the analysis you'll perform later.

Download the data

The crash data is part of an ArcGIS Pro project package that also includes road data and models you'll use throughout the tutorial.

  1. Download the Crash_Analysis zipped folder.
  2. Extract the Crash_Analysis zipped folder to a location on your computer that you can easily remember, such as your Documents folder.

    The folder contains an ArcGIS Pro project package (.ppkx) and a network spatial weights matrix file (.swm). The spatial weights matrix file quantifies road network connections. You'll use it later in the tutorial.

  3. Double-click CrashAnalysisPkg.ppkx to open it. If prompted, sign in using your licensed ArcGIS account.
    Note:

    If you don't have access to ArcGIS Pro or an ArcGIS organizational account, see options for software access.

    The project opens in ArcGIS Pro. It includes a map showing the locations of crashes in Brevard County, Florida between 2010 and 2015.

    Default map showing car crashes in Brevard County from 2010 to 2015

    The Contents pane contains two layers: All Crashes (2010 to 2015) and Roads. You'll explore the crash data's attributes to learn more about it.

  4. In the Contents pane, right-click All Crashes (2010 to 2015) and choose Attribute Table.

    Attribute Table option for the All Crashes (2010 to 2015) layer

    The attribute table appears containing several fields. Many of these fields include more information about each crash, such as the date, time, age of the driver, number of fatalities, and so on.

    Some fields, such as Number of fatalities and Unbelted injuries, are numeric counts. Other fields, such as Alcohol was involved and Driver distraction, use the text-based code of Y for Yes or N for No. For some cells, the value may read <Null>, which means the true value is unknown or unavailable.

  5. Double-click the Crash Date field name.

    Crash Date field name in the attribute table

    The dates are sorted from oldest to most recent. The earliest crash date in this dataset is January 1, 2010.

  6. Double-click the Crash Date field name again.

    The dates are sorted from most recent to oldest. The most recent date is December 31, 2015. You'll use this date field to perform temporal analysis on the data.

  7. Close the table.

Aggregate the crashes

Next, you'll perform an exploratory analysis of the crashes to get a basic idea of the countywide trends. You'll start by aggregating the crashes into a space-time cube. A space-time cube is a way of formatting data that has both a spatial and temporal component. It's called a cube because it has three dimensions: two to display the data on a 2D map, and a third to represent time.

  1. On the ribbon, click the Analysis tab. In the Geoprocessing group, click Tools.

    Tools button

    The Geoprocessing pane appears.

  2. In the Geoprocessing pane, search for Create Space Time Cube By Aggregating Points. In the list of search results, click the Create Space Time Cube By Aggregating Points tool.

    Create Space Time Cube By Aggregating Points tool in the search results

    Tip:

    You can also search for geoprocessing tools using the Command Search bar on the ribbon.

  3. For Input Features, choose All Crashes (2010 to 2015). For Output Space Time Cube, type All_Crashes.nc.
    Note:

    The output space-time cube uses the network Common Data Form (netCDF) file format, which has the .nc file extension. It is saved in a folder, not a file geodatabase. To access the space-time cube later, you'll need to browse to its folder location, so take note of the path after you type the output name.

  4. For Time Field, choose Crash Date.

    Next, you'll choose the interval to aggregate the temporal data. Your data covers a span of 6 years, or 72 months. An interval of 4 months, or 16 weeks, should aggregate the data into groups that have neither too many nor too few crashes for proper analysis.

  5. For Time Step Interval, type 16 and choose Weeks.

    To aggregate the spatial data, you'll use a hexagon grid with each hexagon being 2 miles wide.

    You could spend time experimenting to choose the perfect spatial and temporal intervals for aggregation, but since you're only performing exploratory analysis, these parameters are fine.

  6. For Aggregation Shape Type, choose Hexagon grid. For Distance Interval, type 2 and choose US Survey Miles.

    Parameters for the Create Space Time Cube By Aggregating Points tool

  7. Click Run.

    The tool runs. After a few moments, the space-time cube is created. It overlays the crash points with a hexagon grid and counts the number of points in each hexagon. Additionally, for each hexagon, it aggregates the data in intervals of sixteen weeks. The space-time cube does not appear on the map or in the Contents pane.

  8. At the bottom of the Geoprocessing pane, on the progress bar, click View Details.

    The View Details button on the progress bar

    A window appears with more information about the analysis. The window has three tabs: Parameters, Environments, and Messages.

  9. If necessary, click the Messages tab.

    The text on this tab lists the space-time cube formatting, the number of time step intervals, the extent of each hexagon grid cell, and information about how many hexagon cells contain zeros. The description indicates the number of crashes is increasing over time.

    Message explaining that there is a statistically significant increase in point counts over time

  10. Close the window.

Create hot spots

Next, you'll analyze the space-time cube using the Emerging Hot Spot Analysis tool. Hot spot analysis identifies statistically significant spatial clusters of high and low values (in this case, the number of crashes in each hexagon bin). Emerging hot spot analysis requires a space-time cube and also identifies where temporal trends in clustering are occurring.

Because car crashes have an element of random chance to them, it's important to find statistically significant clusters instead of only looking at crash density. Statistical significance indicates that something, such as poor visibility or bad signage, is causing a particularly large number of crashes in an area, which means there is a higher possibility of preventing future crashes through policy.

  1. In the Geoprocessing pane, click the Back button.

    Back button

  2. Search for and open the Emerging Hot Spot Analysis tool.

    You'll run this tool based on the count of crashes in the space-time cube.

  3. For Input Space Time Cube, click the Browse button.

    Browse button

    The Input Space Time Cube window appears. By default, it browses to your project folder.

  4. In the Input Space Time Cube window, double-click the commondata folder. Select All_Crashes.nc and click OK.
    Note:

    If you didn't use the default output location when creating your space-time cube, it may be saved in a different location.

    The space-time cube is added to the parameter. Next, you'll choose the variable for the hot spot analysis. There is only one option, the count of crashes.

  5. For Analysis Variable, choose COUNT.
  6. For Output Features, delete the text and type Crash_Trends.

    For this exploratory analysis, you won't change any of the other parameters.

    Parameters for the Emerging Hot Spot Analysis tool

  7. Click Run.

    The tool runs and the result layer is added to the map and the Contents pane.

    Note:

    When the tool finishes, the progress bar may display a warning message. The warning message is informational only. It tells you the value of the default Neighborhood Distance used for the analysis.

  8. In the Contents pane, uncheck All Crashes (2010 to 2015) and Roads.

    Map showing emerging hot spots

    Each hexagon bin created by your space-time cube is symbolized based on whether it is a hot spot, a cold spot, or neither. The Contents pane lists what each symbol represents.

    The tool help lists the definition of each type of symbol.

  9. In the Geoprocessing pane, on the progress bar, click View Details.
  10. On the Messages tab, scroll down to the Summary of Results heading.

    The summary shows the number of hot and cold spots in each category. There are 2 new hot spots, 17 consecutive hot spots, 59 sporadic hot spots, and 13 oscillating hot spots.

    The most common category by far, sporadic hot spot, is a location that has been a hot spot for fewer than 90 percent of the time intervals. The location has never been a cold spot during any of its intervals. In short, there is sometimes a statistically significant cluster of crashes in these areas, but not all the time.

  11. Close the window. On the Quick Access Toolbar, click the Save Project button.

    Save Project button

    Note:

    A message may appear warning you that saving this project file with the current ArcGIS Pro version will prevent you from opening it again in an earlier version. If you see this message, click Yes to proceed.

You've created a space-time cube and performed exploratory hot spot analysis of the data. Visualizing the space-time cube in 3D would allow you to explore the temporal trends further, but you'll create a 3D visualization later in the workflow. You can explore the 3D visualization in the story associated with the tutorial.

Are you done? No. In fact, you're just getting started. There are some significant problems with your exploratory analysis of traffic accident trends:

  • The spatial analysis used to assess hot and cold spot areas is based on Euclidean distance between hexagon bins, rather than the actual road network.
  • The analysis doesn't consider important temporal cycles such as workweek rush hours.

Next, you'll refine your analysis to address these problems.


Identify hot spots on the road network

The analysis you performed gave you a general idea of the county's crash trends. However, the analysis did not account for the road network, which is where crashes occur. Two crashes separated by a river or highway might be close in terms of Euclidean distance, but far away on a road network with few bridges or underpasses. Because hot spot analysis looks for high crash rates that cluster close together, accurate distance measurements based on the road network are essential.

To improve your analysis, you'll associate each crash with the road network and perform hot spot analysis on the results. You'll also compare hot spots for all vehicle crashes to hot spots for fatal crashes, because fatal crashes may be the higher priority for prevention.

Associate crashes with roads

Although crashes occur on roads, your crash points may not align exactly with the road polylines. You'll run a tool to snap the points to the nearest road to ensure closer alignment. Then, you'll join the crashes and roads into a single layer.

Because snapping is an editing tool that modifies your input layer instead of creating a new output, you'll first create a copy of the crash data. It's always a good idea to copy your data before editing its feature geometry, in case you make a mistake or need to refer to the original dataset.

  1. In the Geoprocessing pane, click the Back button. Search for and open the Copy Features tool.
  2. For Input Features, choose All Crashes (2010 to 2015). For Output Feature Class, delete the text and type All_Crashes_Copy.

    Parameters for the Copy Features tool

  3. Click Run.

    The tool runs and a copy of the original dataset is created. You'll use this copy for your analysis.

  4. In the Contents pane, uncheck Crash_Trends and check Roads.
    Note:

    The Roads feature class was derived from United States Census TIGER polylines. Processing the polylines to prepare them for analysis involved creating 40-meter intersection features and 100-meter road segment features. If you're interested in the workflow details, contact LGriffin@esri.com.

    Next, you'll snap the copied crash points to the roads.

  5. In the Geoprocessing pane, click the Back button. Search for and open the Snap tool.
  6. For Input Features, choose All_Crashes_Copy.

    For the snapping parameters, you want the crash points to snap to the nearest edge of a road feature. You'll set the snapping distance so that features will only snap to roads within a quarter of a mile.

    Tip:

    To determine how far crash points are from road polylines, you can use the Near tool. With the Imagery basemap, you can then examine the points farthest from roads and determine an appropriate distance for snapping. This method is how the 0.25-mile distance was determined for this tutorial.

  7. For Snap Environment, set the following parameters:
    • For Features, choose Roads.
    • For Type, choose Edge.
    • For Distance, type 0.25 and choose US Survey Miles.

    Parameters for the Snap tool

  8. Click Run.
    Note:

    Due to the large number of points, the tool may take a few minutes to run.

    Once the tool finishes, no output layer is created, and the map doesn't appear to change. However, the crash points have been moved to align more closely with roads. Now that crashes and roads are aligned, you'll create a spatial join to combine the two layers into one in which each road feature includes a count of crashes that occurred there.

  9. In the Geoprocessing pane, search for and open the Spatial Join tool.
  10. In the Spatial Join tool pane, set the following parameters:
    • For Target Features, choose Roads.
    • For Join Features, choose All_Crashes_Copy.
    • For Output Feature Class, delete the text and type Road_Crash_Counts.

    You'll set a search radius, which is the distance two features need to be from each other to be joined. Because you snapped the crashes to the roads, you'll use a small search radius.

  11. For Search Radius, type 1 and confirm that US Survey Feet is chosen.

    Parameters for the Spatial Join tool

    Before you run the tool, you'll choose the attribute fields that will be included in the output layer. You won't need most of the attributes from the join features, but you'll keep the fields that contain a unique ID for each crash and the number of fatalities, because you plan to analyze fatalities later.

  12. Expand Fields.
  13. Under Output Fields, point to the Shape_Length field and click the Remove button.

    Remove button

    The field is removed.

  14. Remove all fields from the Output Fields list except the UniqID and the Fatalities fields.

    List of output fields with only UniqID and Fatalities

    You'll also adjust the Fatalities field so that when the join occurs, the sum total of fatalities for each road feature is calculated.

  15. Point to the Fatalities field and click the Edit Field Properties button.

    Edit Field Properties button

    The Field Properties window appears.

  16. In the Field Properties window, for Actions and Source Fields, choose Sum.

    Sum option

  17. Click OK. In the Geoprocessing pane, click Run.

    The tool runs and the joined layer is added to the map and the Contents pane. The layer looks similar to the Roads layer, but contains crash information.

Analyze the joined data

Not all roads or road segments are the same length, so longer roads will tend to have more crashes. You'll calculate an attribute field to standardize the crash counts by computing the crash rate per mile, per year.

  1. In the Geoprocessing pane, search for and open the Calculate Field tool.
  2. For Input Table, choose Road_Crash_Counts.
  3. For Field Name, type Crash_Rate. For Field Type, choose Double (64-bit floating point).

    Parameters for the Calculate Field tool

    For the expression that will calculate the new field, you'll divide the count of crashes in each road feature (the Join_Count field) by the number of years the dataset covers (6) multiplied by the length of the road. This expression will find the number of crashes per mile, per year.

  4. For Expression, create or copy and paste the following expression:

    !Join_Count! / (6 * !Shape_Length!)

    Expression for the Calculate Field tool

  5. Click Run.

    The crash rate field is calculated and added to the attribute table of the Road_Crash_Counts layer. Next, you'll run hot spot analysis on the layer using the new field. Last time, you used a space-time cube to perform emerging hot spot analysis, but for now you're only focused on spatial trends, so you'll use a different hot spot analysis tool.

  6. In the Geoprocessing pane, search for and open the Hot Spot Analysis (Getis-Ord Gi*) tool.
  7. For Input Feature Class, choose Road_Crash_Counts. For Input Field, choose Crash_Rate.
  8. For Output Feature Class, delete the text and type Road_Crash_Hot_Spots.

    Hot spot analysis integrates spatial relationships directly into its mathematics. These relationships are defined formally through values called spatial weights. Spatial weights are organized into a spatial weights matrix and stored as a spatial weights matrix file (.swm). You downloaded a spatial weights matrix file at the beginning of the tutorial, along with the project package. This file defines how connected and how close each crash rate is to all other crash rates so that the tool can identify spatial clusters of high rates.

    Note:

    The spatial weights matrix file used in this tutorial was created using the Generate Network Spatial Weights tool and a street network built from Brevard County road polylines. To keep the crash hot spots local, the Impedance Distance Cutoff parameter was set to 360 feet (about the length of a football field), which is the minimum stopping sight distance for a vehicle traveling 45 mph.

  9. For Conceptualization of Spatial Relationships, choose Get spatial weights from file.
  10. For Weights Matrix File, browse to the extracted Crash Analysis folder you downloaded at the start of the tutorial and choose NwSWM360ft.swm.

    You'll also apply False Discovery Rate (FDR) Correction to the hot spot results. FDR Correction potentially increases the statistical accuracy of your results.

  11. Check Apply False Discovery Rate (FDR) Correction.

    Parameters for the Hot Spot Analysis tool

  12. Click Run.

    The tool runs. When it finishes, a new layer is added to the map and the Contents pane.

  13. In the Contents pane, uncheck the All_Crashes_Copy, Road_Crash_Counts, and Roads layers.

    Now, only the new layer and the basemap appear on the map.

    Map showing hot spots on the road network

    The red road sections are roads with statistically significant clusters of crashes, while the gray roads are those with no significant clusters. You'll reduce the thickness of the roads that aren't significant to emphasize the hot spots.

  14. For the Road_Crash_Hot_Spots layer, click the symbol for Not Significant.

    Symbol for Not Significant

    The Symbology pane appears.

  15. If necessary, click Properties. For Line width, type 0.25.

    Line width set to 0.25 pt

  16. Click Apply and close the Symbology pane.

    The changes are applied to the map. You can see them more clearly when you zoom in.

  17. On the ribbon, click the Map tab. In the Navigate group, click Bookmarks and choose Cocoa and Merritt Island.

    Map bookmarks

    The map zooms to an area of the county with a large number of hot spots.

    Cocoa and Merritt Island bookmark on the map

    The bookmark shows an area where two landmasses are divided by a water body, with only one bridge connecting them. When zoomed in, you can also identify specific intersections that are hot spots for crashes.

  18. Explore the map to see where the other hot spots are located. When finished, navigate to the Full Study Area bookmark to return to the full extent of the study area.
  19. Save the project.

Identify hot spots for fatal crashes

Are the hot spot locations for fatal car crashes the same as the hot spot locations for all crashes? The answer to that question might be vital for determining where to prioritize policy response to crashes. Next, you'll run the same hot spot analysis as before to determine fatality hot spots.

When you joined the crash data to the road network, you computed the sum total of fatalities for each road. You'll run the same calculation as you did for all crashes to determine the number of fatalities per year per mile to account for differences in road length.

  1. In the Contents pane, right-click Road_Crash_Counts and choose Attribute Table.

    In the attribute table, for the Number of fatalities field, many road segments have a value of <Null>. These are roads where there were no crashes at all. All other road segments have values ranging from 0 to 12.

    Because some of the values are null, you'll need to alter the calculation you use to determine fatality rate. You'll modify it to include an if/else statement, where if the value is null, the value is set to 0.

  2. In the Geoprocessing pane, search for and open the Calculate Field tool. Set the following parameters:
    • For Input Table, choose Road_Crash_Counts.
    • For Field Name, type Fatality_Rate.
    • For Field Type, choose Double (64-bit floating point).
    • For Expression, create the expression 0 if not !Fatalities! else !Fatalities! / (6 * !Shape_Length!).

    Calculate Field parameters for fatality rate

  3. Click Run.

    The tool runs. After a few moments, the Fatality_Rate field is added to the attribute table. For road segments with a null value for the number of fatalities, the new field has a value of 0.

    Fatality_Rate field in the attribute table

  4. Close the attribute table.

    Next, you'll run hot spot analysis on the fatality rate values.

  5. In the Geoprocessing pane, search for and open the Hot Spot Analysis (Getis-Ord Gi*) tool. Set the following parameters:
    • For Input Feature Class, choose Road_Crash_Counts.
    • For Input Field, choose Fatality_Rate.
    • For Output Feature Class, type Fatality_Hot_Spots.
    • For Conceptualization of Spatial Relationships, choose Get spatial weights from file.
    • For Weights Matrix File, browse to and choose the NwSWM360ft.swm file.
    • Check Apply False Discovery Rate (FDR) Correction.

    Hot Spot Analysis parameters for the Fatality_Rate field

  6. Click Run.

    The tool runs and the new layer is added to the map and the Contents pane. At a glance, the new layer looks similar to the crash hot spots layer. You'll need to investigate more closely to see the differences.

    Tip:

    Your Contents pane has multiple layers with large legends. To save space, you can hide the legend of any layer by clicking the arrow next to the layer name.

Compare the hot spot maps

You've calculated hot spots for crashes and crash fatalities. You'll compare the two hot spots layers and answer the question: Do hot spots for fatalities occur in the same locations as hot spots for all crashes? To compare the layers side by side, you'll create a map and view it simultaneously with the current map.

  1. On the ribbon, click the Insert tab. In the Project group, click the New Map button.

    New Map button

    A new map, named Map1, is created and becomes the active map in the project. You'll rename the map to something more meaningful.

  2. In the Contents pane, double-click Map1 to open the Map Properties.

    Map1 in the Contents pane

    The Map Properties window appears.

  3. On the General tab, for Name, type Comparison Map. Click OK.
    Tip:

    You can also rename the map by clicking Map1 twice.

    The map is renamed. You'll also change the basemap so it matches the original map.

  4. On the ribbon, click the Map tab. In the Layer group, click Basemap and choose Light Gray Canvas.

    Light Gray Canvas basemap

    Next, you'll copy the Fatality_Hot_Spots layer to the new map.

  5. Click the Map view.

    Map view

    Your original map becomes the active view.

  6. In the Contents pane, right-click the Fatality_Hot_Spots layer and choose Copy. Uncheck the Fatality_Hot_Spots layer and confirm that the Road_Crash_Hot_Spots layer is checked.
  7. Switch back to Comparison Map view.
  8. In the Contents pane, right-click Comparison Map and choose Paste.

    Paste option

    The fatality hot spots are pasted into the new map. Now, one of your maps shows the crash hot spots and the other shows the fatality hot spots. You'll rearrange the map views to look at both maps side by side.

  9. Drag the Comparison Map tab and dock it to the right of the Map view.

    Drop zone to dock the Comparison Map view next to the original map

    You'll link the two map views so that when you navigate in one map, the other map automatically navigates to the same place.

  10. On the ribbon, click the View tab. In the Link group, click the Link Views drop-down menu and choose Center And Scale.

    Link Views button

    The views are linked.

  11. Navigate to the Merritt Island bookmark.

    Map views zoomed to the Merritt Island bookmark

    You may interpret the red road segments on the Comparison Map as locations with higher risk for fatal traffic accidents.

    There are some clear differences between hot spots for all crashes (the left map) and hot spots for crashes with fatalities (the right map). Understanding why fatalities are more prevalent in certain locations can and should be evaluated. Remediation measures in these areas may help prevent future deaths.

    The crash data used in this tutorial also includes some basic information about why crashes occurred, such as whether alcohol was involved, the driver was distracted, or the weather was difficult. While outside the scope of this tutorial, you could perform hot spot analysis on crashes with particular causes to find where targeted remediation may be an option.

  12. Save the project.

You've identified crash and fatality hot spots on the road network. Next, you'll refine your analysis by considering the time of day and day of week when crashes occur.


Identify the most dangerous times to drive

When you aggregated the crash data to the road network, you removed all of the temporal attributes. Now, you'll summarize the crash data by the day of the week and the hour of the day crashes occur. Then, you'll map hot spots for crashes during peak times.

Create a line chart

First, you need to know the peak days and time periods when vehicle crashes occur. You'll chart the data to find out.

Because you're no longer comparing crashes to fatalities, you don't need to view two maps side by side anymore.

  1. Drag the Comparison Map tab to the central drop zone of the Map view.

    Central drop zone

  2. Click the Map tab to make it the active view. Navigate to the Full Study Area bookmark.

    Next, you'll create a line chart using the original crash data.

  3. In the Contents pane, right-click All Crashes (2010 to 2015), point to Create Chart, and choose Line Chart.

    Line Chart option for the Create Chart option

    The Chart Properties pane and chart view appear. You'll chart the number of crashes for each hour of the day and each day of the week.

  4. In the Chart Properties pane, for Date or Number, choose Crash hour of day. For Split by, choose Crash day of week.

    Data parameters for the Chart Properties pane

    The changes are automatically applied to the chart. However, the days of the week are ordered alphabetically, not by the usual order. Before you look at the chart, you'll reorder the days.

  5. Click the Series tab. In the list of values, drag the values to order them from Monday to Sunday.

    Chart values organized by day

    Tip:

    You can also change the color of any value by clicking its symbol. A good idea is to change the workweek (Monday to Friday) to different shades of the same color and the weekend days (Saturday and Sunday) to another color to differentiate them. The example images will show the workweek days in default colors, although you can choose any colors you like.

    You'll also change the chart and axes titles.

  6. Click the General tab. Set the following parameters:
    • For Chart title, type Vehicle Crashes.
    • For X axis title, type Hour of the Day (24 hour clock).
    • For Y axis title, type Number of Crashes.
    • For Legend title, type Days of the Week.

    General tab parameters

    The chart is finished.

    Line chart showing crashes by hour and day

    Tip:

    You can turn off any individual line in the chart by clicking its legend entries. For example, if you wanted to focus on workweek days, you could click the legend entries for Saturday and Sunday to turn them off. To turn them back on, click the legend entries again.

    Several peaks emerge, but the strongest is associated with the afternoon workweek commute from 3:00 p.m. to 5:00 p.m. (between hours 15 and 17). This period is commonly referred to as rush hour. Crashes are also lower on Saturday and Sunday during workday hours because fewer people drive at these times.

  7. Close the chart and the Chart Properties pane.
    Note:

    If you want to open the chart again, double-click the Vehicle Crashes chart under the All Crashes (2010 to 2015) layer in the Contents pane.

Identify hot spots for peak crashes

To create a hot spot map for crashes that occur during weekdays between 3:00 p.m. and 5:00 p.m., you could follow the same steps you previously used to calculate hot spots: Select the crashes you want to analyze, snap them to the road network, count the crashes associated with each road segment, compute a crash rate, and run hot spot analysis.

Because you've already performed this workflow, you'll instead run a model that has been created for you for the purposes of this tutorial. This model contains all of the analysis tools necessary for the workflow, but is generalized so you can examine any subset of crashes you want.

First, you'll open and examine the model.

  1. If necessary, on the ribbon, click the View tab. In the Windows group, click Catalog Pane.

    Catalog Pane button

    The Catalog pane appears. The model you'll use is located in the project's default toolbox. You downloaded it with the rest of the project data.

  2. Expand Toolboxes and expand Crash_Analysis_Model_Tools.tbx.

    Catalog pane with Toolboxes folder expanded

    You'll use the Create Day/Time Hot Spot Map model. Before you run it, you'll look at it in ModelBuilder to see what it does.

  3. Right-click Create Day/Time Hot Spot Map and choose Edit.

    The Create Day/Time Hot Spot Map view appears, showing the model. The model has four parts. First, it selects the crashes to analyze. Then, it snaps the selected crash points to the road network. Next, it calculates the crash rate, and finally, it performs hot spot analysis.

    Create Day/Time Hot Spot Map model

    Elements that have a P symbol are model parameters, like the parameters you set when performing analysis with a geoprocessing tool. Other elements in the model are tools and output or input datasets.

  4. In the Catalog pane, double-click the Create Day/Time Hot Spot Map model.

    The Geoprocessing pane appears, displaying the model parameters. All the elements with a P symbol appear in the list of parameters. To learn more about the parameters, you can look at the model properties.

  5. On the ribbon, on the ModelBuilder tab, in the Model group, click Properties.

    Properties button

    The Tool Properties window appears.

  6. Click the Parameters tab.
  7. For Days, point to Value List.

    Value List showing list of values for the Days parameter

    The values for the Days parameter appear. You'll use these values when you set the model parameters.

  8. Close the Tool Properties window.

    You can also look at the parameters that have already been set for you in the model.

  9. In the Create Day/Time Hot Spot Map view, double-click the Snap tool.

    The tool parameters appear.

    Snap parameters in the model

    The parameters are the same as the ones you used when you ran the Snap tool earlier in the tutorial, including the 0.25-mile snap distance.

    Note:

    Creating a model is beyond the scope of this tutorial. However, if you want to learn more about models and how to build them, try the tutorial Build a model to connect mountain lion habitat.

  10. Close the Snap tool and close the Create Day/Time Hot Spot Map view. If asked to save changes to the model, click No.

    Next, you'll run the model for weekdays between 3:00 p.m. and 5:00 p.m. (15:00 to 17:00), which you've already opened in the Geoprocessing pane.

  11. In the Geoprocessing pane, for the Create Day/Time Hot Spot Map model, set the following parameters:
    • For Crash Data, choose All Crashes (2010 to 2015).
    • For Days, choose Monday, Tuesday, Wednesday, Thursday, and Friday.
    • For Beginning Hour, type 15.
    • For Ending Hour, type 17.
    • For New Rate Field Name, type Work_Week_3_to_5.
    • For Selected Crash Hot Spot Map, type Work_Week_3_to_5_Hot_Spots.

    Parameters for the Create Day/Time Hot Spot Map model

  12. Click Run.

    The model takes a few minutes to complete, as it must run through all of the tools in the model. Once it finishes, the Work_Week_3_to_5_Hot_Spots layer is added to the map. You'll copy it to the Comparison Map view, but first you'll clear the selection that was created as part of the model.

  13. On the ribbon, click the Map tab. In the Selection group, click Clear.

    Clear button

  14. In the Contents pane, right-click Work_Week_3_to_5_Hot_Spots and choose Copy. Uncheck Work_Week_3_to_5_Hot_Spots and confirm that Road_Crash_Hot_Spots is turned on.
  15. Activate the Comparison Map view.
  16. In the Contents pane, right-click Comparison Map and choose Paste. Uncheck Fatality_Hot_Spots.

    You'll compare the hot spot layers side by side as you did when you looked at hot spots for fatalities.

  17. Drag the Comparison Map tab and dock it to the right of the Map view.

    The views are still linked from your previous comparison, so you don't need to link them again.

  18. Navigate to the Freeway interchange north of Palm Shores bookmark.

    Comparison of hot spots for all crashes and hot spots for peak hours

    While some intersections are hot spots for both maps, the location of hot spots on the map on the left (hot spots for all crashes) has several significant differences from the location of hot spots on the map on the right (hot spots for crashes between 3:00 p.m. and 5:00 p.m. on weekdays). Targeting peak time hot spots can help increase safety for drivers during the busiest times of the day.

    At this freeway interchange, hot spots for all crashes appear at freeway entrances. However, at peak hours, there are more hot spots on the freeway itself, including areas where one freeway merges into another. County officials can think about freeway design and signage and consider whether there are any changes that may make it easier for drivers to merge or navigate when there are a lot of other cars on the road.

  19. Navigate to the Full Study Area bookmark and close the Comparison Map view. In the Contents pane, uncheck Road_Crash_Hot_Spots.
  20. Save the project.

You've identified peak days and times when crashes occur. Then, you used a pre-built model to perform the hot spot analysis workflow you used earlier in the tutorial. You also compared the results with the hot spots for all crashes.


Visualize yearly hot spots in 3D

Your crash data covers six years from 2010 to 2015. By creating yearly hot spot maps, county officials could see where crashes are becoming more or less frequent over time. As officials make actionable policy changes to reduce crashes, such as changing signage, they could even see whether those changes had an impact on the number of crashes in an area.

To create yearly hot spot maps for crashes occurring weekdays between 3:00 p.m. and 5:00 p.m. (or any other day and time range), you would run the day/time hot spot model six times, once for each year. Then, you would merge the results into a single layer. To save time, you've been provided with two models that will perform this workflow.

Run the models

First, you'll open the models and learn what they do. Then, you'll run them.

  1. Open the Catalog pane.
    Note:

    If the Catalog pane is closed, you can reopen it by clicking the View tab and clicking Catalog Pane.

  2. If necessary, expand Toolboxes and Crash_Analysis_Model_Tools.tbx.
  3. Right-click Analyze Day/Time Hot Spot Trends and choose Edit.

    The Analyze Day/Time Hot Spot Trends view appears.

    Analyze Day/Time Hot Spot Trends model

    The model has two parts. The first part selects the crashes based on the days and hours you choose to analyze. It ends with the Selected Crashes element.

    In the second part, the selected crashes are used as an input for a separate model called Yearly Hot Spot Maps. This model creates hot spot maps for each year from 2010 to 2015. The results are merged into a single output feature class. You'll look at the Yearly Hot Spot Maps model next.

  4. In the Catalog pane, under Crash_Analysis_Model_Tools.tbx, right-click Yearly Hot Spot Maps and choose Edit.

    The Yearly Hot Spot Maps view appears.

    Yearly Hot Spot Maps model

    The Iterate Feature Selection element creates selections for each year from 2010 to 2015. The rest of the model performs the hot spot analysis workflow with which you're familiar. It snaps the selected crashes to the road network, counts the number of crashes associated with each road segment, calculates the crash rate, and runs hot spot analysis. The final part of the model appends the crash year to the result layer and collects a list of all the result maps.

  5. Close the Yearly Hot Spot Maps and Analyze Day/Time Hot Spot Trends views. If prompted to save changes to the models, click No.
  6. If necessary, click the Map tab to activate the Map view.

    Now that you understand what each model does, you'll run the models to create hot spot layers for each year and merge the layers into a single final result.

  7. In the Catalog pane, double-click Analyze Day/Time Hot Spot Trends.

    The Geoprocessing pane appears with the model's parameters. The parameters are similar to the model you ran previously.

  8. Set the following parameters:
    • For Crash Data, choose All Crashes (2010 to 2015).
    • For Days, choose Monday, Tuesday, Wednesday, Thursday, and Friday.
    • For Beginning Hour, type 15.
    • For Ending Hour, type 17.
    • For Space Time Hot Spots, type Work_Week_3_to_5_Trends.

    Parameters for the Analyze Day/Time Hot Spot Trends model

  9. Click Run.

    The model runs. Because it runs the analysis of the previous model six times, it likely takes several minutes to finish.

    When the model finishes, the new layer is added to the map. Unlike the other layers you created, which had symbology based on whether areas were hot or cold spots, this layer has only a single color as its symbol, so there's not much you can learn right away. You'll set the symbology for this layer yourself.

  10. Save the project.

Create a scene

The output layer from the model includes six versions of every road segment, one for each year. Each version has a separate hot spot analysis attribute to indicate whether there is significant clustering of high crash rates.

To display this data, you'll visually represent each road segment as a ribbon and stack them vertically in a 3D scene. That way, you can see all six versions of each road segment at once and identify persistent problem areas or areas becoming more or less problematic over time.

First, you'll apply the default hot spot symbology to the model output. You can apply the same symbology from one of your other hot spot layers.

  1. In the Geoprocessing pane, search for and open the Apply Symbology From Layer tool.

    This tool takes the symbology from one layer and applies it to another.

  2. For Input Layer, choose Work_Week_3_to_5_Trends. For Symbology Layer, choose Road_Crash_Hot_Spots.

    Parameters for the Apply Symbology From Layer tool

  3. Click Run.

    The familiar hot spot symbology is applied to the layer. Next, you'll create a 3D scene so you can display the layer in 3D.

  4. On the ribbon, click the Insert tab. In the Project group, click the New Map drop-down arrow and choose New Local Scene.

    New Local Scene option

    A scene is created. You'll change the basemap to match the Map view.

  5. On the ribbon, on the Map tab, in the Layer group, click Basemap. Under 2D Basemap, choose Light Gray Canvas.

    Next, you'll copy the model output to the scene.

  6. Activate the Map view and copy the Work_Week_3_to_5_Trends layer. Activate the Scene view and paste the layer in the Contents pane.

    The layer is added to the scene as a 2D layer. You want to symbolize the layer in 3D, so you'll move it.

  7. In the Contents pane, drag the Work_Week_3_to_5_Trends layer to the 3D Layers group.

    Layer in the 3D Layers group

    After you move the layer, it may not draw completely on the scene. Additionally, you may receive a warning about an excessive number of draw requests. You'll adjust the layer's visibility settings so that the layer is only visible when zoomed in, so fewer features appear on the scene at the same time.

  8. In the Contents pane, right-click the Work_Week_3_to_5_Trends layer and choose Properties.
  9. In the Layer Properties window, on the General tab, change Farthest distance to 8,000 ft.

    Farthest distance parameter set to 8,000 ft

  10. Click OK.

    The layer is no longer visible at the full extent of the data and the rendering will eventually clear.

  11. On the Map tab, click Bookmarks and choose Melbourne.

    At this extent, the layer becomes visible.

Visualize the results in 3D

Now that you've added the layer to a scene, you'll display and symbolize it in 3D. First, you'll extrude the road segments from the map surface so they have a three-dimensional appearance. To ensure the map surface is completely flat, you'll disable the scene's elevation service. The elevation service contains real-world elevation data and was added to the scene by default.

  1. In the Contents pane, under Elevation Surfaces, uncheck WorldElevation3D/Terrain3D.

    Elevation surface turned off

    Next, you'll extrude the road segments so they look like ribbons that float over the map surface. First, you'll choose the type of extrusion. You want the road segments to be extruded from the base of the map, so you'll extrude them from their base height.

  2. In the Contents pane, confirm that Work_Week_3_to_5_Trends is selected.
  3. On the ribbon, click the Feature Layer tab. In the Extrusion group, click Type and choose Base Height.

    Base Height option

    Next, you'll create an expression to determine how far into 3D space the road segments are extruded. You'll make each road segment ribbon have a height of 50 feet. (You can experiment with different extrusion values if you want.)

  4. In the Extrusion group, click the Extrusion Expression button.

    Extrusion Expression button

    The Expression Builder window appears.

  5. For Expression, type 50. Click OK.

    The layer is extruded, but all six yearly versions of each road segment overlap and you can only see one at a time.

    You'll create separation between the different road segments so that each year's segment is positioned at a different elevation above the ground.

  6. In the Contents pane, double-click Work_Week_3_to_5_Trends. In the Layer Properties window, click the Elevation tab.
  7. For Features are, choose Relative to the ground. Click the Set an expression button.

    Set an expression button

    Because the years range from 2010 to 2015, you'll create an expression that subtracts 2010 from the year and multiplies the result by 60. That way, when the year is 2010, the elevation will be 0; when the year is 2011, the elevation will be 60; when the year is 2012, the elevation will be 120; and so on. This expression will also create 10 feet of separation between each year, because you extruded each year to a height of 50 feet.

  8. In the Expression Builder window, create (or copy and paste) the following expression:

    ($feature.AnalysisYear - 2010) * 60

  9. Click OK. In the Layer Properties window, click OK.

    Lastly, you'll change the symbol for areas that are neither a hot nor cold spot to be invisible. That way, your scene will emphasize hot spot areas.

  10. In the Contents pane, for Work_Week_3_to_5_Trends, right-click the Not Significant symbol and choose No color.

    No color option

  11. Open the 3D Zoom bookmark and explore it.

    3D Zoom bookmark

    Each year's hot spots are located at a different height. Hot spots from 2010 are the lowest and hot spots from 2015 are the highest. At the bookmark, there are several areas that have only become hot spots more recently, some areas that have been hot spots sporadically, and some areas that were once hot spots but aren't anymore.

    These trends give the county an idea of where changes in crash hot spots are occurring. It can also help the county see whether road network changes implemented during the data's time period have had an impact on car crashes.

  12. Explore the rest of the study area on your own, tilting and panning the scene as need be.
    Note:

    If you need help navigating in 3D, try the topic Navigation in 3D.

  13. Save the project.

In this tutorial, you've answered a number of questions:

  • Which intersections and roadways in Brevard County have the highest crash rates?
  • When and where do most crashes occur?
  • How does the spatial pattern of fatalities differ from the spatial pattern of traffic accidents?
  • How does the spatial pattern of crash rates occurring during the workweek afternoon commute differ from the overall pattern of crash rates?
  • Over time, which intersections or roadways are persistent problem areas for traffic accidents?

You could extend this same workflow to answer additional questions:

  • Where are the hot spot areas for crashes involving elderly drivers, teenage drivers, or alcohol-impaired drivers?
  • When and where do accidents involving elderly drivers, teenage drivers, or alcohol-impaired drivers cluster spatially?

The answers to these questions will allow you to make more informed recommendations for policies and other measures to reduce future traffic collisions and save lives. Take the next step by applying the workflow to data for your own county. The same workflow would also work well for other application areas such as crime, fraud, or insurance claims.

You can find more tutorials in the tutorial gallery.