Busabase
Busabase 是一款開源 (MIT) 資料庫與 AI agent 工作空間——將數據、文件、技能與應用程式整合於一處。您可以選擇本地運行、在網路內部進行自我託管,或使用 Busabase Cloud。
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Building-risk ontology from NYC open data: entity resolution to BIN/BBL, explainable risk score with a 2024 backtest, and a Streamlit inspector app (Manhattan)
翻譯準備中
正在載入完整 README。
檢視完整 README ↗Which Manhattan buildings should an inspector visit first, and why?
NYC publishes building data from several agencies (DOB, HPD, DCP), and each keys it differently. This project links eight of those datasets into one ontology of landlords, owners, lots, buildings and events. It scores every lot's risk with an explainable model, backtests that score on a year it never saw, and puts the result in front of a planner as a map, a building page and a work queue whose actions are written back.
| Data | 1.28M events from 8 NYC Open Data sources, Manhattan, 2020 onward |
| Entity resolution | 95–99.7% of records matched to a tax lot (BBL), 89–100% to a building (BIN) |
| Ontology | LandlordPortfolio / ManagingAgent / Owner → Lot → Building → Event, plus RiskAssessment and InspectionTask (writeback) |
| Landlords | HPD registrations link single-building LLCs to the people behind them: 27.8k lots in 13k portfolios (largest: 234 lots) |
| Backtest (2024, unseen) | Top 100 lots: 91% had 10+ new class C housing violations (25× the base rate); 32% had a serious hazard (20×) |
| App | Risk map, building 360, inspector queue with create / assign / record-outcome actions. Streamlit locally; live browser version on Vercel |
Live tool: nyc-building-risk.vercel.app/app · Project page: nyc-building-risk.vercel.app · Write-up: docs/writeup.md · Backtest: reports/backtest.md
flowchart LR
subgraph Sources [NYC Open Data]
P[PLUTO] --- F[Footprints]
D[DOB violations] --- C[DOB complaints]
H[HPD violations] --- S[Facade filings]
G[HPD registrations] --- K[Registration contacts]
end
Sources -->|download.sh| R[(raw CSVs)]
R -->|build_db.py: clean + resolve to BIN/BBL| DB[(DuckDB)]
DB -->|build_ontology.py| O[Ontology: objects, links,<br/>point-in-time features]
O -->|score.py: fit 2023, test 2024| RA[RiskAssessment]
RA --> APP[Streamlit app]
APP -->|actions| T[(InspectionTask)]
1000000) and junk dates are handled. The result is reported per source
in match_report.lot_features_at(date), a table macro that counts only events before the date. One
query therefore produces both backtest features and today's features, with nothing from the
future leaking in.
erDiagram
LANDLORD_PORTFOLIO ||--o{ LOT : controls
MANAGING_AGENT ||--o{ LOT : manages
OWNER ||--o{ LOT : owns
LOT ||--o{ BUILDING : has
LOT ||--o{ EVENT : "violations, complaints, filings"
BUILDING ||--o{ EVENT : at
LOT ||--o{ RISK_ASSESSMENT : scored
RISK_ASSESSMENT ||--o{ INSPECTION_TASK : creates
Lots were scored as of 2024-01-01 using only earlier events and compared with what happened in 2024. Learned models were fit on 2023.
| Outcome (base rate) | v3 (this score) | v2 | Gradient boosting | Naive "same as last year" | Hand-weighted v1 |
|---|---|---|---|---|---|
| Housing distress: 10+ new class C (3.6%) | 91% · AP 0.572 | 92% · 0.563 | 91% · 0.570 | 92% · 0.510 | 59% · 0.367 |
| Serious hazard: DOB hazard or UNSAFE facade (1.6%) | 32% · AP 0.146 | 34% · 0.143 | 41% · 0.208 | 50% · 0.138 | 21% · 0.063 |
The table shows precision in the top 100 and average precision (AP) over the full ranking. Three findings worth stating plainly:
Building 360: score, drivers, event timeline, lot facts, who controls it (landlord portfolio with their other buildings' scores, managing agent), create task.
以上為 README 的開頭部分。其餘內容請閱讀原文。 檢視完整 README ↗