Ten collections describing property, zoning, vacancy, and affordable housing in Philadelphia, mirrored from the City of Philadelphia's ArcGIS services via OpenDataPhilly.
Guidance for AI agents and LLMs working with this catalog.
Ten collections describing property, zoning, vacancy, and affordable housing in Philadelphia, mirrored from the City of Philadelphia's ArcGIS services via OpenDataPhilly. Together they answer questions about what exists on a parcel, what the code permits there, whether the city believes it is empty, and what publicly funded housing has been built.
Every collection is GeoParquet in EPSG:3857 (Web Mercator) with a PMTiles
rendering alongside it. One collection, zoning_descriptions, is a lookup
table with no geometry.
Each collection has its own AGENTS.md with schema notes and worked queries.
Read any collection directly over HTTP with DuckDB. Use data.source.coop for
byte fetches; source.coop serves the human-readable pages.
Working locally is faster for repeated analysis:
DuckDB's spatial extension reads the geometry column natively. Do not wrap it
in ST_GeomFromWKB, which fails with a binder error because the column is
already a GEOMETRY:
Coordinates are EPSG:3857 metres, so ST_Area returns square metres distorted
by latitude. At Philadelphia's latitude the scale factor is about 1.3, meaning
Web Mercator areas run roughly 1.7x larger than ground truth. Reproject to
EPSG:2272 (Pennsylvania South, US survey feet) for measurements that matter.
Two joins are attested and verified against the published data.
Zoning codes to their meanings. 29,205 of 29,205 rows match:
Vacancy to parcels, by address. 27,688 of 28,737 rows match (96%):
Identifier columns do not join across collections, which is worth stating
plainly because their names suggest otherwise. opa_id in the vacancy
collections is an Office of Property Assessment account number and matches
nothing in dor_parcel.pin, a Department of Records parcel identifier: the
join returns zero rows. parcel_id_num in li_building_footprints carries
parcel_id_source = 'PWD', a Water Department identifier, and likewise does
not match. Join on normalized address, or join spatially.
Spatially, when no shared key exists. Intersect a centroid against the containing polygon rather than polygon-to-polygon, which is both faster and free of edge-touching false positives:
This returns a real result: District 5 holds 9,178 vacant parcels against 268 in District 10.
The vacancy collections also carry councildistrict and zoningbasedistrict
as plain columns, so aggregating them by district needs no spatial join at all.
Where is vacant land zoned for housing? 39,411 vacant parcels sit on residentially zoned land:
Four quirks account for most wrong answers against this catalog.
Land use descriptions are mostly unusable. 515,369 of 559,077 rows (92%)
store a bare digit in c_dig1desc rather than a label. Read the numeric code
columns and map them yourself; see land_use/AGENTS.md.
Vacancy ranks are repeating decimals. The stored values are 0.5,
0.6666666700000001, 0.8333333300000001, and 1.0. Comparing with = 0.67
silently matches nothing. Use ranges.
Affordable housing types are semicolon-joined. project_type holds values
like Rental;Special Needs;Mixed Use. Grouping on the raw column treats each
combination as its own category, undercounting rental projects at 242 instead
of 262. Split on ; first.
Null geometry exists. 37 parcels and 25 affordable housing projects have attributes but no geometry, and they sort to the end of the file.
Data is published by the City of Philadelphia under the City of Philadelphia License, which reserves rights rather than granting them. The terms state the city "reserves all rights in the database and any data contained therein" and that use "does not constitute a transfer of, nor does the end user receive, any title or interest in the database". Data is offered "as is" and without warranty of any kind.
No SPDX identifier applies, and no explicit redistribution grant accompanies the datasets. Read the city's terms before redistributing or using this data commercially.
| 195 |
| Polygon |
| What extra rules apply here? |
zoning_descriptions | 39 | None | What does this zoning code mean? |
council_districts_2024 | 10 | Polygon | Who represents this area? |