Data sources
City & County of San Francisco
311 Cases — Residential Building
dataset: vw6y-z8j6
311 service requests filtered to residential-building housing complaints. Both the 'Residential Building Request' and later 'Residential Building' service names are included, covering roughly 2010 to today. Primary dataset behind the Housing Conditions risk level and neighborhood percentile.
SF Dept. of Building Inspection
DBI Notices of Violation
dataset: nbtm-fbw5
Notices of Violation issued by DBI after inspection, grouped by code section. A status of 'active' flags a violation that is still unresolved — the open-violations count and the Building Safety risk both come from this dataset.
City & County of San Francisco
Parcels — Active and Retired
dataset: acdm-wktn
Parcel polygons with their Analysis Neighborhood and centroid. Complaints and violations are grouped by parcel (mapblklot), and the Analysis Neighborhood defines each building's peer group for percentile ranking.
City & County of San Francisco
Building Footprints
dataset: ynuv-fyni
Building-footprint polygons with area and median height. Aggregated to the parcel and used to estimate building scale for size-normalized comparisons.
City & County of San Francisco
Enterprise Addressing System (EAS)
dataset: ramy-di5m
Every registered SF address. Used as the address-search corpus — including buildings with zero complaints, so a clean 'no records' result is trustworthy — and as the crosswalk that resolves an address to its parcel.
Unit of analysis
San Francisco records are analyzed at the parcel level (the mapblklotlot identifier), and condominium sub-lots are folded back onto their physical lot so a single building isn't split into dozens of units. About 6 of every 7 parcels contain exactly one building; the remaining ~1 in 7 hold more than one structure and are grouped together as a single entry.
311 complaint severity
Each 311 residential-building complaint is assigned a severity tier from its subtype (e.g. heat_lack_of_heat), using weights that match the tiers used on the New York pages. Unknown or unlisted subtypes default to the minor tier.
No heat or hot water, unsafe lead-paint work, blocked exits, fire hazards, hazardous electrical, missing/broken smoke detectors, fire-alarm & sprinkler failures
Rodent, insect & bed-bug infestations, mold and mildew, broken or leaking plumbing, broken doors & windows, inadequate ventilation, defective decks/stairs/handrails
General maintenance, peeling paint, garbage receptacles, clutter, non-hazardous electrical, second-hand smoke, noise from building systems
A handful of regulatory subtypes — illegal construction / work beyond permit scope, illegal guest-room conversions, and visitor-policy violations — are recorded with a weight of 0. They are permitting and lease-policy matters, not habitability hazards, so they do not contribute to the risk score.
DBI violation severity
DBI Notices of Violation are classified by their code-section category into three tiers, using the same 15 / 8 / 3 weights as the complaint tiers. The weighted violation sum uses the same recency multipliers as the complaint sum (see Building size normalization below), so recent serious violations weigh more than old minor ones.
Fire section, smoke-detection section, and lead section notices
Building (structural), plumbing & electrical, interior surfaces, sanitation, and security-requirements sections
Other section, Hotel Conversion Ordinance, and notices with no code section recorded
Building size normalization
A large apartment complex will naturally accumulate more complaints than a small two-flat. Raw counts penalize larger buildings unfairly. To make comparisons meaningful, all weighted sums are divided by an estimate of building scale before peer ranking. Since we don't have the exact unit count for each building, size is estimated from its footprint and height.
Estimated scale
Footprint area (m²) from the building polygon multiplied by median building height (m), aggregated across all footprints on the parcel. This approximates total building volume without needing unit counts.
Complaint density
Weighted complaint or violation sum divided by estimated scale, then scaled up for readability. A small building and a large building with proportional histories get the same density.
Recency multiplier
Applied to both datasets (311 complaints and DBI violations). Records with no date, or older than 10 years, contribute nothing to the weighted sum.
Size-normalized percentile
Each building's density is ranked via PERCENT_RANK() within its Analysis Neighborhood, separately for 311 complaints and DBI violations. Buildings without footprint or height data fall back to their raw weighted sum for ranking. A density percentile of 20 means the building has fewer weighted complaints per unit of scale than 80% of its neighbors.
Risk level
A building's neighborhood percentile is mapped to a risk level label shown on building pages and the map. The label reflects how the building compares to peers within the same Analysis Neighborhood, not citywide. Housing Conditions (311) and Building Safety (DBI) each get their own risk level; on the map, a building's dot uses the more severe of the two.
Special cases
Too few records
SF buildings carry far fewer records than NYC ones, so a low floor keeps the percentile meaningful. A building with fewer than 2 total 311 complaints, or fewer than 3 total violations, is shown as “Very low” rather than ranked.
No neighborhood
A parcel that can't be placed in an Analysis Neighborhood has no peer group to rank against, so it also falls back to “Very low” rather than receiving a percentile.
Neighborhood comparisons
Neighborhood percentile
Percentile comparisons are neighborhood-relative, not absolute. A building is compared only to peers in its own Analysis Neighborhood. Within each neighborhood, buildings are ranked by weighted complaint density from lowest to highest. A building at the 80th percentile has higher weighted complaint density than 80% of its neighbors, meaning it received relatively more or more serious reports. Percentiles are computed independently per neighborhood, so the same density may rank high in one and low in another.
Trend
The 311 complaint trend compares the average annual rate of the last 2 years against the 3 years before that. A building is “worsening” if the recent rate exceeds the prior rate by more than 1 complaint per year, and “improving” if it is more than 1 lower. The trend arrow is shown for housing complaints only.
Reported vs. unresolved
311 cases in San Francisco auto-close once they're referred on, so there is no meaningful “open complaint” count — the 311 domain measures what tenants reported (volume, category, recency, trend). The unresolvedsignal lives in the DBI domain instead: open violations are Notices of Violation whose status is still “active.”
Leaderboard
The San Francisco leaderboard ranks buildings by 311 complaint activity in the last 2 years, not all-time totals, so it reflects current conditions rather than accumulated history. Buildings need at least 5 total complaints (and at least 1 in the last 2 years) to appear.
Housing Conditions
Sorted by 311 residential-building complaints filed in the last 2 years. Each row also shows the building's open DBI violations (status = active) as a second column, so you can see reported activity and unresolved enforcement side by side.
Limitations
Complaint ≠ confirmed violation
311 cases are reports filed by the public; they are not confirmed findings. DBI Notices of Violation are issued after inspection and carry more weight. Scores reflect the full record of complaints and violations, not confirmed outcomes only.
Parcel grain
Records are grouped by parcel. About 1 in 7 SF parcels hold more than one building, and those structures are counted together as a single entry. A parcel is a close but imperfect stand-in for a single building.
Record depth
311 residential-building complaints begin around 2010. DBI Notice-of-Violation dates are floored at 1980 to drop corrupt values in the source. Anything filed before the record period, or never digitized, is not reflected.
Address matching
Each 311 case is matched to a parcel through its normalized EAS address, with a geographic point-in-parcel fallback for unmatched rows. Cases that match neither are excluded from scoring. DBI violations carry a block-and-lot key, so they join to a parcel directly.
Scale estimation
Building scale is estimated from footprint area and height. Buildings missing either value cannot be size-normalized and fall back to a raw weighted-sum ranking within their neighborhood. Scale is a proxy; it does not account for unit density or occupancy.
Sync frequency
New cases are pulled from DataSF weekly. DBI republishes its violations wholesale, so the weekly incremental pass catches newly-filed violations but can miss status changes (e.g. a violation being resolved) on older ones; a monthly full refresh re-pulls the entire violations dataset to true up open/closed status. Expect a lag of several days between a case being filed and it appearing here.
All data is sourced from DataSF (data.sfgov.org) and is in the public domain.