Skip to content

add CPP housing growth outputs by NTA and community district - #2582

Draft
damonmcc wants to merge 12 commits into
mainfrom
dm-cpp-kpdb
Draft

add CPP housing growth outputs by NTA and community district#2582
damonmcc wants to merge 12 commits into
mainfrom
dm-cpp-kpdb

Conversation

@damonmcc

@damonmcc damonmcc commented Aug 21, 2026

Copy link
Copy Markdown
Member

related to #2578
builds on this branch

New outputs

Two CSVs for the Capital Projects Portal, by NTA and community district, one row per geography.

Column What it is
units_2020_census 2020 Census count, as of April 1 2020
units_2020 units at the end of 2020: the census count plus the rest of that year
completed_units_2016_2025 net units completed over the past 10 years
completed_units_2021_2025 net units completed between units_2020 and units_2025
units_2025 units_2020 plus the line above
projected_completed_units_2026_2035 KPDB units phased within the next 10 years
projected_units_2035 units_2025 plus the line above

Year-labeled counts are as of the end of that year, so a project completed in 2025 counts toward 2025. Both completed_units_* columns are net of demolitions and lost units rather than gross completions.

Data corrections

  • Projects that match no boundary keep their unit measures. The fallback that assigns them to an intersecting geography only set the geography, proportion, and units_net, so about 1,300 projects per geography contributed nothing to any phasing total.
  • Units are split by largest remainder instead of rounding each geography's share on its own, so a project's parts sum to its total. NTA and CD now report the same citywide numbers, where they used to differ.
  • Hudson Square gets its corrected geometry (cherry-picked from KPDB SCA and MTA enhancements #2095). ZAP has P2012M0255 at 2.1 km² with its centroid about 6 km from where it belongs. The corrected shape is 0.2 km² and lands in MN0201 SoHo-Little Italy-Hudson Square.

Source data

  • ZAP moves from 20250303 to 20260817. DCP Applications used to stop at 2025-02-18 while DOB ran to 2026-01-20, so nothing filed in the previous 18 months was in KPDB at all.
  • Housing DB moves to 26Q2.
  • assert_project_and_dob_data_align warns when the two drift apart again.

Infrastructure

  • Output goes to edm-publishing through the standard publishing connector, landing in db-kpdb/build/<build> like every other product. Replaces a KPDB-specific upload.py that wrote datetime-stamped folders to edm-private.
  • Build inputs are dbt sources instead of schema-qualified strings, and zap_project_many_bbls and summary_record_phasing are dbt models now.
  • A README covering what KPDB is, how outputs get calculated, and what a record, cluster, and project are.

Notes

The phasing buckets are relative, not calendar dates: DOB phasing follows job status, so it moves every build, and shares that come from a source were written whenever that file was made.

units_2020_census is the only fixed number. Everything else moves with the dcp_housing version.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.57%. Comparing base (96e1b9f) to head (eb3ea2b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@damonmcc
damonmcc force-pushed the dm-cpp-kpdb branch 5 times, most recently from cbe8e69 to 9cd34c9 Compare August 24, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant