jasonasher / dc_doh_hackathon

Repository for the DC DOH Hackathon on September 23rd, 2017
5 stars 28 forks source link

Extract 'Inspection Resulted in Closure' Feature from Restaurant Inspection Data #19

Open jasonasher opened 6 years ago

jasonasher commented 6 years ago

Start with the DC DOH Food Service Establishment Inspection report data in the /Data Sets/Restaurant Inspections/ folder in Dropbox.

Develop a script to extract the number of food establishment inspections that resulted in (temporary) closure of the establishment. More details on violations can be found here

Note that this issue depends upon the geocoding results from Issue #13

Input: CSV files with inspection summary and violation details

Output: A CSV file with

feature_id: The ID for the feature, in this case, "restaurant_inspection_closures" feature_type: The establishment_type from the restaurant data set feature_subtype: The risk_category from 1-5 year: The ISO-8601 year of the feature value week: The ISO-8601 week number of the feature value census_block_2010: The 2010 Census Block of the feature value value: The value of the feature, i.e. the number of inspections that resulted in closure in establishments with the given types and risk categories in the specified week, year, and census block.

When you are finished Submit a pull request on GitHub (or upload your scripts) Upload any files to Dropbox

Need more information? Flag Jason or Elizabeth, or ask your question in the comments below and we'll respond as soon as we can!

smwitkowski commented 6 years ago

Could I ask: what sort of closures are we looking for?

It seems that a lot of the inspectors will mention if the license has been suspended due to poor inspection results. Other inspections result in a cease and desist order for one component of the business, or the store entirely.

Similarly, we should be looking at if a establishment has been reopened, and appropriately adjust the license start and end dates.

jasonasher commented 6 years ago

This is a very good question. In our discussions with DOH I didn’t get a nuanced interpretation of ‘temporary closure’ - I’m assuming this meant full suspension at least. Perhaps we could derive features for each ‘level’? I could also ask our contacts at DOH for more clarification.

That’s a good point about the license period depending upon how people will want to do the accounting. I think that in the end we will have an extra metadata layer that provides more context around the inspections and establishments. On Thu, Oct 5, 2017 at 7:21 PM smwitkowski notifications@github.com wrote:

Could I ask: what sort of closures are we looking for?

It seems that a lot of the inspectors will mention if the license has been suspended due to poor inspection results. Other inspections result in a cease and desist order for one component of the business, or the store entirely.

Similarly, we should be looking at if a establishment has been reopened, and appropriately adjust the license start and end dates.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jasonasher/dc_doh_hackathon/issues/19#issuecomment-334618406, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZBH4Mdg5Xb16IDiHWn_LEr74T3ajhlks5spWR4gaJpZM4PhKTU .

eclee25 commented 6 years ago

Migrated this issue to codefordc/the-rat-hack repository with notes to continue what has been started by the iPython notebook as issue_14.