Housing code violations by community district in 2017, New York City
Housing code violations (per 1,000 privately owned rental units) in 2017, New York City

Source: American Community Survey (accessed via American Fact Finder)
Interpretation of NYC example
Units with serious housing code violations were concentrated in neighborhoods in the Bronx and southern Brooklyn.
How to construct
This data is downloaded CoreData.nyc. The data originally is from the New York City Department of Housing Preservation and Development at the building level. There is no national source for this data.
Figure notes
Data are shown for community districts in New York City. Community districts are meaningful neighborhood definitions in New York City. Each locality may wish to use whatever neighborhood definition is most appropriate.
See also:
Residential units in the 100- or 500-year floodplain in 2016, New York City
Number of small units and households in 2016, New York City
Age distribution of the housing stock in 2016, New York City