Food Inspection Datafoodinspectiondata.us

Home / Guides

Reading the NYC restaurant inspection dataset

A plain-language field guide to New York City's DOHMH restaurant inspection data: what a row is, what each key column means, and the traps that skew results.

By Food Inspection Data editorsPublished Sources checked September 17, 2026

The DOHMH New York City Restaurant Inspection Results dataset (43nn-pn8j on NYC Open Data) is one of the most used inspection datasets in the country, and one of the easiest to misread. This guide covers what a row is, what the important columns mean, and how score and grade relate. Quotes are from the dataset's own description and column notes and from the Health Department's grading guide, checked September 17, 2026, when the dataset had last been updated that day.

What is in the dataset, and what is not

The description says it contains "every sustained or not yet adjudicated violation citation from every full or special program inspection conducted up to three years prior to the most recent inspection for restaurants and college cafeterias in an active status." Three consequences follow:

One row per violation, not per inspection

"When an inspection results in more than one violation, values for associated fields are repeated for each additional violation record." An inspection with five violations is five rows carrying the same score and grade. To count inspections, first reduce to unique combinations of restaurant and inspection date (and inspection type); counting rows counts violations.

The columns that matter

Key columns in 43nn-pn8j. Definitions quoted or paraphrased from the dataset's column notes
ColumnWhat it meansWatch for
CAMISRestaurant identifier: "10-digit integer, static per restaurant permit"The join key for everything about one restaurant. It is tied to the permit, not to the address.
INSPECTION DATEDate of the inspection"Establishments with inspection date of 1/1/1900 are new establishments that have not yet received an inspection." Filter these out before any date math.
VIOLATION CODE / VIOLATION DESCRIPTIONThe cited violationBlank on rows where no violation was recorded.
CRITICAL FLAGCritical, Not Critical or Not Applicable. "Critical violations are those most likely to contribute to food-borne illness"A property of the violation row, not the inspection.
ACTIONThe action associated with the inspection (for example, violations cited or establishment closed)Read it alongside the score; a closure is recorded here.
SCORETotal points for the inspection; lower is betterRepeated on every violation row. Can change after adjudication.
GRADELetter grade or status code (below)Blank for inspections that are scored but not graded.
GRADE DATE"The date when the current grade was issued"Blank when there is no grade.
RECORD DATE"The date when the extract was run to produce this data set"Not an inspection date. Useful for knowing which snapshot you have.
INSPECTION TYPE"A combination of the inspection program and the type of inspection performed"Needed to tell graded from ungraded inspections.

Score versus grade

The score is points: "the lower the score, the better." The grade is derived from the score, but not on every inspection. From the Health Department's grading guide:

So a blank GRADE next to a score of 20 is normal: it is an initial inspection, and the grade will come from the re-inspection. If you compute grade shares from rows with a grade, you are looking at a filtered set in which initial inspections appear only when they earned an A.

Grade codes, including grade pending

GRADE values, from the dataset's column notes
CodeMeaning
A, B, CLetter grades
NNot Yet Graded
ZGrade Pending
PGrade Pending issued on re-opening following an initial inspection that resulted in a closure

Grade pending exists because a restaurant can contest its result. The grading guide explains that a restaurant that gets a B or C on re-inspection "will receive a grade card and a grade pending card" and "can post either card until it has an opportunity to be heard" at the Office of Administrative Trials and Hearings Health Tribunal. A Z in the data is that pending state; it is not a grade.

Inspection timing is not random

How often a restaurant is inspected depends on its last results. The city's inspection cycle overview puts the next cycle 11 to 13 months out after an initial score of 0 to 13, 5 to 7 months after 14 to 27, and 3 to 5 months after 28 or more. Restaurants with poor scores therefore contribute more inspections, and more rows, per year. Averages taken across all rows lean toward them.

Common traps, in one list

  1. Counting rows as inspections (rows are violations).
  2. Leaving in the 1/1/1900 placeholder dates.
  3. Treating blank grades as missing data rather than as ungraded inspections.
  4. Reading Z or P as a grade.
  5. Computing trends without noting that closed restaurants are removed.
  6. Comparing NYC scores with another city's (see why scores do not compare).
  7. Assuming a downloaded score is final while it may still be adjudicated.

For computed figures such as grade distributions, use a published analysis rather than a quick count; this page only explains the fields.