Predicting Food Safety Violations via Social Media to Improve Public Health Surveillance




public health policy, foodborne illness, social media, customer reviews, predictive modeling


Foodborne illness outbreaks originating in food service establishments (FSEs) are a serious public health concern. There are multiple ways that FSEs can contribute to the propagation of foodborne illnesses. However, not all these risks can be detected by health authorities during official inspections for two reasons. First, health authorities have limited resources, meaning not every FSE can be inspected as often and expediently as necessary. Second, because the food safety and hygiene standards of FSEs are dynamic, the inspection results might represent a snapshot that fails to resemble the current FSE situation. Consequently, it would be helpful to have an early warning system that can allow health authorities to predict the risk levels of FSEs and proactively intervene by demanding that high-risk FSEs take appropriate countermeasures. Considering that customers who feel sick after visiting an FSE may not report their experience to health authorities but instead disclose this information by posting online reviews on social media platforms, this study leverages social media data to predict food safety violations by FSEs. The empirical data for this study derive from two sources: the FSE inspection results from the Department of Health and Mental Hygiene in New York City, which labeled each FSE according to whether it violated food safety regulations, and textual reviews posted by FSE customers on Yelp. Machine learning algorithms were employed to extract textual features from the reviews and construct predictive models. Our results demonstrate that customer reviews posted on social media platforms are valuable for predicting FSE food safety violations. Health authorities can leverage social media data to construct predictive models and deploy them to optimize resource allocation and prioritize interventions to prevent foodborne illness outbreaks originating in FSEs, improving public health. FSE managers can also deploy the models to improve their hygiene standards in response to alerts raised. By taking appropriate countermeasures earlier, they can reduce their risk of financial loss due to negative inspection results.