Chicago / food-inspections-evaluation

This repository contains the code to generate predictions of critical violations at food establishments in Chicago. It also contains the results of an evaluation of the effectiveness of those predictions.
http://chicago.github.io/food-inspections-evaluation/
Other
410 stars 130 forks source link

violations_dat.Rds does not have filtered inspections, but all inspects #82

Closed cash closed 8 years ago

cash commented 8 years ago

Looks like the filter_foodInspect function was added after the violations_dat.Rds file was created.

For example:

> inspections <- readRDS("food_inspections.Rds")
> violations <- readRDS("violation_dat.Rds")
> inspections[132,c("Inspection_ID", "Inspection_Type")]
    Inspection_ID Inspection_Type
132         58241        No Entry
> violations[132,]
    criticalCount seriousCount minorCount Inspection_ID
132             0            0          0         58241

A "No Entry" value would have been filtered out with the current code.

It's a little confusing to jump in following the README in CODE and get different results than what is in DATA.

geneorama commented 8 years ago

Yes, that is confusing, and it's pretty amazing to me that you noticed it and figured it out.

I removed the line that does the filtering, since that would have the least impact on the project. I thanked you in the commit message.

I must have added the filtering line at some point to save run time, but it doesn't hurt to have full unfiltered violation data.

I'll close this issue, but please let me know if you see any other related problems.

Also, if you'd ever like to submit a pull request, please accept the contributor agreement. We need to have that to accept any code contributions.

Thank you very much for your input.

Gene