Restaurant Violations Analysis

Restaurant Violations Analysis

Extensive analysis of New York restaurant health and safety scores and violations using SQL.

Note: The code and the end result cannot be publicly displayed due to copywrite by The Data Incubator; however, they can be sent privately upon request.

The New York Restaurant Health and Safety data was pulled in. The dataset was far from clean, each restaurant was listed as having multiple inspections on the same day and only some of those entries contained scores. All restaurant, date groups that had no scores at all were removed from the data. Then I determined the average scores by zipcode, borough, and type of cuisine; I created a map of the scores by zipcode using Carto. I found the average number of violations by cuisine, and the most common violations per cuisine type normalized by the most common violations and by the average number of violations per cuisine.

Learning Points: SQL (mySQL and SQLite), nested SELECT, WITH _ AS, multiple JOIN, Carto


© 2017. All rights reserved.