A Novel Foodborne Illness Detection and Web Application Tool Based on Social Media
Abstract
1. Introduction
- We collected a large volume of Twitter data related to foodborne illness and transformed them into a more structured dataset with critical 3W information (PostgreSQL) using the pretrained machine learning models.
- We compared the descriptive statistics of foodborne illness cases from Twitter data and official NORS data in multiple aspects (numbers, place, time, and food) and built predictive models for predicting cases based on Twitter and/or NORS data.
- We developed the frontend applications based on the two sources of data for assisting the early detection of foodborne outbreaks.
2. Related Work
3. Materials and Methods
3.1. Data Collection and the Pipeline
3.2. Information Extraction and Language Models
3.3. Data Storage
3.4. Frontend Website Design
4. Results and Discussion
4.1. Statistics of the Collected Data
4.2. Descriptive Analysis
4.3. Outbreak Forecasting Model
4.4. Frontend Visualizations
4.5. Limitations and Implications of This Study
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Scallan, E.; Hoekstra, R.M.; Angulo, F.J.; Tauxe, R.V.; Widdowson, M.A.; Roy, S.L.; Jones, J.L.; Griffin, P.M. Foodborne illness acquired in the United States—Major pathogens. Emerg. Infect. Dis. 2011, 17, 7–15. [Google Scholar] [CrossRef]
- Havelaar, A.H.; Kirk, M.D.; Torgerson, P.R.; Gibb, H.J.; Hald, T.; Lake, R.J.; Praet, N.; Bellinger, D.C.; De Silva, N.R.; Gargouri, N.; et al. World Health Organization global estimates and regional comparisons of the burden of foodborne disease in 2010. PLoS Med. 2015, 12, e1001923. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Swaminathan, B.; Barrett, T.J.; Hunter, S.B.; Tauxe, R.V.; Force, C.P.T. PulseNet: The molecular subtyping network for foodborne bacterial disease surveillance, United States. Emerg. Infect. Dis. 2001, 7, 382–389. [Google Scholar] [CrossRef]
- Jones, T.F.; Scallan, E.; Angulo, F.J. FoodNet: Overview of a decade of achievement. Foodborne Pathog. Dis. 2007, 4, 60–66. [Google Scholar] [CrossRef] [Scilit]
- White, A.E.; Tillman, A.R.; Hedberg, C.; Bruce, B.B.; Batz, M.; Seys, S.A.; Dewey-Mattia, D.; Bazaco, M.C.; Walter, E.S. Foodborne illness outbreaks reported to national surveillance, United States, 2009–2018. Emerg. Infect. Dis. 2022, 28, 1117–1127. [Google Scholar] [CrossRef] [Scilit]
- Thakur, M.; Olafsson, S.; Lee, J.S.; Hurburgh, C.R. Data mining for recognizing patterns in foodborne disease outbreaks. J. Food Eng. 2010, 97, 213–227. [Google Scholar] [CrossRef] [Scilit]
- Sanchez, E.; Simpson, R.B.; Zhang, Y.; Sallade, L.E.; Naumova, E.N. Exploring risk factors of recall-associated foodborne disease outbreaks in the United States, 2009–2019. Int. J. Environ. Res. Public Health 2022, 19, 4947. [Google Scholar] [CrossRef] [Scilit]
- Simpson, R.; Sallade, L.; Sanchez, E.; Zhang, Y.; Naumova, E. Analysing foodborne illness outbreak severity in the USA, 2009–19. Lancet Glob. Health 2022, 10, S5. [Google Scholar] [CrossRef] [Scilit]
- Tao, D.; Zhang, D.; Hu, R.; Rundensteiner, E.; Feng, H. Crowdsourcing and machine learning approaches for extracting entities indicating potential foodborne outbreaks from social media. Sci. Rep. 2021, 11, 21678. [Google Scholar] [CrossRef] [Scilit]
- Paul, M.J.; Dredze, M. Social monitoring for public health. In Synthesis Lectures on Information Concepts, Retrieval, and Services; Morgan & Claypool: San Raferl, CA, USA, 2017; Volume 9, pp. 1–183. [Google Scholar]
- Harris, J.K.; Mansour, R.; Choucair, B.; Olson, J.; Nissen, C.; Bhatt, J. Health department use of social media to identify foodborne illness—Chicago, Illinois, 2013–2014. Morb. Mortal. Wkly. Rep. 2014, 63, 681–685. [Google Scholar]
- Harrison, C.; Jorder, M.; Stern, H.; Stavinsky, F.; Reddy, V.; Hanson, H.; Waechter, H.; Lowe, L.; Gravano, L.; Balter, S. Using online reviews by restaurant patrons to identify unreported cases of foodborne illness—New York City, 2012–2013. Morb. Mortal. Wkly. Rep. 2014, 63, 441–445. [Google Scholar]
- Sadilek, A.; Kautz, H.; DiPrete, L.; Labus, B.; Portman, E.; Teitel, J.; Silenzio, V. Deploying nEmesis: Preventing foodborne illness by data mining social media. Ai Mag. 2017, 38, 37–48. [Google Scholar] [CrossRef] [Scilit]
- Effland, T.; Lawson, A.; Balter, S.; Devinney, K.; Reddy, V.; Waechter, H.; Gravano, L.; Hsu, D. Discovering foodborne illness in online restaurant reviews. J. Am. Med. Inform. Assoc. 2018, 25, 1586–1592. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tao, D.; Yang, P.; Feng, H. Utilization of text mining as a big data analysis tool for food science and nutrition. Compr. Rev. Food Sci. Food Saf. 2020, 19, 875–894. [Google Scholar] [CrossRef] [Scilit]
- Zhai, C.; Massung, S. Text Data Management and Analysis: A Practical Introduction to Information Retrieval and Text Mining; Morgan & Claypool: San Rafael, CA, USA, 2016. [Google Scholar]
- Al-Garadi, M.A.; Yang, Y.C.; Sarker, A. The Role of Natural Language Processing during the COVID-19 Pandemic: Health Applications, Opportunities, and Challenges. Healthcare 2022, 10, 2270. [Google Scholar] [CrossRef] [Scilit]
- Hu, R.; Zhang, D.; Tao, D.; Hartvigsen, T.; Feng, H.; Rundensteiner, E. TWEET-FID: An Annotated Dataset for Multiple Foodborne Illness Detection Tasks. arXiv 2022, arXiv:2205.10726. [Google Scholar]
- Waldner, C. Big Data for Infectious Diseases Surveillance and the Potential Contribution to the Investigation of Foodborne Disease in Canada; National Collaborating Centre for Infectious Diseases: Winnipeg, MB, Canada, 2017. [Google Scholar]
- Subramaniyam, M.; Halim-Lim, S.A.; Mohamad, S.F.B.; Priyono, A. Digital supply chain in the food industry: Critical success factors and barriers. In Proceedings of the 2021 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM), Singapore, 13–16 December 2021; pp. 404–410. [Google Scholar]
- Maeda, Y.; Kurita, N.; Ikeda, S. An early warning support system for food safety risks. In New Frontiers in Artificial Intelligence: Joint JSAI 2005 Workshop Post-Proceedings; Springer: Berlin/Heidelberg, Germany, 2006; pp. 446–457. [Google Scholar]
- Kate, K.; Chaudhari, S.; Prapanca, A.; Kalagnanam, J. FoodSIS: A text mining system to improve the state of food safety in singapore. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, New York, NY, USA, 24–27 August 2014; pp. 1709–1718. [Google Scholar]
- Chen, S.; Huang, D.; Nong, W.; Kwan, H.S. Development of a food safety information database for Greater China. Food Control 2016, 65, 54–62. [Google Scholar] [CrossRef] [Scilit]
- Bouzembrak, Y.; Steen, B.; Neslo, R.; Linge, J.; Mojtahed, V.; Marvin, H.J.P. Development of food fraud media monitoring system based on text mining. Food Control 2018, 93, 283–296. [Google Scholar] [CrossRef] [Scilit]
- Quade, P.; Nsoesie, E.O. A platform for crowdsourced foodborne illness surveillance: Description of users and reports. JMIR Public Health Surveill. 2017, 3, e7076. [Google Scholar] [CrossRef] [Scilit]
- Aramaki, E.; Maskawa, S.; Morita, M. Twitter catches the flu: Detecting influenza epidemics using Twitter. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, Edinburgh, UK, 27–31 July 2011; pp. 1568–1576. [Google Scholar]
- Tweetkit. Tweetkit 0.2.8. Available online: https://pypi.org/project/tweetkit/ (accessed on 24 February 2023).
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Nguyen, D.Q.; Vu, T.; Nguyen, A.T. BERTweet: A pre-trained language model for English Tweets. arXiv 2020, arXiv:2005.10200. [Google Scholar]
- Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. Roberta: A robustly optimized bert pretraining approach. arXiv 2019, arXiv:1907.11692. [Google Scholar]
- Graves, A.; Mohamed, A.R.; Hinton, G. Speech recognition with deep recurrent neural networks. In Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, 26–31 May 2013; pp. 6645–6649. [Google Scholar]
- Wunnava, S.; Qin, X.; Kakar, T.; Kong, X.; Rundensteiner, E. A dual-attention network for joint named entity recognition and sentence classification of adverse drug events. In Proceedings of the Findings of the Association for Computational Linguistics: EMNLP 2020, Online, 16–20 November 2020; pp. 3414–3423. [Google Scholar]
- Lazuardy, M.F.S.; Anggraini, D. Modern front end Web Architectures with React. Js and Next. Js. Res. J. Adv. Eng. Sci. 2022, 7, 132–141. [Google Scholar]
- Richardson, L.C.; Bazaco, M.C.; Parker, C.C.; Dewey-Mattia, D.; Golden, N.; Jones, K.; Klontz, K.; Travis, C.; Kufel, J.Z.; Cole, D. An updated scheme for categorizing foods implicated in foodborne disease outbreaks: A tri-agency collaboration. Foodborne Pathog. Dis. 2017, 14, 701–710. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Nsoesie, E.O.; Kluberg, S.A.; Brownstein, J.S. Online reports of foodborne illness capture foods implicated in official foodborne outbreak reports. Prev. Med. 2014, 67, 264–269. [Google Scholar] [CrossRef] [Scilit]
- Bisht, A.; Kamble, M.P.; Choudhary, P.; Chaturvedi, K.; Kohli, G.; Juneja, V.K.; Sehgal, S.; Taneja, N.K. A surveillance of food borne disease outbreaks in India: 2009–2018. Food Control 2021, 121, 107630. [Google Scholar] [CrossRef] [Scilit]
- Rojas, F.; Ibacache-Quiroga, C. A forecast model for prevention of foodborne outbreaks of non-typhoidal salmonellosis. PeerJ 2020, 8, e10009. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Inoue, H.; Suzuki, T.; Hyodo, M.; Miyake, M. Evaluation of multinomial logistic regression models for predicting causative pathogens of food poisoning cases. J. Vet. Med. Sci. 2018, 80, 1223–1227. [Google Scholar] [CrossRef] [Scilit]
- Greig, J.D.; Ravel, A. Analysis of foodborne outbreak data reported internationally for source attribution. Int. J. Food Microbiol. 2009, 130, 77–87. [Google Scholar] [CrossRef] [Scilit]
- Dash 2.11.1. 2014, pp. 1709–1718. Available online: https://pypi.org/project/dash/ (accessed on 30 June 2023).







| Tweets | Food | Location | Symptom |
|---|---|---|---|
| Biggest regret of #2013: eating sushi from safeway’s refrigerated section #foodpoisoning #projectilevomitingatmidnight | Sushi | Safeway | #projectilevomitingatmidnight |
| @USER I ate like 3 tacos from jackinbox lastnight in when I woke up my stomach been hurting every since I think I got food poison | Tacos | Jackinbox | Stomach been hurting |
| @USER @USER Bought family meal in Rustenburg on my way from mahikeng last weekend. All four of us had severe cramps and running stomach the next day. Went to the doctor and was told it’s food poisoning. Never again will I buy nandos HTTPURL | Nando’s meal | Rustenburg | Severe cramps, running stomach |
| Panda Express got me@and three others sick. Orange chicken.. we all ate different day at different locations!! What the hell is going on? I get my days off till next week. Thanks Panda I am hoping I don’t puke on my staff [EMOJI_disappointed_face][EMOJI_disappointed_face][EMOJI_disappointed_face] #pandaexpress #foodsafety #foodpoisoning | Orange chicken | Panda Express | Sick, puke |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tao, D.; Hu, R.; Zhang, D.; Laber, J.; Lapsley, A.; Kwan, T.; Rathke, L.; Rundensteiner, E.; Feng, H. A Novel Foodborne Illness Detection and Web Application Tool Based on Social Media. Foods 2023, 12, 2769. https://doi.org/10.3390/foods12142769
Tao D, Hu R, Zhang D, Laber J, Lapsley A, Kwan T, Rathke L, Rundensteiner E, Feng H. A Novel Foodborne Illness Detection and Web Application Tool Based on Social Media. Foods. 2023; 12(14):2769. https://doi.org/10.3390/foods12142769
Chicago/Turabian StyleTao, Dandan, Ruofan Hu, Dongyu Zhang, Jasmine Laber, Anne Lapsley, Timothy Kwan, Liam Rathke, Elke Rundensteiner, and Hao Feng. 2023. "A Novel Foodborne Illness Detection and Web Application Tool Based on Social Media" Foods 12, no. 14: 2769. https://doi.org/10.3390/foods12142769
APA StyleTao, D., Hu, R., Zhang, D., Laber, J., Lapsley, A., Kwan, T., Rathke, L., Rundensteiner, E., & Feng, H. (2023). A Novel Foodborne Illness Detection and Web Application Tool Based on Social Media. Foods, 12(14), 2769. https://doi.org/10.3390/foods12142769

