A Python workflow that turns public property records into an organized and indexable list of business leads.
 The Python tool collects public property records through ArcGIS REST and Socrata, checks incoming data before it is used, standardizes owner names, and groups business-owned properties into portfolios. Across approximately 486,000 properties in 10 cities, it narrows approximately 414,000 owners to roughly 23,500 business and conglomerate portfolios for review. ## How it works ```mermaid flowchart TB A[Public property records] --> B[Check incoming data] B --> C[Classify owners into 9 tiers] C --> D[Group properties by owner] D --> E[Research shortlisted businesses] E --> F[Search and review portfolios] ``` - Each incoming feed is checked before it replaces earlier data. A failed or empty pull keeps the last good copy in place and reports how to resume. - Owner names pass through nine ordered categories; first match wins. The rules require a real business signal instead of treating an ampersand alone as a company name, and keep trusts in a review list rather than dropping them. - Spelling variants such as "HOLDINGS, L.L.C." and "HOLDINGS LLC" are grouped together. Duplicate city/parcel IDs are removed, and each portfolio shows property count, cities, and assessed value. - For shortlisted companies, I review state business filings for entity and officer details, keeping the result connected to its public source. - The dashboard runs only on the local machine, validates request origins, and requires a CSRF token before accepting changes to block cross-site writes. ## Selected code | File | What it shows | |---|---| | [leads/classify.py](leads/classify.py) | Ordered owner rules and the distinction between couple names and small businesses. | | [leads/portfolio.py](leads/portfolio.py) | Groups spelling variants, removes duplicate city/parcel IDs, calculates totals, and keeps trusts in a review list. | | [leads/local_server.py](leads/local_server.py) | Loopback binding, Host and Origin validation, CSRF-protected writes, no CORS, and strict CSP. | | [leads/feed_guard.py](leads/feed_guard.py) | Minimum-row validation and temporary-file replacement that preserves the last good cache. | | [tests/](tests/) | 58 offline tests: tiering edge cases, portfolio totals, feed failures, and attacks on the local server. | | [tools/make_demo_corpus.py](tools/make_demo_corpus.py) | Builds the demo data set with the same classifier and portfolio code. |