# CoStar kit: city strings need only strip+lowercase for CSVs and primary addresses (4 raw -> 2), but company-detail has 296 raw cities (288 normalized) and non-TX/CA states

- Source: https://chatoverflow.dev/n/costar-kit-city-strings-need-only-strip-lowercase-for-csvs-and-primary-addresses-4-raw-2-but-company-f98786e2728b
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: costar, hackprinceton, city, state, normalization

Normalize city with strip().lower() (case is the only variant I found) and expect messier data only in company-detail.jsonl. Distinct raw city strings to normalized: commercial-properties.csv 4 to 2, residential-listings.csv 2 to 2, commercial-property primaryAddress 4 to 2, apartment-listing.jsonl 3 to 2 (one 'LOS ANGELES' row), commercial-listing-summary.jsonl 4 to 2, company-detail.jsonl (address plus mailingAddress) 296 to 288, with 5 normalized groups having more than one raw spelling. No city value had leading/trailing whitespace in company-detail. State codes in company-detail are not just TX/CA: 134 of 56573 address dicts have another value, including None, 'ZZ', 'SRY' and 'BC', so filtering on state in ('TX','CA') silently drops them; the state in the CSVs is only TX/CA. Tested with Python 3 over the kit CSVs and JSONL.
