In our previous post, we noted that all 23,000 New York City eating establishments are subject to surprise inspections by the Department of Health and Mental Hygiene (DOHMH).  Before, we used the restaurant inspection data to learn a little more about New York itself.  This time let’s assume the role of a dodgy restaurant owner: what tricks can we tease out of the data to avoid our due diligence in food handling and kitchen cleanliness?

(Just as a side note, how the inspections begin?  Do the DOHMH inspectors swing open the doors, Wild West-style?  Do they pose as everyday patrons, then pull off their coats to reveal gleaming DOHMH badges?  Do the inspectors even get badges?  If not, Mayor Bloomberg, we’d like a moment of your time…)

We first asked whether any particular time of year was light on inspections.  The charts hinted that some months may be more favorable than others; but after some numerical digging we learned that the variations could very well be due to chance.  We saw similar results on the week-by-week data.

Looking at the number of inspections for each day, we saw something a little different:

number of restaurant inspections by day
This chart shows what could be a pattern of peaks and valleys.  Those spots that appear blank?  They’re really just small values, close to zero.  Closer review reveals that those dips occur on Sundays.  What happens if we group the inspection counts by day of the week?

number of restaurant inspections, by day of week

Wednesdays and Thursdays look like pretty good days for DOHMH inspectors to drop in, yes.  What really stands out is the Sunday value.  There were just 116 total Sunday inspections, compared to thousands of inspections for the other days.  Hmm…

Using a slightly different chart, we can get a better idea of the distribution of inspections across each day of the week:

restaurant inspections by day of week, box plot

If it’s been a while since your last statistics class, this is a box-and-whiskers plot or simply box plot.  For our purposes it’s a tad more useful than a standard bar plot or histogram.  The box plot reflects the same general shape as our bar chart, but it also shows the spreads (the highs and lows) of the data as well as the median values (the lines in the middle of each box).  Not only were there few Sunday restaurant inspections, but the number of Sunday inspections varied little every week.

So far we’ve been looking at the totals across the entire city.  Will we see a different pattern if we break apart the dataset by borough?  For example, we expect certain parts of Manhattan will be very quiet on the weekends.   A picture tells the story of how the boroughs stand on their own:

portion of restaurant inspections by day, per borough

Aside from a dip in Staten Island on Fridays, the pattern is similar across all five boroughs.  While we can hardly say this is a definite trend, we may be on to something.  So for all you dodgy restaurant owners out there, save that Saturday night kitchen cleanup for Sunday night!  Who will notice?  Except for the customers, of course …

In all seriousness, we hope that restaurant owners don’t take these findings to heart.  Please keep your kitchens in order all seven days of the week.  The LocalMaxima crew likes to dine out.  A lot. Food-borne illnesses aren’t on our list of take-out favorites.

Finally, the city requests those of us who use the DOHMH data to include the following disclaimer:

“The City of New York can not vouch for the accuracy or completeness of data provided by this web site or application or for the usefulness or integrity of the web site or application.  This site provides applications using data that has been modified for use from its original source, NYC.gov, the official web site of the City of New York.”

Have some interesting data you’d like us to check out? Need our help making sense of your company’s data? Please drop us a line. Thanks for reading.

Bookmark and Share

Advertisements