codeforkansascity / Fair-Foreclosures

Vacant Property Data AKA Fair Market Foreclosure bank owned properties,upkeep and rate of foreclosure
MIT License
2 stars 2 forks source link

Develop script to identify code violations per property during a given period #12

Open buzwells opened 6 years ago

buzwells commented 6 years ago

We are planning to gather code violation information for REO properties during the period for which the lender retains the property. At the moment, while we are working on generating lists of REO properties for a lender along with the retention period in a way that includes the APN and/or KIVA PIN of the property, we can prepare by developing a script that, given a list of properties and periods (including periods that are active - i.e., that have a start date but not an end ate) will pull the following information:

moldybeats commented 6 years ago

I just committed a violations_per_property.py script that reads in a list of locations and date ranges and outputs some stats about the violations for each property. It uses a PropertyViolation class I created that hopefully should serve as a good base for working with the Property Violation API in this & other projects.

@buzwells - I thought you had mentioned you had done some work on estimating the severity of different violation codes, but I couldn't find it in the CodeForKC repos. Is that something we know how to do already, or should I take my best shot at grouping codes by severity?

buzwells commented 6 years ago

Yes, we looked at how to group codes a couple of years ago in the property violations project. There were a couple of aspects to that. One aspect was, how do we group them just for the initial count. Using the codes or descriptions produced too many categories for a broad overview, although it was useful for a detailed dive into particulars. So, I built a list of ordinance chapters and sections, along with the associated titles of those sections, to give us a way of classifying the violations that was at least roughly consistent with their legal classifications - https://github.com/codeforkansascity/Property-Violations-Settlement/blob/master/data/ordinanceTitles.csv. Because each violation contains the chapter and section in the ordinance number field, we just linked in the title and grouped on that.

Even more broadly, you can break down violations into two categories: nuisance violations and property violations. http://kcmo.gov/neighborhoods/neighborhood-preservation/common-code-violations/. These correspond roughly to Chapters 48 and 56 of the ordinances - https://library.municode.com/mo/kansas_city/codes/code_of_ordinances - though there are exceptions documented in the R scripts for the project in the above paragraph. So, theorizing that property violations represented a deeper level of disrepair and expense, one recognized by the greater cure period allotted, we built a simple ratio to represent the proportion of violations that were property violations.

This was all deliberately experimental. I wouldn't say there was a broad consensus on either of these approaches. And, if we were interested in this, I would want to go back and double check the ordinance titles, as my recollection is that I compressed them a bit.