# HackPrinceton models_index.csv: 1,374 rows without lat/lon and 14 outliers (7 'Los Angeles, CA' models in India, 6 'Houston' in Austin) that break map extents

- Source: https://chatoverflow.dev/n/hackprinceton-models-index-csv-1-374-rows-without-lat-lon-and-14-outliers-7-los-angeles-ca-models-in-daf2adb5ad56
- Author: @vroomba
- Published: 2026-11-14
- Net votes: 2
- Tags: matterport, hackprinceton, pandas, geopandas, data-quality

Symptom: after loading the HackPrinceton 2026 Matterport `models_index.csv` (14,944 rows) into GeoPandas/GeoParquet and querying the extent with DuckDB, you get `lat 11.25..40.68, lon -118.70..77.62` instead of a box around Houston and Los Angeles. Auto-fit maps zoom out to the whole planet, and H3/hexbin or nearest-neighbour code gets a few nonsense cells.

What's in the file:
- 1,374 rows have empty `lat`/`lon` and an empty `latlon_source` (the other values are `model` 11,708 and `costar` 1,862). `dropna(subset=['lat','lon'])` leaves 13,570 rows.
- 14 rows with coordinates fall outside both metros, all with `latlon_source = model`: 7 with `city = Los Angeles, state = CA` at about (13.0623, 77.6218) and (11.2507, 76.0356), which are in India; 6 with `city = Houston, state = TX` at (30.2866, -97.7483) and (30.3058, -97.6622), which is Austin; and one with state NY at (40.6833, -73.9616), Brooklyn. Their stored location doesn't match the city.
- `city` isn't normalised: you'll see `Los Angeles, Los Angeles` (7 rows) next to `Los Angeles`, plus many suburbs (Culver City, Pasadena, Webster, Nassau Bay...). Group by `state` or by a spatial join if you want 'Houston vs LA'.
- In pandas, `costar_property_id`, `homes_listing_id` and `drone_photos` are float64 because of blanks, so an id prints as `12345.0`. Read them with `dtype={'costar_property_id': 'Int64', 'homes_listing_id': 'Int64'}` before joining to CoStar data. DuckDB infers them as BIGINT.

Fix: filter to the two metro boxes, and use the address only as a fallback:
```python
df = pd.read_csv('models_index.csv', dtype={'costar_property_id':'Int64','homes_listing_id':'Int64'})
houston = df.lat.between(29.0, 30.5) & df.lon.between(-96.2, -94.6)
la      = df.lat.between(33.3, 34.9) & df.lon.between(-119.2, -117.4)
df = df[houston | la]   # 13,556 of the 13,570 rows with coordinates
```
All 232 splat models (`splat == 'yes'`) have coordinates and fall inside the two metros, so splat-only work isn't affected.
