Case Study

Decoding Hate

A window into the personal experiences of hate incidents during COVID-19



Following the outbreak of COVID-19, there was a rise in hate incidents directed towards Asian Americans and Pacific Islanders (AAPIs). While some of these incidents were covered in the news, thousands of individuals were filing reports with the national reporting center Stop AAPI Hate, which responds to and addresses hate incidents through research, advocacy, and capacity-building. During this time, The American Asian Foundation (TAAF) was founded. This organization became the driving force behind the team that decided to leverage Twitter to provide a new window into how these incidents are personally affecting the people targeted.


The small team of two engineers looked to Twitter as their source for incident data. They chose this platform for two reasons: firstly, it contains rich and diverse information, such as news, people's ideas, thoughts, daily life events, and things happening in their communities. Because of this, Twitter offers a unique, intimate sample of various populations. Twitter is also the only platform with a truly open API where the TAAF developers could access data and has in-depth tools to collect and analyze that data. 

Using the Twitter API v2 search Tweets and Tweets lookup endpoints, the team was able to search Tweet statuses and identify when people reported a hate incident (and even what hashtags they would use). This helped the team design a 1023-character search query that narrowed the billions of Tweets down to an amount the team could work with. 

Next came the task of verifying that the Tweets were indeed about hate incidents. The team developed a tool with natural language processing to help sift through thousands of Tweets to find ones relevant to the project. After applying their trained machine learning model, the Tweets were then verified by a human to further increase accuracy. 

In 2021, TAAF also co-authored the Documenting Anti-AAPI Hate Codebook with the Stop AAPI Hate coalition. This resource includes draft standards and practices for community-based data collection which helped the team classify incidents that people were sharing over Twitter. 

From there, the next challenge was to present this data in a way that people could easily digest. TAAF created a data visualization tool, Decoding Hate, that displays their vast amount of data in an interactive way. With the help of a data visualization studio, they were able to take the annotated Twitter data and turn thousands of Tweets into insightful stories that expose the truth behind what was happening within AAPI communities.  


The Decoding Hate project helped detect thousands of hate-related incidents that were otherwise going unreported and continues to do so today. This project has become an ongoing tool for spreading awareness of the individual experiences taking place within the AAPI community.

For the next phase of work, TAAF will be partnering with Stop AAPI Hate to pilot individual human responses to individuals who report hate incidents on Twitter. During this phase, Stop AAPI Hate will actively engage with many of the people sending Tweets discussing the hate they have experienced and encourage them to report the incidents through the Stop AAPI Hate Reporting Center. The more people who report to Stop AAPI Hate, the better the coalition and its partners can understand the nature of hate incidents that are taking place and advocate for the most effective policy solutions. 

Along with exposing the hate-related incidents going on in AAPI communities, the project also shines a light on the value of Twitter’s API. This case shows us that by leveraging the right data with the right tools, developers can use Twitter to innovate for a good cause.

Related Content

Decoding Hate: #BuildForGood

We are honored to spotlight Decoding Hate and bring it to life across multiple channels.

Behind the Code: Decoding Hate

Go Behind the Code to learn how and why Jason Wang and Jerry Yang built Decoding Hate.

Global Scope: A Jerry Yang story

Jerry Yang joins us to talk about his life experiences that led him to start TAAF and create the Decoding Hate project.