[object Object]

← back to Commercialrealestate

CRCP lending layer: wire Lending into CRCP nav, mark NCUA/HMDA/SBA live in source register, tidy hub

97887fa5b1cfd2fb2fe36e60722e756d0663d106 · 2026-07-31 11:03:57 -0700 · Steve Abrams

All 5 datasets verified integrated on one server (FDIC 95, NCUA 104, HMDA 745, SBA 378, LO gated-0), no regression. TK-10090.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 97887fa5b1cfd2fb2fe36e60722e756d0663d106
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Fri Jul 31 11:03:57 2026 -0700

    CRCP lending layer: wire Lending into CRCP nav, mark NCUA/HMDA/SBA live in source register, tidy hub
    
    All 5 datasets verified integrated on one server (FDIC 95, NCUA 104, HMDA 745, SBA 378, LO gated-0), no regression. TK-10090.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 docs/PUBLIC_SOURCE_REGISTER.md | 11 +++++++----
 public/crcp.html               |  2 +-
 public/lending.html            |  1 -
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/docs/PUBLIC_SOURCE_REGISTER.md b/docs/PUBLIC_SOURCE_REGISTER.md
index ddd42c5..751ab09 100644
--- a/docs/PUBLIC_SOURCE_REGISTER.md
+++ b/docs/PUBLIC_SOURCE_REGISTER.md
@@ -7,9 +7,9 @@ Scope is Los Angeles County, CA (the CRCP footprint). All `$0`, public, unauthen
 |---|---|---|---|---|---|---|
 | `lenders` | FDIC BankFind Suite | `https://api.fdic.gov/banks/institutions` + `/banks/locations` | official_api | No | `scripts/fetch-fdic-lenders.js` | ✅ live (95 banks / 1,414 LA branches) |
 | `branches` | FDIC BankFind Suite | `https://api.fdic.gov/banks/locations` | official_api | No | `scripts/fetch-fdic-lenders.js` | ✅ live |
-| `credit-unions` | NCUA | NCUA Research/Quarterly Call Report data files | official_bulk_download | No | `scripts/fetch-ncua-credit-unions.js` | ⏳ building |
-| `market` | CFPB / FFIEC HMDA | `https://ffiec.cfpb.gov/v2/data-browser-api/...` | official_api | No (aggregate only) | `scripts/fetch-hmda-market.js` | ⏳ building |
-| `sba-lenders` | U.S. SBA | SBA 7(a) & 504 FOIA datasets (data.sba.gov / CSV) | official_bulk_download | No | `scripts/fetch-sba-lenders.js` | ⏳ building |
+| `credit-unions` | NCUA | Quarterly Call Report ZIP (`ncua.gov/files/publications/analysis/call-report-data-2026-03.zip`) | official_bulk_download | No | `scripts/fetch-ncua-credit-unions.js` | ✅ live (104 LA-County credit unions, 2026-Q1) |
+| `market` | CFPB / FFIEC HMDA | `https://ffiec.cfpb.gov/v2/data-browser-api/view/csv?years=2023&states=CA&counties=06037&actions_taken=1` | official_api | No (aggregate only) | `scripts/fetch-hmda-market.js` | ✅ live (745 lenders, 2023) |
+| `sba-lenders` | U.S. SBA | 7(a)/504 FOIA CSVs (`data.sba.gov/dataset/7a-504-foia`) | official_bulk_download | No | `scripts/fetch-sba-lenders.js` | ✅ live (378 lenders, FY2010–2026) |
 | `loan-officers` | NMLS Consumer Access / CA DFPI | `https://www.nmlsconsumeraccess.org/` (lookup) | manual_review_only | Yes | — (authorized entry only) | 🔒 gated, ships empty |
 
 ## Notes
@@ -17,7 +17,10 @@ Scope is Los Angeles County, CA (the CRCP footprint). All `$0`, public, unauthen
   it). Institutions filtered to those with ≥1 branch in LA County; joined to institution metadata by CERT.
   Pagination captures `total` from the first page only (a later page occasionally omits it).
 - **HMDA** — institution-level originations by lender + geography for LA County (FIPS 06037). Never
-  represented as individual production (see `DATA_POLICY.md` §5).
+  represented as individual production (see `DATA_POLICY.md` §5). **Gotcha:** the CFPB `/view/aggregations`
+  endpoint silently IGNORES the `counties` filter (returns CA-statewide totals) — use the `/view/csv`
+  record route and aggregate by LEI locally (that route honors the county filter). Only `lei` + `loan_amount`
+  are read from records — never any demographic/borrower field.
 - **NCUA** — no clean REST API like FDIC; the public quarterly Call Report / active-institution files are
   the permitted bulk route. Scope to credit unions with an LA-County office/branch.
 - **SBA** — 7(a)/504 loan-level FOIA data is large; aggregate to lender + volume for the LA market.
diff --git a/public/crcp.html b/public/crcp.html
index 0730bf8..f766dae 100644
--- a/public/crcp.html
+++ b/public/crcp.html
@@ -93,7 +93,7 @@
   <h1><b>CRCP</b> · Commercial Real Estate Control Panel</h1>
   <span class="live"><span class="pulse"></span><span id="livetxt">live</span></span>
   <nav class="nav">
-    <a href="/">Properties</a><a href="/mls.html">📋 Listings</a><a href="/broker-grid.html">👥 Brokers grid</a><a href="/map.html">Map</a><a href="/deals.html">Deals</a><a href="/rent-rolls.html">Rent Rolls</a><a href="/brokers.html">Mind-map</a><a href="/graphics.html">Graphics</a><a href="/condos.html">Condos</a><a href="/fha-loans.html">FHA Loans</a>
+    <a href="/">Properties</a><a href="/mls.html">📋 Listings</a><a href="/broker-grid.html">👥 Brokers grid</a><a href="/map.html">Map</a><a href="/deals.html">Deals</a><a href="/rent-rolls.html">Rent Rolls</a><a href="/brokers.html">Mind-map</a><a href="/graphics.html">Graphics</a><a href="/condos.html">Condos</a><a href="/fha-loans.html">FHA Loans</a><a href="/lending.html">💰 Lending</a>
     <span class="denslider" title="chip / tile density">⊞ <input type="range" id="dens" min="120" max="300" value="150" aria-label="Tile density"></span>
     <button class="expandall" id="expandall">Expand all ▾</button>
   </nav>
diff --git a/public/lending.html b/public/lending.html
index c505a02..4db30d5 100644
--- a/public/lending.html
+++ b/public/lending.html
@@ -89,7 +89,6 @@ async function counts(){
     const ds = el.dataset.ds;
     try{
       const d = await (await fetch('/api/lending/'+ds, H)).json();
-      const key = { lenders:'lenders','credit-unions':'credit_units', market:'market','sba-lenders':'lenders','loan-officers':'officers' }[ds];
       const arr = d.credit_unions || d.lenders || d.market || d.officers || [];
       const n = el.querySelector('.n'); if(n) n.textContent = (d.meta && d.meta.count!=null ? d.meta.count : arr.length).toLocaleString();
       if(ds==='lenders'){ const b=el.querySelector('.b'); if(b){ let br=0; try{ br=(await (await fetch('/api/lending/branches',H)).json()).meta.count; }catch(e){} b.textContent=br.toLocaleString(); } }

← 792f070 CRCP lending layer: SBA lenders dataset (TK-10090)  ·  back to Commercialrealestate  ·  crcp Panel 7: add 6/12/24-month window toggle (persisted, re ba57a25 →