case-studies

Using Yelp Reviews to Flag Restaurant Health Risks

DrivenData, in partnership with Yelp and Harvard, and with support from the City of Boston, structured a predictive challenge to tie Yelp reviews and ratings with the results of Boston's food safety inspections.

The organization

The City of Boston regularly inspects every restaurant to monitor and improve food safety and public health.

The challenge

As in most cities, health inspections are generally random, which can increase time spent on spot checks at clean restaurants that have been following the rules closely — and missed opportunities to improve health and hygiene at places with more pressing food safety issues. Meanwhile, each year, millions of people cycle through and post Yelp reviews about their experiences at these same restaurants. The information in these reviews has the potential to improve the City’s inspection efforts, and could transform the way inspections are targeted.

The approach

DrivenData, in partnership with Yelp and Harvard, and with support from the City of Boston, structured a predictive challenge to tie Yelp reviews and ratings with the results of Boston’s hygiene inspections. The goal was to use data from social media to narrow the search for health code violations in Boston, pulling out the words, phrases, ratings, and patterns that predict violations to help public health inspectors do their jobs more effectively.

Modelers with the top-performing approaches made predictions for where minor, major, and severe hygiene violations would surface for 6 weeks into the future. Over that time, DrivenData compared their predictions with what public health inspectors actually found when they went into restaurants. At the end of the evaluation period, we saw which teams had developed the most accurate predictions.

The outcome

The competition results were studied by Harvard researcher Mike Luca and covered in the Washington Post in 2015: "Using the winning algorithm, Luca says, Boston could catch the same number of health violations with 40 percent fewer inspections, simply by better targeting city resources at what appear to be dirty-kitchen hotspots. The city of Boston is now considering ways to use such a model."

And in fact they have. As of 2017, the city of Boston used the top algorithms from this project and - in practice - found 25% more health violations, while also surfacing around 60% of the most critical violations earlier than before. By taking advantage of past data and combining with new sources of information, the city can catch public health risks sooner and get a smarter view of how to dedicate scarce public resources.

Our real-world impact

All projects
Partners: Max Planck Institute for Evolutionary Anthropology, Arcus Foundation, WILDLABS

Automating wildlife identification for research and conservation

Detected wildlife in images and videos—automatically and at scale—by building the winning algorithm from a DrivenData competition into an open source python package and a web application running models in the cloud.

Partners: Private sector, social sector

Building LLM solutions

Built solutions using LLMs for multiple real-world applications, across tasks including semantic search, summarization, named entity recognition, and multimodal analysis. Work has spanned research on state-of-the-art models tuned for specific use cases to production ready retrieval-augmented AI applications.

Partners: The World Bank, The Conflict and Environment Observatory

Identifying crop types using satellite imagery in Yemen

Used satellite imagery to identify crop extent, crop types and climate risks to agriculture in Yemen, informing World Bank development programs in the country after years of civil war.

Partners: IDEO.org

Illuminating mobile money experiences in Tanzania

Analyzed millions of mobile money records to uncover patterns in behavior, and then combined these insights with human-centered design to shape new approaches to delivering mobile money to low-income populations in Tanzania.

Partners: Insecurity Insight, Physicians for Human Rights

Tracking attacks on health care in Ukraine

Built a real-time, interactive map to visualize attacks on the Ukrainian health care system since the Russian invasion began in February of 2022. The map will support partner efforts to provide aid, hold aggressors accountable in court, and increase public awareness.

Partners: CABI Plantwise

Mining chat messages with plant doctors using language models

Automated recognition of agricultural entities (such as crops, pests, diseases, and chemicals) in WhatsApp and Telegram messages among plant doctors, enabling new ways to surface emerging trends and improve science-based guidance for smallholder farmers.

Partners: Data science company foundation

Matching students with schools where they are likely to succeed

Used machine learning to match students with higher education programs where they are more likely to get in and graduate based on their unique profile, with a focus on backgrounds traditionally less likely to attend college or apply to more competitive programs.

Partners: Fair Trade USA

Mapping fair trade products from source to shelf

Visualized the flow of fair trade coffee products from the farms where they are grown to the stores where they are sold, connecting the nodes in supply chain transactions and increasing transparency for customers and auditors.

Partners: The World Bank, Angaza, GOGLA, Lighting Global

Developing performance indicators and repayment models in off-grid solar

Analyzed repayment behaviors across dozens of pay-as-you-go (PAYG) solar energy companies serving off-grid populations throughout Africa, and developed KPIs to facilitate standardized reporting for PAYG portfolios.

Partners: Haystack Informatics

Modeling patient pathways through hospitals

Mapped out the probabilistic patient journeys through hospitals based on tens of thousands of patient experiences, giving hospitals a better view into the timing of the activities in their departments and how they relate to operational efficiency.

Partners: Yelp, Harvard University, City of Boston

Predicting public health risks from restaurant reviews

Flagged public health risks at restaurants by combining Yelp reviews with open city data on past inspections. An algorithmic approach discovers 25% more violations with the same number of inspections.

Partners: Education Resource Strategies

Smart auto-tagging of K-12 school spending

Built algorithms that put apples-to-apples labels on school budget line items so that districts understand how their spending stacks up and where they can improve, saving months of manual processing each year.

Partners: Love Justice

Building data tools to fight human trafficking in Nepal

Aided anti-trafficking efforts at border crossings and airports by combining data across locations and surfacing insights that give interviewers greater intelligence about the right questions to ask and how to direct them.

Partners: GO2 Foundation for Lung Cancer

Putting AI into the hands of lung cancer clinicians

Translated advances in machine learning research to practical software for clinical settings, building an open source application through a new kind of data challenge.

Partners: Microsoft

Driving data education through custom competitions

Developed online, white-label data science competitions for students to synthesize their learnings and test their skills on applied challenges. Each capstone features a real-world dataset that focuses on an important issue in the social sector.

Work with us to build a better world

Learn more about how our team is bringing the transformative power of data science and AI to organizations tackling the world's biggest challenges.