Visualizing traffic
You can use traffic data for performing time-dependent network analysis; you can also use it to visualize travel speeds for a given moment. This topic covers the basics of displaying traffic and offers steps on how to perform other visualization tasks involving traffic.
ArcGIS Online provides a ready-to-use traffic map service that you can use in web applications and in ArcGIS for Desktop to visualize live and historical traffic. Traffic incident map and feature services are also available.
You can display traffic in ArcMap regardless of whether you have a license for the ArcGIS Network Analyst extension.
Displaying traffic
The steps below show how to visualize traffic conditions for a given date and time.
- Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.1.
-
Add a network dataset that supports traffic to ArcMap and click No when asked if you want to add all feature classes that participate in the network.
Only the edges that have traffic data are displayed by default because, when time on the map is disabled, traffic conditions for the current time and date are shown. When you enable time, traffic conditions are displayed for the time and date set on the Time Slider dialog box.
Tip:Add a basemap to provide context and show streets that don't have traffic data.
- Click the Open Time Slider Window button , which is on the Tools toolbar.
This enables time in ArcMap and the Time Slider dialog box appears, which allows you to enter a time and date and other information for filtering temporal data.
- Setting the time zone property on the Time Slider dialog box to match that of the network data you are viewing can facilitate entering the proper time and date values on the slider.
- Click the Options button .
The Time Slider Options dialog box opens.
- Click the Time Display tab.
- For Time zone, choose the time zone that you want the time and date in the Time Slider dialog box to represent.
- Check Adjust for daylight saving changes.
- Click OK.
- Click the Options button .
- Choose a time and date that you want to see traffic conditions for and adjust the time slider accordingly.Caution:
The time and date you enter are specific to the time zone that is set on the Time Slider Options dialog box. This can be misleading if the time slider is set to one time zone and the map is zoomed into an area that is in a different time zone.
For example, say the time zone on the Time Slider Options dialog box is set to eastern time and you are looking at traffic in Los Angeles (Pacific time), which is three hours behind eastern time. If you move the time slider to 8:00 a.m., the map shows traffic conditions in Los Angeles at 5:00 a.m. Pacific time.
To show traffic at 8:00 a.m. Pacific time, you can either offset the time slider yourself to adjust for the time difference (enter 11:00 a.m.), or you can change the time zone in the Time Slider Options dialog box to match the area you are viewing in ArcMap. In most cases, it makes sense to change the time zone.
- To show traffic for the current time again, you can set the time slider to the present date and time, such as by clicking the Live Mode button on the Time Slider dialog box, or simply by disabling time on the map. To disable time, click the Disable time on map button .
Live traffic takes precedence over historical traffic
Network Analyst displays live traffic by default and falls back to displaying historical traffic data if live traffic isn't available. This is evident in the Edge Traffic Evaluators dialog box, where the evaluation order is specified. Network datasets read live traffic from DTF files. If the file folder that your network dataset points to for live traffic contains a DTF file that is valid for the time you specify with the time slider, traffic from the DTF file is displayed. In other words, you can see what the live travel speeds were for times in the past, as long as you keep old DTF files.
If the network dataset can't find a DTF file that is valid for the edge it is querying at the time specified on the time slider, historical traffic data is displayed there instead. And if a historical traffic profile isn't associated with the edge being queried, then no traffic is displayed.
Network Analyst draws slower-moving traffic on top of faster-moving traffic so that it is easy to see where bottlenecks are.
Visualizing live traffic without historical traffic
Live and historical traffic are displayed seemlessly by Network Analyst when both types of data are available. If you want to see live traffic without historical traffic, however, follow the steps below.
- Add a traffic-enabled network dataset to ArcMap.
- In the table of contents, double-click the network dataset layer.
The Layer Properties dialog box appears.
- Click the Symbology tab.
- Make sure that Traffic is checked.
- Click Traffic to select it. Traffic-specific properties appear on the panel to the right.
- Check Show live traffic only.
- Click OK.
Now, live traffic is rendered on the map as long as it is available; historical traffic is removed from the display entirely.
If the network dataset has access to DTF files from the past, moving the time slider to previous time slices causes what was live traffic at that time to display on the map. This is different than displaying historical traffic, because historical traffic is based on average travel speeds at a given time of day over many days; live traffic is a record of speeds at a given time for a specific date.
Similarly, if your DTF files include predictive data and you check Show live traffic only, then set the time slider to a time in the future, predicted traffic conditions are shown, as long as predictive data is available for that time and date.
Displaying traffic on a basemap
It is often helpful to add a basemap to your map, then display traffic on top.
Changing symbology of traffic
Traffic on edges is shown as a ratio of current speed to free-flow speed and is classified into four ranges: Stop and Go, Slow, Moderate, and Free Flow. You can change the symbology and range values for any of these groups by following the steps below:
- Open the Layer Properties dialog box by double-clicking the network dataset layer in the ArcMap table of contents.
- Click the Symbology tab.
- In the Show list, click Traffic to select it.
- On the right side of the dialog box, choose the time-dependent traffic attribute from the Attribute drop-down list if it is not already chosen. Typically, this is named TravelTime.
- Right-click the symbol of the category you want to change and choose Properties for Selected Symbol(s).
- Use the Symbol Selector dialog box that opens to define a new symbol for the category.
-
Click OK.
The Symbol Selector dialog box closes.
-
Click OK.
The Layer Properties dialog box closes.
You can customize the range values of any of the symbols by clicking the value that you want to change in the Speed Ratio Range column and entering a new value. The value you enter becomes the upper limit of the range. The lower limit is determined by the upper limit of the range below it. The lower limit for Stop and Go is always 0, and the upper limit for Free Flow is always 1.
Filtering traffic at different scale ranges
Reduce drawing times by rending traffic for different road classes at different scales. By zooming out to a given scale, traffic on major highways is displayed only. As you zoom in, traffic on primary roads, then local roads, is drawn. You can subdivide roads into as many categories as you want.
- Open the Layer Properties dialog box by double-clicking the network dataset layer in the ArcMap table of contents.
- Click the Symbology tab.
- In the Show list, uncheck every item except for Traffic.
- Click Traffic to select it. The right side of the dialog box shows traffic-specific settings.
- On the right side of the dialog box, choose the time-dependent traffic attribute from the Attribute drop-down list if it is not already chosen. Typically, this is named TravelTime.
- Click Advanced > Source Filters to open the Source Filters dialog box.
- Create an SQL expression that selects only the highest-level roads, such as major highways.
- Click OK.
The Source Filters dialog box closes.
- On the Layer Properties dialog box, click the General tab.
- Click Don't show layer when zoomed and specify a scale range that defines when the network dataset layer should display only primary roads with traffic on the map.
-
Click OK.
The Layer Properties dialog box closes.
- In the Table Of Contents window, copy and paste the network dataset layer so that you have two layers.
- Follow the same set of steps as outlined above, but change the source filter for Traffic so that it displays the highest and second-highest road classes. Also set a different scale range. The layer should not be drawn when the scale is zoomed out beyond the minimum scale range of the other network dataset layer. (This network dataset layer's Out beyond value should be slightly less than the other network dataset layer's In beyond value to avoid displaying them both at the same time.)
- Repeat the last two steps for any other road classes, adjusting the scale ranges so ArcMap seamlessly switches between the layers and never draws more than one network dataset layer at the same scale.
To show local roads with smaller lines, as shown in the second image at the top of this section, draw the primary roads at all scales. Next, duplicate the layer for local roads, filter out primary roads on the local roads layer, set a scale range so the layer only draws when zoomed in beyond a certain scale, and make the width of the lines smaller than the primary roads.
Adding casings
A casing is a border on line features. If you want to show casings around traffic lines, follow the steps below.
- Copy and paste the network dataset layer in the ArcMap table of contents to create a duplicate.
- In the table of contents, drag and drop the new network dataset layer so that it is immediately below the original network dataset layer.
- Double-click the new network dataset layer in the table of contents.
The Layer Properties dialog box opens.
- Click the Symbology tab.
- Change the symbols for the different speed ratio ranges to be the same color (for example, gray) and make them slightly wider than their equivalent symbols in the other network dataset layer.
Overlaying traffic incidents
Overlaying and symbolizing traffic incidents can explain why traffic has slowed in an area.
- Run the Update Traffic Incidents geoprocessing tool to get the latest traffic incidents for your study area.
- Add the point features that the tool creates to ArcMap.
- Symbolize the incidents.
- Display traffic as described in the Displaying traffic section of this topic.