Comments (3)
I get an error when I launch the "binder" link above.
Is there a discrepancy between how food establishments are classified in the data portal and how they are classified in their business license?
We join information about the business license at the time of inspection to the record of the inspection. We then filter the records to retain only "Retail Food Establishment" records.
As you noticed, a lot of business types (like schools and hospitals) are subject to food inspections. It's important to note that businesses have many license types. For example, some have liquor licenses alongside their retail food license, and others do not.
As you noticed, we only use inspections that have an associated business license description of "Retail Food Establishment".
As far as the "other" license types you're noticing, perhaps you're not looking at the licenses at the time of inspection? It could be that they dropped their food related license(s). For example, maybe it's a book shop that once also served / sold food, but now just sells books.
It's quite possible that you've found something, and I'll take a deeper look when we refactor the code, which should be happening in the next few months. The filtering is a little messy, and I think that this is something which will be fixed in the upcoming edits.
from food-inspections-evaluation.
Hi @geneorama, I have updated the Binder link above. Here it is again:
It may take a while to load. In case there are still issues, here is a copy of the notebook.
from food-inspections-evaluation.
Sorry, had a hard time following the Python and wasn't working on this project. Now that I'm back in it, I think I see what's going on.
We filter the business licenses were LICENSE_DESCRIPTION
is Retail Food Establishment
. Then we also use information about the facility_type
which comes from food inspection data.
My understanding is that these are places that serve prepared food. However we do a lot of inspections in other places that sell packaged food or have kitchens.
I think that some of these retail food places are selling prepared foods in places like grocery stores. We do model the inspection of that prepared food, but we do not model the inspection of the packaged food, which is a separate license.
As I'm working on 2.0 I want to dig into this and be sure of the assumptions, so I'm glad you asked. The first time we did this I relied very heavily on prior art, but this time I want to understand it a bit more.
Before my talk at UseR! 2016, I performed some analysis to see what kinds of places are being inspected to get a list of all licenses that are inspected. As I recall, it wasn't as simple as I had hoped, and I couldn't find a clear cut rule for "this is a place that would get inspected". The best regex I found was searching for these terms in the license description "Retail Food|Consumption|Caterer|Food|Child". Then I grouped them together. My final count looked like this:
LICENSE_DESCRIPTION | N |
---|---|
Retail Food Establishment | 10910 |
Incidental Activity | 2139 |
Wholesale Food Establishment | 545 |
Caterer | 192 |
Shared Kitchen | 205 |
Mobile Food License | 75 |
Children’s Services Facility License | 817 |
Special Events | 31 |
This is old data, I'm not sure how it would hold up with new license designations. Digging into that now.
from food-inspections-evaluation.
Related Issues (20)
- Updating download scripts / data cache to be in sync with the model code
- Update 00_Startup.R
- Split violation matrix calculation
- In `GenerateOtherLicenseInfo` guard against case with too few categories HOT 1
- Split "create model data" step and fix inspector data HOT 9
- violations matrix HOT 1
- Predictions API
- Cannot find Inspection_Date problem
- Inspections are cyclic; how does prioritizing them help? HOT 2
- Would you mind adding a license to the code? HOT 3
- Facilitating Redeploying this Model in Other Cities HOT 6
- violations_dat.Rds does not have filtered inspections, but all inspects HOT 1
- bad characters in inspectors data (trivial) HOT 1
- Website header area is off-center HOT 1
- Update download steps to use RSocrata from CRAN
- Refactor `eval_model` and integrate evaluation function more deeply with `30_glmnet_model.R`
- Social media data as a predictor? HOT 1
- Source of weather data? HOT 5
- Report Metric Development relies on datTest which is created in CODE/31 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from food-inspections-evaluation.