Historical Traffic Data

Resumen

Provides information about the historical traffic information stored in the network dataset such as the speed profile table and time slice durations.

Propiedades

PropiedadExplicaciónTipo de datos
timeInterval
(Sólo lectura)

The time interval of the traffic data.

Double
timeIntervalUnits
(Sólo lectura)

The units of the time interval of the traffic data. This property returns the following keywords:

  • Milliseconds
  • Seconds
  • Minutes
  • Hours
  • Days
  • Weeks
  • Months
  • Years
  • Decades
  • Centuries
  • Unknown

String
firstTimeSliceFieldName
(Sólo lectura)

The field name of the first time slice of the given period in the profile table.

String
lastTimeSliceFieldName
(Sólo lectura)

The field name of the last time slice of the given period in the profile table.

String
firstTimeSliceStartTime
(Sólo lectura)

The start time of valid period of day for traffic data.

String
timeSliceDurationInMinutes
(Sólo lectura)

The duration of time slice in minutes.

Integer
profilesTableName
(Sólo lectura)

The name of the table containing profiles.

String
joinTableName
(Sólo lectura)

The name of the join table between edges and profiles.

String
joinTableBaseTravelTimeFieldName
(Sólo lectura)

The field name for base travel time in the join table.

String
joinTableBaseTravelTimeUnits
(Sólo lectura)

The units for the base travel time in the join table. This property returns the following keywords:

  • Seconds
  • Minutes
  • Hours
  • Days

String
joinTableProfileIDFieldNames
(Sólo lectura)

A Python list containing field names of the join table pointing to speed profiles.

List

Ejemplo de código

Historical Traffic Data Properties Example

Display a summary of the historical traffic information for the network dataset.

# Name: NDSHistoricalTrafficDataProperties_ex01.py
# Description: Print historical traffic information for the network dataset.

import arcpy
import sys

# Set the workspace
arcpy.env.workspace = "C:/Data/SanFrancisco.gdb/Transportation"

# Create Describe object for the network dataset
desc = arcpy.Describe("Streets_ND")

#Get the historical traffic data object
if desc.supportsHistoricalTrafficData:
    traffic = desc.historicalTrafficData
else:
    #If the directions are not set for the network dataset, exit 
    print "No historical traffic information"
    sys.exit() 

print "Historical Traffic Information ----" 
print "Time interval: " , traffic.timeInterval
print "Time interval units: " , traffic.timeIntervalUnits 
print "First time slice field name: " , traffic.firstTimeSliceFieldName 
print "Last time slice field name: " , traffic.lastTimeSliceFieldName 
print "First time slice start time: " , traffic.firstTimeSliceStartTime 
print "Time slice duration in minutes: ",traffic.timeSliceDurationInMinutes
print "Profiles table name: ", traffic.profilesTableName
print "Join table name: ", traffic.joinTableName
print "Join table base travel time field name: ", traffic.joinTableBaseTravelTimeFieldName
print "Join table base travel time units: ", traffic.joinTableBaseTravelTimeUnits
print "Join table ProfileID field names: ", traffic.joinTableProfileIDFieldNames

7/10/2012