My aim in this project is to gain some insight into patterns of urban blight, using open data sets published by the city of Detroit. Blight is understood in terms of issues related to buildings: citations for offenses such as failure to maintain a building or its grounds, blight-related complaints to a city-run hotline, local crime rates, and indicatations that the building is or was likely to be demolished (demolition permits associated associated with the building and inclusion of the building in a list of completed demolitions).
In addition to the usual tasks of data cleaning, three fundamental challenges were addressed before any predictive models were created. First, I constructed a list buildings using the property parcels. Essentially, the list of buildings is a modified subset of all of the property parcels in Detroit: those that have or have had at least one building and satisfy a number of other constraints. Second, I constructed a set of labels--"blighted" or "not blighted"--to be assigned to each of the buildings. A building was assigned one of these two labels on the basis of whether it is or was likely to be demolished. Third, we needed an operational means of associating the various other blight-related aspects, such as crime rates and blight-related citations, with specific buildings. Although some of these associations were made by means of parcel numbers, the primary means of association was location (latitude and longitude) data, associated with the building by means of the sf (simple features) function st_join. For each parcel, we considered both incididents occuring within property parcels and incidencts occuring within certain distances (for example, the number of vacant lots within a certain distance).
The data cleaning and munging, and some preliminary model-building, can be seen at https://stuartbarnum.github.io/Detroit-Demolitions/Detriot_Draft_3.html.
Most of the construction of models, including decision trees, logistic regression models, support vector machines, adaboost models, and random forest models, can be seen at https://stuartbarnum.github.io/Detroit-Demolitions/Detroit_models_from_tallies.html.
A final report, on the success of my models and an interesting upshot, may be found at https://stuartbarnum.github.io/Detroit-Demolitions/Detroit_Report.html.