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.

TipTip:

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.

LicenseLicense:

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.

Steps:
  1. Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.2.2.
  2. 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.

    TipTip:

    Add a basemap to provide context and show streets that don't have traffic data.

  3. Click the Open Time Slider Window button Time Slider, 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.

  4. 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.
    1. Click the Options button Options.

      The Time Slider Options dialog box opens.

    2. Click the Time Display tab.
    3. For Time zone, choose the time zone that you want the time and date in the Time Slider dialog box to represent.
    4. Check Adjust for daylight saving changes.
    5. Click OK.
  5. Choose a time and date that you want to see traffic conditions for and adjust the time slider accordingly.

    CautionCaution:

    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.

  6. 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 Live mode on the Time Slider dialog box, or simply by disabling time on the map. To disable time, click the Disable time on map button Disable time on map.

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.

Steps:
  1. Add a traffic-enabled network dataset to ArcMap.
  2. In the table of contents, double-click the network dataset layer.

    The Layer Properties dialog box appears.

  3. Click the Symbology tab.
  4. Make sure that Traffic is checked.
  5. Click Traffic to select it. Traffic-specific properties appear on the panel to the right.
  6. Check Show live traffic only.
  7. 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:

Steps:
  1. Open the Layer Properties dialog box by double-clicking the network dataset layer in the ArcMap table of contents.
  2. Click the Symbology tab.
  3. In the Show list, click Traffic to select it.
  4. 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.
  5. Right-click the symbol of the category you want to change and choose Properties for Selected Symbol(s).
  6. Use the Symbol Selector dialog box that opens to define a new symbol for the category.
  7. Click OK.

    The Symbol Selector dialog box closes.

  8. 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.

  9. Click OK.

    The Layer Properties dialog box closes.

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.

Traffic on higher order roads is displayed only
Traffic on higher and lower order roads is displayed

Steps:
  1. Open the Layer Properties dialog box by double-clicking the network dataset layer in the ArcMap table of contents.
  2. Click the Symbology tab.
  3. In the Show list, uncheck every item except for Traffic.
  4. Click Traffic to select it. The right side of the dialog box shows traffic-specific settings.
  5. 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.
  6. Click Advanced > Source Filters to open the Source Filters dialog box.
  7. Create an SQL expression that selects only the highest-level roads, such as major highways.
  8. Click OK.

    The Source Filters dialog box closes.

  9. On the Layer Properties dialog box, click the General tab.
  10. 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.
  11. Click OK.

    The Layer Properties dialog box closes.

  12. The layer that you just modified will draw traffic for the highest road class at the scale range you specified. You need to copy and paste the network dataset layer in the table of contents and specify different scale ranges.
  13. In the Table Of Contents window, copy and paste the network dataset layer so that you have two layers.
  14. 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.)
  15. 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.
  16. TipTip:

    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.

Steps:
  1. Copy and paste the network dataset layer in the ArcMap table of contents to create a duplicate.
  2. In the table of contents, drag and drop the new network dataset layer so that it is immediately below the original network dataset layer.
  3. Double-click the new network dataset layer in the table of contents.

    The Layer Properties dialog box opens.

  4. Click the Symbology tab.
  5. 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.
  6. If you are filtering traffic based on road class and scale range, create casings by following the steps above for each network dataset layer in the map. The layer properties are maintained when you copy and paste a network dataset layer, so if you duplicate each layer individually, you won't need to set the scale ranges and source filters again.

Overlaying traffic incidents

Overlaying and symbolizing traffic incidents can explain why traffic has slowed in an area.

Traffic incident

Steps:
  1. Run the Update Traffic Incidents geoprocessing tool to get the latest traffic incidents for your study area.
  2. Add the point features that the tool creates to ArcMap.
  3. Symbolize the incidents.
  4. Display traffic as described in the Displaying traffic section of this topic.

Related Topics

3/25/2015