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.
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:
- Only active restaurants. The description repeats that "only restaurants in an active status are included in the dataset." When a restaurant closes, its history leaves the file. Any trend you compute over time is built only from restaurants that survived to today.
- A rolling window. History runs about three years back from each restaurant's latest inspection, not from a fixed date. Downloads made months apart can differ in their early years.
- Not yet adjudicated violations are in. Some citations are still under dispute, and "Scores are updated based on adjudication results." A score in today's download can change later.
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
| Column | What it means | Watch for |
|---|---|---|
CAMIS | Restaurant 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 DATE | Date 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 DESCRIPTION | The cited violation | Blank on rows where no violation was recorded. |
CRITICAL FLAG | Critical, 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. |
ACTION | The action associated with the inspection (for example, violations cited or establishment closed) | Read it alongside the score; a closure is recorded here. |
SCORE | Total points for the inspection; lower is better | Repeated on every violation row. Can change after adjudication. |
GRADE | Letter 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:
- "Restaurants with a score between 0 and 13 points earn an A, those with 14 to 27 points receive a B and those with 28 or more a C."
- Only two kinds of inspection produce a letter grade: "initial inspections for which the restaurant earns an A and re-inspections that result in an A, B or C."
- Scored but not graded: "Initial inspections that result in a score of 14 points or higher," among others, including some complaint inspections and inspections at restaurants not yet open.
- "A restaurant has two chances to earn an A in every inspection cycle."
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
| Code | Meaning |
|---|---|
A, B, C | Letter grades |
N | Not Yet Graded |
Z | Grade Pending |
P | Grade 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
- Counting rows as inspections (rows are violations).
- Leaving in the 1/1/1900 placeholder dates.
- Treating blank grades as missing data rather than as ungraded inspections.
- Reading
ZorPas a grade. - Computing trends without noting that closed restaurants are removed.
- Comparing NYC scores with another city's (see why scores do not compare).
- 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.