Skip to content

Releases: Chicago/food-inspections-evaluation

v1.7.0

10 Apr 01:09
c522b7b
Compare
Choose a tag to compare

Updating to match private code development

Overview

This code update brings the evaluation code up to date with in-house development.

Release Notes

  • Data file names now mirror the script names that created the files
  • Features on food inspections are now calculated separately
  • Features on business inspections are now calculated separately
  • The model code merges in the features, does not calculate features
  • Added script to adjust the public sanitarian data to match the schema of the private sanitarian file
  • More aggressive filtering functions
  • Separates out the violation matrix calculation into the parsing step and classification step (which, as it turns out will be useful for the new inspection format)
  • Refactoring model result / evaluation steps to accommodate future analysis

Related issues

  • adding prefix number to code and data, closes #100
  • syncing and updating startup script, closes #101
  • split violation matrix calculation into two steps, closes #102
  • updated help example to remove unused variable
  • adding nokey function, needed for new violation matrix calculation
  • guard against too few categories in GenerateOtherLicenseInfo, closes 103
  • updating filter functions to match model
  • starting work described in #104 to split feature creation
  • refactoring code for model compatibility
  • simplifying initialization

v1.6.0

17 May 01:38
Compare
Choose a tag to compare

Initial public release of the food inspection evaluation project.

Code

  • Switched to RSocrata as primary download function
  • Further validation of lambda parameters. Generated reports to show its impact.

Documentation

  • Added [contributor license agreement] language to the project and as part of contributing requirements.
  • Added reproducible technical document--written in knitr--to REPORTS folder called forecasting-restaurants-with-critical-violations-in-Chicago.Rmd.

food-inspections-evaluations-v1.0

09 Dec 21:29
Compare
Choose a tag to compare

This release represents a major refactoring of the 0.5 release.

The main goals were to

  • Improve communication of results
  • Decrease run time
  • Improve the reproducibility of results.

Specific steps taken in this release include:

  • A github pages report was created that summarizes results in a formatted user friendly way.
  • A reports folder has been added that allows users to view complied html output, and to view the code that was used to generate the output.
  • The steps of the process have been broken out into numbered scripts that are numbered in roughly sequential order, where each script represents a logical group of steps in the model process.
  • Each script starts with an initialization to improve reproducibility
  • The data.table package has been incorporated throughout to improve performance and readability.
  • Each function has been moved to a separate file.
  • Many of the original scripts were made into functions.
  • The original results obtained in version 0.5 were obtained in version 1.0.

food-inspections-evaluations-v0.5

04 Dec 19:33
Compare
Choose a tag to compare
Pre-release

Food inspection forecasting evaluation

This repository contains the necessary data and scripts to evaluate the effectiveness of the City of Chicago's food inspections pilot. This repository contains the training data and evaluation data.

Important FIles

  • ./CODE/recreating_training_data.R - Generates training data from September 2011 through January 2014.
  • ./CODE/out-of-sample-generation/create_out-of-sample_data.R - Generates out-of-sample data to evaluate the effectiveness of the model.
  • ./CODE/fit_glmnet.R - fits the analytical model, generates coefficients.
  • ./OUT/evaluation-summary.html - summarizes the findings of the program's evaluation. This was created with knitr and the underlying analytics can be seen in ./OUT/evaluation-summary.R.

Running files

Generating training data

Execute recreating_training_data.R to generate training data:

Rscript /path/to/food-inspections-evaluation/CODE/recreating_training_data.R

Generating evaluation / out-of-sample data

Execute create_out-of-sample_data.R to generate the out-of-sample data used for the evaluation:

Rscript /path/to/food-inspections-evaluation/CODE/out-of-sample-generation/recreating_training_data.R

Generating evaluation / out-of-sample data

Execute fit_glmnet_evaluation.R to generate the out-of-sample data used for the evaluation:

Rscript /path/to/food-inspections-evaluation/CODE/fit_glmnet_evaluation.R

Compatibility

These files currently use several packages that are compatible with R >= 3.1. You may experience issues using older versions of R, including 3.0.x and 2.x.

License

Copyright, 2014 City of Chicago

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Libraries and other software utilized in this repository are copyrighted and distributed under their respective open source licenses.