project_portfolio
Filter NYC capital projects by category, borough, agency, or lifecycle status, then list them by nearest completion with schedule and budget summaries.
Instructions
Cross-section listing of projects (PIDs): filter by category (see
list_categories), borough, community_board, lifecycle_status
('in_progress'|'completed'|'cancelled'), and/or agency (+agency_role lens);
rows ordered by nearest completion date (NULLs last). Each row carries schedule
state + attributed_budget; summary covers the FULL filtered set and reports
BOTH budget bases (per-PID attributed vs deduped line_budget_total). Borough
matches the PID's boroughs LIST, so multi-borough projects are found by any of
their boroughs. Rows carry forecast_past_due — a forecast already past as of
the observation period (never true for completed/cancelled). population_scope
'latest_known' (default) uses each PID's own latest row; 'current' uses values at
the selected complete snapshot. Rows expose reporting_period and current-snapshot
presence. category_scope 'current' uses current links; 'all_history' includes
former category links.
Interpretation rules:
[relationships] "Project" is ambiguous: PID identifies a SCHEDULE; FMS ID identifies a BUDGET. They are MANY-TO-MANY: a budget can fund several PIDs and a PID can have several budgets. LIST ALL linked counterparts; never silently select one. One linked counterpart does not establish a 1:1 relationship in the reverse direction. A budget without a PID is normal before Design and for lines that do not require schedules; absence alone does not establish missing data. Source-only schedules can also lack dashboard funding links.
[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.
[presence] Presence in a selected reporting snapshot means reportable at that period. There is no separate active flag. Historical presence or a latest-known row does not prove presence in the current complete snapshot. A completed project can retain an open budget line for years; presence does not mean construction is in progress.
[agency_roles] Agency attribution is role-aware: an agency's projects mean its sponsor (owner) view, except DDC/DCAS/EDC default to managing (builder). State the returned agency_scope. managing_agency is the executor on schedules and the budget-holder on budgets; a budget-only holder is not a schedule executor. list_agencies exposes is_schedule_executor. For sponsor-scoped budget totals, use a semi-join to fms_sponsor; a value-bearing join can multiply lines. Co-owner totals can overlap and must not be added together.
[categories] Classify with the curated category_dim, not project-name searches: specific ten-year labels/FMS prefixes precede sponsor routing, then generic facility keywords and Other. Categories key on (managing_agency, fms_id); institution owner rules can use all-history ownership. Schedule category_scope='current' uses each PID's current funding links; 'all_history' includes former links. A PID can count in multiple categories, so schedule category counts are non-additive; each budget line has one category.
[funding_totals] attributed_budget counts a funding line fully on every PID it funds; it is not an allocated share or an independent project cost. Summing it across PIDs can double-count shared funding. For the portfolio's distinct funding total use summary.line_budget_total, which counts each (managing_agency, fms_id) once. State which budget basis is reported.
[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.
[location] Location belongs to the BUDGET LINE, represented by fms_location. A PID inherits its funding-line boroughs: one specific borough takes precedence over Citywide, multiple specific boroughs yield 'Multiple', and only Citywide lines yield 'Citywide'. Preserve the boroughs list when several boroughs apply.
[signed_values] Report neutral, SIGNED changes: "moved 45 days later" or "budget decreased $2M". Do not echo loaded terms in the answer. "slippage" means positive schedule change and "overrun" means positive budget growth; neither includes the decreasing side. Preserve the returned direction and metric basis.
[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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| agency | No | ||
| borough | No | ||
| category | No | ||
| agency_role | No | auto | |
| category_scope | No | current | |
| community_board | No | ||
| lifecycle_status | No | ||
| population_scope | No | latest_known |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| notes | Yes | ||
| summary | Yes | ||
| truncated | Yes | ||
| provenance | Yes | ||
| interpretation_rules | Yes |