nyc_restaurant_inspection_results: DOHMH New York City Restaurant Inspection Results

View source: R/nyc_restaurant_inspection_results.R

nyc_restaurant_inspection_resultsR Documentation

DOHMH New York City Restaurant Inspection Results

Description

Downloads DOHMH New York City Restaurant Inspection Results from NYC Open Data.

Usage

nyc_restaurant_inspection_results(
  limit = 10000,
  filters = list(),
  timeout_sec = 30
)

Arguments

limit

Number of rows to retrieve (default = 10,000).

filters

Optional list of field-value pairs to filter results.

timeout_sec

Request timeout in seconds (default = 30).

Details

The dataset 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 on the RECORD DATE (date of the data pull). When an inspection results in more than one violation, values for associated fields are repeated for each additional violation record. Establishments are uniquely identified by their CAMIS (record ID) number. Keep in mind that thousands of restaurants start business and go out of business every year; only restaurants in an active status are included in the dataset. Records are also included for each restaurant that has applied for a permit but has not yet been inspected and for inspections resulting in no violations. Establishments with inspection date of 1/1/1900 are new establishments that have not yet received an inspection. Restaurants that received no violations are represented by a single row and coded as having no violations using the ACTION field. Because this dataset is compiled from several large administrative data systems, it contains some illogical values that could be a result of data entry or transfer errors. Data may also be missing. This dataset and the information on the Health Department’s Restaurant Grading website come from the same data source. The Health Department’s Restaurant Grading website is here: http://www1.nyc.gov/site/doh/services/restaurant-grades.page See the data dictionary file in the Attachments section of the OpenData website for a summary of data fields and allowable values.

Value

A tibble containing DOHMH New York City Restaurant Inspection Results data.

Source

NYC Open Data: <https://data.cityofnewyork.us/Health/DOHMH-New-York-City-Restaurant-Inspection-Results/43nn-pn8j/about_data>

Examples

# Examples that hit the live NYC Open Data API are wrapped so CRAN checks
# do not fail when the network is unavailable or slow.

if (curl::has_internet()) {
  # Quick example (fetch 2 rows)
  small_sample <- nyc_restaurant_inspection_results(limit = 2)
  small_sample

  nyc_restaurant_inspection_results(filters = list(boro = "Queens"))
}


nycOpenData documentation built on Jan. 26, 2026, 1:06 a.m.