-
Notifications
You must be signed in to change notification settings - Fork 0
Stage 2a: Output Data Format
The data on the loop detector locations, and the corresponding (link) roads where they are located, are stored in FITS binary table files with names of the form:
<config.output_dir>/s2a.Loop.Detector.Data/detectors.<DATA_SOURCE>.<COUNTRY>.<CITY>.fits
where DATA_SOURCE
is one of 'LD.Flow.LD.Occupancy', 'LD.Flow.LD.Speed', or 'LD.Flow.LD.Occupancy.LD.Speed'. There are 37 files, with a total of 13,508 rows, each corresponding to a unique loop detector. In each file, the rows are sorted by LATITUDE
. The columns in each file are as follows:
DETECTOR_ID
:
- STRING
- Loop detector ID
- Made up exclusively from characters in the set: {'_', '-', '+', '0', ..., '9', 'a', ..., 'z', 'A', ..., 'Z'}
- All values are unique
LONGITUDE
:
- FLOAT64
- Longitude (deg; WGS84) of the loop detector
- All values are in the range -180.0 to 180.0 inclusive with no bad values
LATITUDE
:
- FLOAT64
- Latitude (deg; WGS84) of the loop detector
- All values are in the range -90.0 to 90.0 inclusive with no bad values
- The values are sorted into ascending order
LENGTH
:
- FLOAT64
- Length (km) of the (link) road on which the loop detector is located
- All values are positive with no bad values
POSITION
:
- FLOAT64
- Loop detector location as a ratio of the distance from the downstream intersection to the length of the (link) road on which the loop detector is located
- Good values are in the range 0.0 to 1.0 inclusive, while bad values are -1.0
ROAD_CLASS
:
- STRING
- Classification of the (link) road on which the loop detector is located (from Open Street Maps)
- All values are from the set {'living_street', 'motorway', 'motorway_link', 'primary', 'primary_link', 'residential', 'secondary', 'secondary_link', 'service', 'tertiary', 'tertiary_link', 'trunk', 'trunk_link', 'unclassified'} with no bad values
SPEED_LIMIT
:
- FLOAT64
- Speed limit (km/h) of the (link) road on which the loop detector is located (from Open Street Maps)
- Good values are positive, while bad values are -1.0
NLANES
:
- INT32
- Number of lanes covered by the loop detector
- All values are positive with no bad values
LINK_ID
:
- INT32
- An ID number for the corresponding link road
- Good values are non-negative, while bad values are -1
LINK_PTS_LONGITUDE
:
- FLOAT64 100-element vector
- Longitudes (deg; WGS84) of the points mapping out the corresponding link road
- All values are in the range -180.0 to 180.0 inclusive with no bad values
LINK_PTS_LATITUDE
:
- FLOAT64 100-element vector
- Latitudes (deg; WGS84) of the points mapping out the corresponding link road
- All values are in the range -90.0 to 90.0 inclusive with no bad values
LINK_PTS_FLAG
:
- INT32 100-element vector
- Flags indicating which points map out the corresponding link road
- All values are 0 (ignore) or 1 (point on the link road)
The data on the time-stamps are stored in FITS binary table files with names of the form:
<config.output_dir>/s2a.Loop.Detector.Data/timestamps.<DATA_SOURCE>.<COUNTRY>.<CITY>.fits
where DATA_SOURCE
is one of 'LD.Flow.LD.Occupancy', 'LD.Flow.LD.Speed', or 'LD.Flow.LD.Occupancy.LD.Speed'. There are 37 files, with a total of 1,550,258 rows. In each file, the rows are sorted by LOWER_BIN_LIMIT_TIMESTAMP
. The columns in each file are as follows:
LOWER_BIN_LIMIT_TIMESTAMP
:
- STRING
- Time stamp (YYYY-MM-DDTHH:MM:SS.SSS; local time) for the lower limit of the time bin for the corresponding loop detector measurements
- All values are valid time stamps with no bad values
- The values are sorted into ascending order
- All values are unique
UPPER_BIN_LIMIT_TIMESTAMP
:
- STRING
- Time stamp (YYYY-MM-DDTHH:MM:SS.SSS; local time) for the upper limit of the time bin for the corresponding loop detector measurements
- All values are valid time stamps with no bad values
- The values are sorted into ascending order
- All values are unique
BIN_MIDPOINT_TIMESTAMP
:
- STRING
- Time stamp (YYYY-MM-DDTHH:MM:SS.SSS; local time) for the mid-point of the time bin for the corresponding loop detector measurements
- All values are valid time stamps with no bad values
- The values are sorted into ascending order
- All values are unique
LOWER_BIN_LIMIT_MJD
:
- STRING
- Time stamp (Modified Julian Date; days; local time) for the lower limit of the time bin for the corresponding loop detector measurements
- All values are valid times with no bad values
- The values are sorted into ascending order
- All values are unique
UPPER_BIN_LIMIT_MJD
:
- STRING
- Time stamp (Modified Julian Date; days; local time) for the upper limit of the time bin for the corresponding loop detector measurements
- All values are valid times with no bad values
- The values are sorted into ascending order
- All values are unique
BIN_MIDPOINT_MJD
:
- STRING
- Time stamp (Modified Julian Date; days; local time) for the mid-point of the time bin for the corresponding loop detector measurements
- All values are valid times with no bad values
- The values are sorted into ascending order
- All values are unique
The data on the loop detector measurements (raw) are stored in FITS image files with names of the form:
<config.output_dir>/s2a.Loop.Detector.Data/measurements.raw.<DATA_SOURCE>.<COUNTRY>.<CITY>.flow.fits
<config.output_dir>/s2a.Loop.Detector.Data/measurements.raw.<DATA_SOURCE>.<COUNTRY>.<CITY>.occupancy.fits
<config.output_dir>/s2a.Loop.Detector.Data/measurements.raw.<DATA_SOURCE>.<COUNTRY>.<CITY>.speed.fits
<config.output_dir>/s2a.Loop.Detector.Data/measurements.raw.<DATA_SOURCE>.<COUNTRY>.<CITY>.error_flag.fits
where DATA_SOURCE
is one of 'LD.Flow.LD.Occupancy', 'LD.Flow.LD.Speed', or 'LD.Flow.LD.Occupancy.LD.Speed'. There are 37 sets of 3 (or 4) files. Each image is of size M rows by N columns, where M and N are the numbers of loop detectors and time stamps, respectively, for the corresponding city. The (i,j)th value in an image file corresponds to the ith loop detector at the jth time stamp.
measurements.raw.<DATA_SOURCE>.<COUNTRY>.<CITY>.flow.fits
:
- FLOAT64
- Each pixel value represents the vehicle count in the corresponding aggregation time-interval scaled to 1 hour (veh/hour; flow)
- Good pixel values are non-negative, while bad pixel values are -1.0 (flagged with 1 in the ".error_flag.fits" image)
measurements.raw.<DATA_SOURCE>.<COUNTRY>.<CITY>.occupancy.fits
- FLOAT64
- Each pixel value represents the fraction of time in the corresponding aggregation time-interval that the loop detector is occupied (occupancy)
- Good pixel values are in the range 0.0 to 1.0 inclusive, while bad pixel values are -1.0 (flagged with 1 in the ".error_flag.fits" image)
- N.B: Positive flow or speed measurements at zero occupancy are not flagged as errors
measurements.raw.<DATA_SOURCE>.<COUNTRY>.<CITY>.speed.fits
:
- FLOAT64
- Each pixel value represents the mean vehicle speed (km/h) in the corresponding aggregation time-interval
- Good pixel values are non-negative, while bad pixel values are -1.0 (flagged with 1 in the ".error_flag.fits" image)
measurements.raw.<DATA_SOURCE>.<COUNTRY>.<CITY>.error_flag.fits
:
- INT32
- Each pixel value represents a flag indicating an error
- All pixel values are 0 (no error) or 1 (error)
The data on the loop detector measurements (ARIMA) are stored in FITS image files with names of the form:
<config.output_dir>/s2a.Loop.Detector.Data/measurements.ARIMA.<DATA_SOURCE>.<COUNTRY>.<CITY>.flow.fits
<config.output_dir>/s2a.Loop.Detector.Data/measurements.ARIMA.<DATA_SOURCE>.<COUNTRY>.<CITY>.occupancy.fits
<config.output_dir>/s2a.Loop.Detector.Data/measurements.ARIMA.<DATA_SOURCE>.<COUNTRY>.<CITY>.speed.fits
<config.output_dir>/s2a.Loop.Detector.Data/measurements.ARIMA.<DATA_SOURCE>.<COUNTRY>.<CITY>.error_flag.fits
where DATA_SOURCE
is one of 'LD.Flow.LD.Occupancy', or 'LD.Flow.LD.Speed'. There are 34 sets of 3 files. Each image is of size M rows by N columns, where M and N are the numbers of loop detectors and time stamps, respectively, for the corresponding city. The (i,j)th value in an image file corresponds to the ith loop detector at the jth time stamp.
measurements.ARIMA.<DATA_SOURCE>.<COUNTRY>.<CITY>.flow.fits
:
- FLOAT64
- Each pixel value represents the ARIMA-smoothed flow (veh/hour)
- Good pixel values are non-negative, while bad pixel values are -1.0 (flagged with 1 in the ".error_flag.fits" image)
measurements.ARIMA.<DATA_SOURCE>.<COUNTRY>.<CITY>.occupancy.fits
- FLOAT64
- Each pixel value represents the ARIMA-smoothed occupancy
- Good pixel values are in the range 0.0 to 1.0 inclusive, while bad pixel values are -1.0 (flagged with 1 in the ".error_flag.fits" image)
- N.B: Positive flow or speed measurements at zero occupancy are not flagged as errors
measurements.ARIMA.<DATA_SOURCE>.<COUNTRY>.<CITY>.speed.fits
:
- FLOAT64
- Each pixel value represents the ARIMA-smoothed mean vehicle speed (km/h) in the corresponding aggregation time-interval
- Good pixel values are non-negative, while bad pixel values are -1.0 (flagged with 1 in the ".error_flag.fits" image)
measurements.ARIMA.<DATA_SOURCE>.<COUNTRY>.<CITY>.error_flag.fits
:
- INT32
- Each pixel value represents a flag indicating an error
- All pixel values are 0 (no error) or 1 (error)
Stage 2a provides two summary statistics files:
<config.output_dir>/s2a.Loop.Detector.Data/summary.statistics.of.detectors.per.city.txt
<config.output_dir>/s2a.Loop.Detector.Data/summary.statistics.of.measurements.per.city.detector.txt
Author: Daniel Bramich