Textual Analysis and Sentiment Insights on European Mammals
This section of the project focuses on public perception, analyzing how different mammal species are discussed and perceived in the Reddit community. This work leverages Natural Language Processing (NLP) and deep learning models to understand the tone, frequency, and thematic context of discussions involving these species.
The objective is twofold:
- Quantify the visibility and prominence of each species across discussions (which species drive the majority of interactions).
- Classify the emotional tone of conversations.
By combining these insights, we can identify which species dominate the public narrative and which are symbolically tied to climate change concerns.
🛠️ Data Collection and Preprocessing Pipeline
To ensure a systematic and reproducible analysis, the workflow was structured into three stages:
- Reddit Data Extraction:
- Retrieved up to 5,000 posts and 5,000 comments using PRAW (Python Reddit API Wrapper), covering the period 2019-2024.
- Focused on relevant subreddits – climatechange, environment, sustainability, wildlife – to exclude unrelated topics.
- Keyword Optimization:
- Built an extended keyword set per species (scientific and common names, plural forms) to maximize recall and minimize missed mentions.
- Linguistic Cleaning and NLP Preprocessing:
- Removed duplicates, spam, promotional content, and links.
- Applied tokenization and lemmatization.
- Removed punctuation and non-informative grammatical elements (articles, pronouns, conjunctions).
- Consolidated all cleaned data into a structured CSV dataset for analysis.
📊 Quantitative Insights: Mentions per Species
Grey wolf and polar bear dominate the discourse, jointly accounting for over 70% of all mentions. In contrast, red deer and red fox receive moderate attention, while other species (lynx, hedgehog, mole, wildcat) are virtually absent with just a few mentions each.
This reflects a typical trend in environmental communication, where iconic or controversial species attract disproportionate focus, while less conspicuous species remain underrepresented.
Within Reddit comments – the most interactive dimension of discourse – the concentration is even higher:
- 🐺 Grey wolf (43.4%) and 🐻 polar bear (40.5%) account for over 80% of species-related mentions.
- The remaining species collectively represent less than 15% of mentions.
💬 Emotional Analysis: Sentiment and Emotion Classification
To better capture the emotional framing of Reddit discussions, we applied a Transformer-based deep learning model, DistilRoBERTa (j-hartmann/emotion-english-distilroberta-base), optimized for multi-class emotion detection.
We focused on four emotions only: Anger, Fear, Joy, and Sadness. The distribution reveals distinct emotional patterns by species:
- 🐺 Grey wolf: Shows the highest overall negative sentiment, with 43.2% anger, 29.6% fear and 22.1% sadness. Most discussions center on livestock predation, safety concerns, and human-wildlife conflicts, reflecting wolves’ controversial role in conservation debates.
- 🦌 Roe deer: Exhibits 49.1% fear and 16.4% sadness, mostly connected to road accidents and incidental encounters. Joy is minimal (7.3%/).
- 🐻 Polar bear: Dominated by fear (36.4%) and sadness (25.3%), often tied to climate crisis narratives and endangered status(keywords like “melting”, “climate”, “endangered”). Joy remains low (11.5%).
- 🦊 Red fox: Displays a mixed profile — 38% anger,34% fear, but also 12% joy, the highest among species. Joy is mainly linked to urban sightings and photography, while negative emotions may stem from conflicts with humans and pets.
- 🕳️ European mole and 🦔 hedgehog: Hedgehog is strikingly dominated by sadness (60%), with very low anger and fear, possibly reflecting aperceived vulnerability or threats (e.g., habitat loss). Mole shows a more balanced mix, with 33% fear, 33% anger, and 16.7% joy, though based on fewer discussions.
- 🧭 Eurasian lynx and 😺 wildcat: While less discussed overall, these species display substantial sadness (33% for wildcat) and fear (53.8% for lynx), likely tied to rarity and human interactions.
At a general level - beyond comments explicitly mentioning specific species - there is a noticeable prevalence of negative sentiment. This trend appears to reflect a general perception of environmental degradation and human impact on the planet.
☁️ Word Cloud Analysis
The word cloud highlights the most frequent words from comments classified with fear, anger or sadness, indicating the themes driving negative emotions. The analysis suggests a recurring focus on climate-related concerns – often tied to species like the polar bear – alongside discussions around human-wildlife conflict, particularly involving wolves and bears. There also appears to be a persistent interest in broader ecological themes such as wildlife and habitat conservation.