Have you ever wondered what people think about Atlanta? Do they love its parks, its cultural events, and its food scene? Or do they complain about its traffic, pollution, and crime rate? If you’re a city planner or just someone who cares about the future of your community, these are questions you might want to answer. And one way to do that is through sentiment analysis, a method that allows us to analyze the opinions, attitudes, and emotions expressed in texts such as tweets, reviews, or news articles. By using sentiment analysis, we can gain valuable insights into how people feel about different aspects of a city, from its neighborhoods to its public transportation system. In this blog post, we will explore the results of a sentiment analysis conducted on Twitter data related to Atlanta.

On April 4th, the most recent 5,000 Tweets with the keyword “Atlanta” were scraped as a sample of the sentiment analysis. The distribution of the scraped Tweets ranged from March 31st, 2023 9:29 PM to April 4th, 1:26 PM. A word cloud is a visual representation of the most frequently used words in a text or collection of texts, where the size of each word reflects its frequency. We created a word cloud using Twitter data (see the image immediately below, on left)  to get a sense of the most commonly used words associated with Atlanta. Such visualization can be helpful in identifying the most salient topics or themes that people are talking about in relation to the city and also serve as a useful tool for generating hypotheses or identifying areas of interest for further exploration– using sentiment analysis or other methods. However, it’s important to keep in mind that the word cloud alone does not provide any information about the driving sentiment or emotional content of the tweets. As seen in the rightmost image below,  “Cop City” appears to be Atlanta’s hottest issue on Twitter across the selected four days in late March and early April.

So, what generalized sentiments were evident in these most recent 5,000 Tweets? There are many lexicons that can be used for sentiment analysis with social media, but three of the most commonly used ones are 1) NRC Emotion Lexicon, 2) SentiWordNet, and 3) AFINN. For this sentiment analysis, we used the NRC Emotion Lexicon. It is developed by the National Research Council of Canada, and it contains over 14,000 words and phrases that are labeled with eight basic emotions and two sentiments. The lexicon is based on the idea that emotions are complex and multi-dimensional, and can be expressed in many different ways, including through language. The NRC Emotion Lexicon has become increasingly popular in recent years, especially in the field of social media analysis, where it has been used to study a wide range of topics, from politics to mental health. By using the NRC Emotion Lexicon in this project, we analyzed the emotional content of tweets about Atlanta to gain insights into how people feel about different aspects of the city.

From the image below, at left, we can see that positive sentiments (54.9 percent)  predominated over neutral (31.8 percent) and negative (13.3 percent) sentiments. How did people feel when they tweeted about Atlanta? The image at right indicates that the specific emotion of trust took the largest percent share at roughly one-third (32.2 percent), followed by fear (22.4 percent) and anticipation (12.7 percent).

So, we have identified the most commonly used words and sentiments from the 5,000 Tweets. Now, let’s see the result of a “Bigram network analysis”. Bigram network analysis is important in text analysis because it allows for the identification of meaningful associations between words that occur frequently together in a text or corpus. A bigram is a pair of words that appear consecutively in a text, and bigram network analysis involves mapping the relationships between these word pairs to create a network graph. By analyzing bigrams, we can gain a more nuanced understanding of the relationships between words and how they contribute to the overall meaning or sentiment of the text.

Based on the Bigram network analysis result below, it appears that there is a strong association between the terms “Cop City”, “stop”, and “forest.” This suggests that there may be ongoing protests or activism against the “Cop City” and protecting natural areas in the region. The fact that the dominant sentiment captured with these words is “trust” may indicate that there is a level of support or trust for these movements within the community. 

To sum things up, sentiment analysis results can provide valuable insights into the perceptions and attitudes of residents and visitors towards the city of Atlanta. The city could use this information to improve its public image and address specific issues, ultimately enhancing the overall quality of life for its residents. One potential implication of the sentiment analysis results in Atlanta is that the city can identify areas that need improvement or attention. Another potential implication is that sentiment analysis can help the city identify areas where it has a positive image and build upon them. This information can help us make informed decisions about how to address the needs and desires of the community, and how to create a more livable and sustainable urban environment.