Social Media Analysis  ·  Europe  ·  2026

Sustainable Coffee
Perceptions in Europe

A geospatial and sentiment analysis of how European consumers discuss sustainable coffee on X (formerly Twitter), using R.

1,000Tweets analysed
15Countries
64.5%Positive sentiment
8Themes tagged

Overview

What we found

Across 15 European countries, discussions about sustainable coffee are overwhelmingly positive — driven by appreciation for ethical sourcing, fair trade certification, and eco-friendly packaging. Scepticism surfaces mainly around carbon neutrality claims and consumer pricing.

Mean sentiment score
+0.65
Bing compound, –1 to +1
Positive tweets
64.5%
645 of 1,000 analysed
Most discussed
UK
198 tweets · score 0.673
Highest sentiment
Austria
Score 0.786 · 78.6% positive
Key finding: Packaging and corporate sustainability pledges generate the most positive language. Consumer affordability and carbon neutrality claims attract more sceptical responses — suggesting a gap between brand messaging and lived consumer experience.

Sentiment analysis

How Europe feels about sustainable coffee

Sentiment scored using the Bing lexicon (tidytext package), with compound scores normalised to –1 (very negative) through 0 (neutral) to +1 (very positive). All charts generated in R with ggplot2.

Overall sentiment split
Positive / neutral / negative breakdown across all 1,000 tweets
Donut chart: 64.5% positive, 30.2% neutral, 5.3% negative
Sentiment by country
Mean compound score per country (≥20 tweets threshold)
Horizontal bar chart of mean sentiment by country
Sentiment by sustainability theme
Packaging and corporate topics score highest; carbon and consumer affordability score lowest
Bar chart of mean sentiment by sustainability theme

Country breakdown

Regional sentiment ranking

All 15 countries with at least 10 tweets, ranked by mean sentiment score. All countries are net positive — Austria leads, Ireland records the lowest score.

CountryTweetsScore% PositiveVolume
Austria AT 14 0.786 78.6%
Belgium BE 22 0.742 77.3%
Spain ES 78 0.692 71.8%
United Kingdom GB 198 0.673 70.7%
Finland FI 29 0.667 69.0%
Germany DE 137 0.659 69.3%
Portugal PT 36 0.657 69.4%
Denmark DK 42 0.651 66.7%
Sweden SE 47 0.645 66.0%
Italy IT 113 0.637 70.8%
France FR 122 0.628 67.2%
Netherlands NL 59 0.599 64.4%
Norway NO 39 0.598 61.5%
Poland PL 39 0.590 64.1%
Ireland IE 25 0.560 56.0%

Theme analysis

What people are talking about

Tweets automatically tagged by sustainability theme using keyword matching in R. A single tweet may belong to multiple themes.

Packaging
1.00 216 tweets
Corporate
0.82 344 tweets
Certification
0.62 341 tweets
Supply chain
0.61 249 tweets
Greenwashing
0.58 125 tweets
Carbon
0.50 138 tweets
Consumer
0.49 129 tweets

Bar length = mean sentiment score (0–1 scale). Corporate and packaging themes dominate positive discussion; consumer and carbon themes show more ambivalence.

Geospatial analysis

Where the conversation is happening

Tweet locations mapped using R's sf package with Natural Earth boundaries. Switch between map views below.

Choropleth map: tweet volume by European country

UK, Germany, and France account for the highest tweet volumes, reflecting both population size and English-language social media presence.

Choropleth map: mean sentiment score by European country

Sentiment is broadly positive across all countries. Central European countries (Austria, Belgium) score slightly higher than Nordic and Eastern European markets.

Bubble map: size = volume, colour = sentiment

Bubble size encodes tweet volume; colour encodes mean sentiment score (green = positive). The UK dominates volume while maintaining strong positive sentiment.

Reproduce this analysis

Run it yourself in 5 steps

The full pipeline is open source. You need R ≥ 4.2 and a free X Developer account.

1

Clone the repository

Download the project from GitHub to your machine.

git clone https://github.com/Anesu-Chimbi/Sustainable-coffee-perceptions-europe
2

Get your Bearer Token

Create a free X Developer account at developer.twitter.com, create an App, and copy your Bearer Token from Keys & Tokens.

3

Set up credentials

Create a .env file from the template and paste in your token.

cp .env.example .env
4

Run the pipeline

Open R or RStudio in the project folder and run the master script.

source("Sustainable-coffee/scripts/run_all.R")
5

View your results

Charts and maps appear in Sustainable-coffee/outputs/. Open this page locally or push to GitHub Pages.

🔗

Data collection

X API v2 recent search. Keywords: "sustainable coffee", "eco coffee", "fair trade coffee". Auth: Bearer Token via httr2. Falls back to mock data if no token is set.

💬

Sentiment analysis

Bing lexicon via tidytext. Word scores aggregated per tweet into a normalised compound score. Threshold: positive > 0.05, negative < –0.05.

🗺️

Geospatial mapping

Country boundaries from rnaturalearthdata (50m). Choropleth and bubble maps rendered with ggplot2 + sf + patchwork.

R 4.3 tidytext ggplot2 sf httr2 X API v2