project_duration_stats
Calculate duration statistics between actual design start and construction end for NYC capital projects, optionally grouped by agency, borough, or lifecycle status.
Instructions
Duration distribution between two ACTUAL milestones (requires both dates). Only forward actual_design_start to actual_construction_end is supported. Negative intervals are retained in invalid_intervals and excluded from statistics; missing-date and invalid-order counts reconcile to the full latest-known population. Optional group_by returns per-group stats instead of the citywide block.
Interpretation rules:
[lifecycle] Lifecycle: Pre-Design -> Design -> Construction Procurement -> Construction -> Close-out. Schedule progression is reported from Design through Construction. Forecasts and most actual milestones can be suppressed outside those phases; actual_construction_end is the exception and means substantial completion. NULL milestones need not mean missing data. Budget spend%=100 does not prove completion. forecast_past_due is evaluated as of the observation period, not today's date.
[schedule_coverage] Schedule totals and cumulative variance use dashboard-aligned schedule_history. source_schedule_history retains native observations absent from that population; schedule_source_coverage reconciles them. State the schedule universe and cumulative basis. Parenthesized phases are no-schedule reasons. Respect excluded variance artifacts and missing/invalid-duration counts; forward duration statistics exclude reversed dates.
[population] Listings/rankings default to population_scope='latest_known' (each entity's own latest observation). Use population_scope='current' for the selected complete snapshot. State the population_scope and observation period; respect present_in_current_snapshot. Detail tools use latest-known state and each anchor's latest available link period; these links are not proof of presence in the current complete snapshot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_by | No | ||
| to_milestone | No | actual_construction_end | |
| from_milestone | No | actual_design_start |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stats | No | ||
| groups | No | ||
| n_projects | Yes | ||
| provenance | Yes | ||
| interpretation_rules | Yes | ||
| excluded_missing_dates | Yes |