positive_control¶
Positive-control check: free-flow speed (a road-design characteristic) as a spatial predictor of current speed. Recovering this known spatial signal shows the pipeline can detect spatial structure where it exists.
positive_control
¶
Positive-control analysis: free-flow speed as a spatial predictor of current speed.
Free-flow speed is a road-design characteristic (lane count, speed limit, road class) and should be strongly predictable from segment identity. Recovering this known spatial signal demonstrates that the pipeline can detect spatial structure where it exists, so a null centrality--congestion result cannot be attributed to insufficient power, spatial-matching errors, or data-quality problems.
Computes the Pearson R^2 between free-flow speed and current speed per city at two aggregation levels:
segment-level-- segment means collapsed across the temporal periods (the between-segment statistic reported in the manuscript)pooled panel-- all segment x period observations
Outputs positive_control_r2.csv in the analysis-results directory.
load_panel
¶
Build a long panel (segment x period) of current speed and free-flow speed.
Source code in src/trafficpipeline/positive_control.py
compute_positive_control
¶
Per-city Pearson R^2 of free-flow speed vs current speed, both levels.
Source code in src/trafficpipeline/positive_control.py
run_analysis
¶
Run the positive-control analysis and write positive_control_r2.csv.