Chicago Uses Algorithm To Predict Food Safety Violations

Food Safety Inspection is a crucial practice to prevent the spread of illness through unsanitary food establishments. This is especially important in large cities, where a large number of restaurants serve food every night to customers who deserve to be aware of how well the kitchen is abiding by health codes. 

In Chicago, 16,000 eating establishments are being inspected by three dozen inspectors. As one can imagine, this process takes some time. Chicago’s Department of Public Health realized this, and they also realized that in order to keep Chicago’s city as safe and healthy as possible, they needed to detect health codes as soon as possible. After all, about 15 percent of inspections catch a critical violation. The Chicago Department of Public Health has come up with an algorithm to help them catch that 15 percent early on in the process.

Chicago has always operated by going down a complete list of eating establishments and ensuring at all of them get inspected. In the past couple of years, a new initiative was put in place to figure out the most likely health code violators and inspect them first. In 2014, Chicago’s Department of Innovation and Technology began sifting through publicly available city data. They used the characteristics of previously recorded health code violations to create an algorithm to predict which restaurants were most likely in violation of these health codes.

The challenge at hand is not only to create data solutions that work but to do so in a way that makes the process easier to share with other cities. The Chicago example has come across a few obstacles, but they are getting through them in hopes of spreading this idea with the world and preventing customers from getting sick.

The initial test carried out by the Chicago innovation team failed, but they later changed the variables used to predict health violations. These nine violations included previous violations and length of time since last inspection. After they came up with a list of priority inspections and compared the projected violations with what inspectors actually found, results showed that on average, their algorithm found violations 7.5 days earlier than the inspectors operating as usual did.

In February of 2015, Chicago began using this prediction rule for its daily operations. The transition was easy because Chicago’s Department of Public Health incorporated the algorithm in a way that did not make any larger changes to existing business practices. Inspectors still get their assignments from managers, but the manager now generates schedules using the algorithm.


Back in November 2014, Chicago’s chief data officer Tom Schenk published the code for the algorithm on the programming website GitHub. This allows anyone in other cities to adapt the program to their own community’s needs. But not many cities have gotten involved. In fact, this concept has only spread to one local government: that of Montgomery County, Maryland.


When someone comes up with a new system, it is sometimes hard to spread ideas. Only time will tell whether other cities will pick up this system. From the results in Chicago, it’s clear that a lot of customers could be spared food-related illnesses in cities where this plan is implemented.


from Efrain Gonzalez M.D.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s