Research Task
Develop Python scripts to operationalize the EQI's traffic proximity and volume indicator.
-
Relevant PR (if applicable):
-
Question or Goal: overarching goal of this issue
-
Data Required:
-
Research Required:
- Refactor of exisitng EQI Traffic Proximity and Volume script to python, inlcuding additional documentation
-
Metrics: what specific calculations are you looking to find?
-
Load and prep the road data. Read the road network, keep only major roads
(F_SYSTEM 1 and 2), reproject to a meters-based CRS (EPSG:3310), and drop Z/M coordinates.
-
Load the hexagon grid and reproject it to the same CRS.
-
For each buffer distance (50, 100, 150 … up to 500 meters):
- Buffer every road by that distance.
- Intersect the buffered roads with the hexagon grid.
- Within each hexagon, where road buffers overlap, merge the geometry and take
the maximum AADT (to avoid double-counting).
- Calculate the area of buffered road that falls inside each hexagon.
- Compute
weighted_aadt = AADT × area, then sum per hexagon to get that distance's score.
- Store the result in a column named
aadt_<distance> (e.g. aadt_50).
-
Combine all distances into one table, so each hexagon has cumulative scores
aadt_50 through aadt_500. Fill missing values with 0.
-
Convert cumulative buffers into distance bands. Since each buffer contains the
smaller ones, subtract consecutive buffers to isolate each ring
(e.g. p_100_m = aadt_100 − aadt_50).
-
Apply distance-decay weights so closer traffic counts more (0–50 m = 1.0,
50–100 m = 0.5, then 0.33, 0.25 … down to 0.1 for the outermost ring). Sum the
weighted bands into a single weighted_aadt_score per hexagon.
-
Rank the scores into a percentile (traffic_proximity_and_volume_percentile)
across all hexagons.
-
Merge the scores back onto the hexagon grid and fill missing values with 0.
-
Output: rename the score as a "partial" traffic score and merge it with the
full_traffic_impact table.
- Expected Outputs / Findings: what do you hope to have created when this is complete?
Research Task
Develop Python scripts to operationalize the EQI's traffic proximity and volume indicator.
Relevant PR (if applicable):
Question or Goal: overarching goal of this issue
Data Required:
Research Required:
Metrics: what specific calculations are you looking to find?
Load and prep the road data. Read the road network, keep only major roads
(
F_SYSTEM1 and 2), reproject to a meters-based CRS (EPSG:3310), and drop Z/M coordinates.Load the hexagon grid and reproject it to the same CRS.
For each buffer distance (50, 100, 150 … up to 500 meters):
the maximum AADT (to avoid double-counting).
weighted_aadt = AADT × area, then sum per hexagon to get that distance's score.aadt_<distance>(e.g.aadt_50).Combine all distances into one table, so each hexagon has cumulative scores
aadt_50throughaadt_500. Fill missing values with 0.Convert cumulative buffers into distance bands. Since each buffer contains the
smaller ones, subtract consecutive buffers to isolate each ring
(e.g.
p_100_m = aadt_100 − aadt_50).Apply distance-decay weights so closer traffic counts more (0–50 m = 1.0,
50–100 m = 0.5, then 0.33, 0.25 … down to 0.1 for the outermost ring). Sum the
weighted bands into a single
weighted_aadt_scoreper hexagon.Rank the scores into a percentile (
traffic_proximity_and_volume_percentile)across all hexagons.
Merge the scores back onto the hexagon grid and fill missing values with 0.
Output: rename the score as a "partial" traffic score and merge it with the
full_traffic_impacttable.