1. Load and clean the data
Your three weekly files are read together. Things this section deals
with (based on how the files are actually structured):
- Duplicates – the weekly files overlap almost
completely, so the same post (
uri) appears in several
files. Each post is kept once (the newest file’s engagement counts
win).
- Missing
created_at – some rows have
NA; the timestamp is recovered from the
post_data column when possible.
- Empty posts – image/quote-only posts with no text
are dropped from text analysis.
- Mixed timestamp precision – handled by
lubridate::ymd_hms().
files <- list.files(params$data_dir, pattern = "\\.csv$", recursive = TRUE, full.names = TRUE)
stopifnot("No CSV files found - check params$data_dir" = length(files) > 0)
raw <- map_dfr(files, function(f) {
read_csv(f, col_types = cols(.default = col_character()), show_col_types = FALSE) %>%
mutate(source_file = basename(f))
})
num_cols <- c("reply_count", "repost_count", "like_count", "quote_count", "bookmark_count")
posts_all <- raw %>%
mutate(
# fall back to the timestamp stored inside post_data when created_at is NA
created_chr = coalesce(
created_at,
str_extract(post_data, "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?")
),
created = ymd_hms(created_chr, tz = "UTC", quiet = TRUE),
across(all_of(num_cols), ~ replace_na(suppressWarnings(as.numeric(.x)), 0))
) %>%
arrange(desc(source_file)) %>% # newest file first ...
distinct(uri, .keep_all = TRUE) # ... so its counts are the ones kept
clean_text <- function(x) {
x %>%
str_replace_all("[‘’]", "'") %>%
str_replace_all("https?://\\S+|www\\.\\S+", " ") %>% # full URLs
str_replace_all("\\b[\\w-]+(\\.[\\w-]+)*\\.(com|gg|net|org|io|co|tv|uk|de|social)\\S*", " ") %>% # truncated links
str_replace_all("@[\\w.-]+", " ") %>% # @mentions
str_replace_all("#", " ") %>% # keep hashtag word, drop '#'
str_to_lower() %>%
str_squish()
}
posts <- posts_all %>%
filter(!is.na(text), str_squish(text) != "") %>%
{ if (params$english_only) filter(., is.na(langs) | str_detect(langs, "^en")) else . } %>%
filter(!is.na(created)) %>%
mutate(
date = as_date(created),
period = as_date(floor_date(created, params$time_unit, week_start = 1)),
text_clean = clean_text(text),
engagement = like_count + repost_count + reply_count + quote_count
)
tibble(
Step = c("Rows read (all files)", "Unique posts", "Posts used in analysis"),
Count = c(nrow(raw), nrow(posts_all), nrow(posts))
) %>% kable(caption = "Data cleaning summary")
Data cleaning summary
| Rows read (all files) |
573 |
| Unique posts |
192 |
| Posts used in analysis |
169 |
2. Overview
tibble(
Metric = c("Posts", "Unique authors", "First post", "Last post",
"Total likes", "Median likes per post"),
Value = c(nrow(posts), n_distinct(posts$author_handle),
as.character(min(posts$date)), as.character(max(posts$date)),
comma(sum(posts$like_count)), median(posts$like_count))
) %>% kable()
| Posts |
169 |
| Unique authors |
136 |
| First post |
2026-01-29 |
| Last post |
2026-11-10 |
| Total likes |
781 |
| Median likes per post |
1 |
Posting volume over time
volume <- posts %>%
count(period, name = "n") %>%
complete(period = seq(min(period), max(period), by = params$time_unit),
fill = list(n = 0))
plot_ly(volume, x = ~period, y = ~n, type = "bar", marker = list(color = pal$main),
hovertemplate = "%{x|%b %d, %Y}<br>%{y} posts<extra></extra>") %>%
layout(title = list(text = paste("Posts per", params$time_unit), x = 0),
xaxis = list(title = ""), yaxis = list(title = "Posts"))
When do people post?
day_names <- c("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
rhythm <- posts %>%
mutate(local = with_tz(created, params$tz),
weekday = day_names[wday(local, week_start = 1)],
hour = hour(local)) %>%
count(weekday, hour)
plot_ly(rhythm, x = ~hour, y = ~weekday, z = ~n, type = "heatmap", colors = "Blues",
hovertemplate = "%{y} %{x}:00<br>%{z} posts<extra></extra>") %>%
layout(title = list(text = paste0("Posting rhythm (", params$tz, ")"), x = 0),
xaxis = list(title = "Hour of day", dtick = 2, range = c(-0.5, 23.5)),
yaxis = list(title = "", categoryorder = "array",
categoryarray = day_names, autorange = "reversed"))
Most active accounts
posts %>%
count(author_handle, sort = TRUE) %>%
slice_head(n = 15) %>%
hbar("author_handle", "n", "Most active accounts", xlab = "Posts")
3. Basic text analysis
# Edit this list freely: words that are in every post carry no information.
custom_stop <- c("call", "duty", "cod", "game", "games", "gaming",
"amp", "http", "https", "www", "com", "bsky", "social", "rt")
tokens <- posts %>%
select(uri, author_handle, created, period, text_clean) %>%
unnest_tokens(word, text_clean) %>%
mutate(word = str_remove(word, "'s$")) %>%
filter(str_detect(word, "^[a-z][a-z']+$"),
nchar(word) > 2,
!word %in% stop_words$word,
!word %in% custom_stop)
word_counts <- count(tokens, word, sort = TRUE)
Most frequent words
word_counts %>%
slice_head(n = params$top_n) %>%
hbar("word", "n", paste("Top", params$top_n, "words"))
Most frequent word pairs
junk <- c(stop_words$word, "http", "https", "www", "com", "amp")
bigrams <- posts %>%
select(uri, text_clean) %>%
unnest_tokens(bigram, text_clean, token = "ngrams", n = 2) %>%
filter(!is.na(bigram)) %>%
separate(bigram, c("w1", "w2"), sep = " ") %>%
filter(str_detect(w1, "^[a-z]+$"), str_detect(w2, "^[a-z]+$"),
!w1 %in% junk, !w2 %in% junk) %>%
unite(bigram, w1, w2, sep = " ") %>%
distinct(uri, bigram) # count each bigram once per post
bigrams %>%
count(bigram, sort = TRUE) %>%
slice_head(n = params$top_n) %>%
hbar("bigram", "n", "Most frequent word pairs", color = "#7b5ea7", xlab = "Posts")
4. Text trends over time
Share of posts mentioning the top words
For each period: the percentage of that period’s posts that contain
the word.
period_n <- posts %>% count(period, name = "n_posts") %>% filter(n_posts >= params$min_n)
trend_words <- word_counts %>% slice_head(n = 6) %>% pull(word)
word_trend <- expand_grid(period = period_n$period, word = trend_words) %>%
left_join(tokens %>% distinct(uri, period, word) %>% count(period, word),
by = c("period", "word")) %>%
mutate(n = replace_na(n, 0)) %>%
left_join(period_n, by = "period") %>%
mutate(share = n / n_posts)
plot_ly(word_trend, x = ~period, y = ~share, color = ~word,
type = "scatter", mode = "lines+markers",
text = ~paste0(n, " of ", n_posts, " posts"),
hovertemplate = "%{fullData.name}: %{y:.0%} (%{text})<extra></extra>") %>%
layout(title = list(text = "Top words over time", x = 0),
xaxis = list(title = ""),
yaxis = list(title = "Share of posts", tickformat = ".0%"),
hovermode = "x unified")
Heatmap: top 15 words by period
heat_words <- word_counts %>% slice_head(n = 15) %>% pull(word)
heat <- tokens %>%
filter(word %in% heat_words, period %in% period_n$period) %>%
count(period, word)
plot_ly(heat, x = ~period, y = ~word, z = ~n, type = "heatmap", colors = "Blues",
hovertemplate = "%{y}, %{x|%b %Y}: %{z}<extra></extra>") %>%
layout(title = list(text = "Word counts by period", x = 0),
xaxis = list(title = ""),
yaxis = list(title = "", categoryorder = "array", categoryarray = rev(heat_words)))
Distinctive words per period (TF-IDF)
Words that are unusually frequent in one period compared with the
others. (Words used fewer than twice in a period are ignored to skip
typos.)
tokens %>%
filter(period %in% period_n$period) %>%
count(period, word) %>%
bind_tf_idf(word, period, n) %>%
filter(n >= 2) %>%
group_by(period) %>%
slice_max(tf_idf, n = 4, with_ties = FALSE) %>%
summarise(`Distinctive words` = paste(word, collapse = ", "), .groups = "drop") %>%
rename(Period = period) %>%
kable()
| 2026-02-01 |
january, video, selling, playstation |
| 2026-03-01 |
sale, discounts, ridiculously, usd |
| 2026-04-01 |
pass, subscriptions, price, strategy |
| 2026-05-01 |
bezos, bottom, earners, guidance |
| 2026-06-01 |
add, studio, gta, bubbles |
| 2026-07-01 |
die, pass, gamingnews, lost |
| 2026-08-01 |
cheat, digital, evolved, sellers |
| 2026-09-01 |
cheating, billion, claims, expected |
| 2026-10-01 |
korea, invasion, korean, tops |
| 2026-11-01 |
france, zelda, november, ocarina |
5. Sentiment analysis
Sentiment uses the Bing lexicon (each word is tagged
positive or negative; no download needed). A post’s net
score = positive words − negative words. Posts with no lexicon
words score 0 and count as “Neutral”.
Domain caveat: lexicons are built for everyday
English. In gaming talk, words like war, strike,
shot, kill are not emotional, so a short list is
removed below. Edit sentiment_exclude to suit your
topic.
sentiment_exclude <- c("like", "well", "war", "warfare", "strike", "shot",
"ghost", "kill", "killed", "killing", "gun", "bomb")
bing <- get_sentiments("bing") %>%
filter(!word %in% sentiment_exclude) %>%
distinct(word, .keep_all = TRUE)
sent_by_post <- tokens %>%
inner_join(bing, by = "word") %>%
count(uri, sentiment) %>%
complete(uri, sentiment = c("positive", "negative"), fill = list(n = 0)) %>%
pivot_wider(names_from = sentiment, values_from = n, values_fill = 0)
posts_sent <- posts %>%
left_join(sent_by_post, by = "uri") %>%
mutate(across(c(positive, negative), ~ replace_na(.x, 0)),
net = positive - negative,
label = case_when(net > 0 ~ "Positive", net < 0 ~ "Negative", TRUE ~ "Neutral"),
label = factor(label, levels = c("Positive", "Neutral", "Negative")))
posts_sent %>% count(label) %>% mutate(share = percent(n / sum(n), 0.1)) %>% kable()
| Positive |
48 |
28.4% |
| Neutral |
62 |
36.7% |
| Negative |
59 |
34.9% |
Overall distribution
dist <- posts_sent %>% count(net)
plot_ly(dist, x = ~net, y = ~n, type = "bar",
marker = list(color = ifelse(dist$net > 0, pal$pos, ifelse(dist$net < 0, pal$neg, pal$neu))),
hovertemplate = "Net %{x}: %{y} posts<extra></extra>") %>%
layout(title = list(text = "Distribution of post sentiment (net Bing score)", x = 0),
xaxis = list(title = "Net score (negative ← 0 → positive)", dtick = 1),
yaxis = list(title = "Posts"))
Words driving the sentiment
sent_words <- tokens %>%
inner_join(bing, by = "word") %>%
count(word, sentiment) %>%
group_by(sentiment) %>%
slice_max(n, n = 10, with_ties = FALSE) %>%
ungroup() %>%
mutate(signed = ifelse(sentiment == "negative", -n, n))
plot_ly(sent_words, x = ~signed, y = ~word, color = ~sentiment, text = ~n,
colors = c(negative = pal$neg, positive = pal$pos),
type = "bar", orientation = "h",
hovertemplate = "%{y}: %{text} mentions<extra></extra>") %>%
layout(title = list(text = "Top positive and negative words", x = 0),
xaxis = list(title = "← negative | positive →"),
yaxis = list(title = "", categoryorder = "array",
categoryarray = sent_words$word[order(sent_words$signed)]),
margin = list(l = 110))
Sentiment over time
sent_trend <- posts_sent %>%
group_by(period) %>%
summarise(n = n(),
mean_net = mean(net),
se = sd(net) / sqrt(n()),
Positive = mean(label == "Positive"),
Neutral = mean(label == "Neutral"),
Negative = mean(label == "Negative"),
.groups = "drop") %>%
filter(n >= params$min_n)
# Average net sentiment (error bars = +/- 1 standard error)
plot_ly(sent_trend, x = ~period, y = ~mean_net, type = "scatter", mode = "lines+markers",
line = list(color = pal$main), marker = list(color = pal$main),
error_y = list(array = ~se, color = "#9bb3d6"),
text = ~paste(n, "posts"),
hovertemplate = "%{x|%b %d, %Y}<br>Mean net: %{y:.2f}<br>%{text}<extra></extra>") %>%
layout(title = list(text = paste("Average sentiment per", params$time_unit), x = 0),
xaxis = list(title = ""),
yaxis = list(title = "Mean net score", zeroline = TRUE),
shapes = list(list(type = "line", x0 = 0, x1 = 1, xref = "paper",
y0 = 0, y1 = 0, line = list(color = "#bbb", dash = "dot"))))
# Share of positive / neutral / negative posts
plot_ly(sent_trend, x = ~period, y = ~Positive, type = "bar", name = "Positive",
marker = list(color = pal$pos)) %>%
add_trace(y = ~Neutral, name = "Neutral", marker = list(color = pal$neu)) %>%
add_trace(y = ~Negative, name = "Negative", marker = list(color = pal$neg)) %>%
layout(barmode = "stack",
title = list(text = "Sentiment mix over time", x = 0),
xaxis = list(title = ""),
yaxis = list(title = "Share of posts", tickformat = ".0%"))
Most positive and most negative posts
show_cols <- function(df) {
df %>% transmute(Date = date, Account = author_handle, Net = net,
Post = str_trunc(str_squish(text), 180))
}
posts_sent %>% slice_max(net, n = 5, with_ties = FALSE) %>% show_cols() %>%
kable(caption = "Most positive")
Most positive
| 2026-07-05 |
landht.bsky.social |
5 |
Hogwarts Legacy 2 Perfect Setting And Era Has Fans More
Excited Than Ever Hogwarts Legacy came out three years ago, and the
ripple effects of its success are still being felt. I… |
| 2026-10-23 |
byteseu.bsky.social |
4 |
Call of Duty: Modern Warfare 4 tops Steam Korea sales
at launch https://www.byteseu.com/2473905/ Call of Duty: Modern
Warfare 4 debuted at No. 1 in Korea as its North Korean inv… |
| 2026-10-16 |
shawntheair.bsky.social |
3 |
Hot Take: Sales wise, this is probably true. But these
games are also multiplatform and have larger install bases. However,
last year’s Call of Duty was panned by fans and criti… |
| 2026-06-15 |
brianpshea.bsky.social |
3 |
The fact that a studio can win several awards just last
year and still get shut down because it doesn’t put up Call of Duty
sales numbers says a lot about this industry’s curren… |
| 2026-04-23 |
thesocialsage.bsky.social |
3 |
Analysts say Xbox Game Pass price cut is ‘not
surprising at all’ since Call of Duty’s addition to the service ’did not
lead to a significant increase in Xbox console sales or ev… |
posts_sent %>% slice_min(net, n = 5, with_ties = FALSE) %>% show_cols() %>%
kable(caption = "Most negative")
Most negative
| 2026-09-22 |
jcpxdesigns.bsky.social |
-4 |
I remember when it first started I thought, oh finally
someone is just as annoyed as me at the gaming press ignoring abuses in
the game industry like excessive crunch, constant … |
| 2026-09-20 |
gamespur.games |
-4 |
Imagine paying actual money to ruin everyone’s lobby.
The state of this industry is truly chaotic, but this breakdown is
honestly wild. https://www.eurogamer.net/activision-vide… |
| 2026-09-20 |
bestdealssnews.bsky.social |
-4 |
Call of Duty maker Activision claims video game
cheating is now a £6.3 billion ($8.5 billion) a year industry Activision
has published a breakdown of the numbers behind cheating… |
| 2026-03-29 |
gallingcrow.bsky.social |
-4 |
i have no idea how Arc raiders became such a success.
it feels like shit and looks indistinguishable from a call of duty
directed by Neil Blomkamp just a viciously ugly game, i … |
| 2026-03-24 |
gigowat.bsky.social |
-4 |
Windows Central より Call of Duty: Black Ops 7 is still
selling ridiculously well, despite being a ‘dead’ game everyone seems to
hate
コール・オブ・デューティ:ブラック・オプス7は、誰もが憎むように見える「死んだ」ゲームにも… |
# Optional second opinion: AFINN scores words from -5 to +5 (captures intensity).
# First run only: install.packages("textdata"); then accept the one-time download prompt.
afinn <- get_sentiments("afinn") %>% filter(!word %in% sentiment_exclude)
afinn_post <- tokens %>%
inner_join(afinn, by = "word") %>%
group_by(uri) %>%
summarise(afinn = sum(value), .groups = "drop")
afinn_trend <- posts %>%
left_join(afinn_post, by = "uri") %>%
mutate(afinn = replace_na(afinn, 0)) %>%
group_by(period) %>%
summarise(n = n(), mean_afinn = mean(afinn), .groups = "drop") %>%
filter(n >= params$min_n)
plot_ly(afinn_trend, x = ~period, y = ~mean_afinn, type = "scatter", mode = "lines+markers",
line = list(color = "#7b5ea7"), text = ~paste(n, "posts"),
hovertemplate = "%{x|%b %d, %Y}<br>Mean AFINN: %{y:.2f}<br>%{text}<extra></extra>") %>%
layout(title = list(text = "AFINN sentiment over time", x = 0),
xaxis = list(title = ""), yaxis = list(title = "Mean AFINN score"))
6. Engagement and sentiment
Engagement over time
eng_trend <- posts %>%
group_by(period) %>%
summarise(n = n(), mean_likes = mean(like_count), median_likes = median(like_count),
.groups = "drop") %>%
filter(n >= params$min_n)
plot_ly(eng_trend, x = ~period, y = ~mean_likes, type = "scatter", mode = "lines+markers",
name = "Mean likes", line = list(color = pal$main), text = ~paste(n, "posts"),
hovertemplate = "%{x|%b %d, %Y}<br>%{y:.1f} likes (%{text})<extra></extra>") %>%
add_trace(y = ~median_likes, name = "Median likes",
line = list(color = pal$neu, dash = "dash")) %>%
layout(title = list(text = paste("Likes per post, by", params$time_unit), x = 0),
xaxis = list(title = ""), yaxis = list(title = "Likes per post"))
Do positive or negative posts get more engagement?
plot_ly(posts_sent, x = ~label, y = ~log1p(engagement), color = ~label,
colors = c(Positive = pal$pos, Neutral = pal$neu, Negative = pal$neg),
type = "box", boxpoints = "all", jitter = 0.4, pointpos = 0,
text = ~str_trunc(str_squish(text), 80),
hovertemplate = "%{text}<br>Engagement: %{customdata}<extra></extra>",
customdata = ~engagement) %>%
layout(title = list(text = "Engagement by sentiment (log scale)", x = 0),
xaxis = list(title = ""), yaxis = list(title = "log(1 + likes + reposts + replies + quotes)"),
showlegend = FALSE)
ct <- cor.test(posts_sent$net, posts_sent$engagement, method = "spearman", exact = FALSE)
Spearman correlation between net sentiment and engagement:
rho = -0.156, p = 0.0426.
Most engaging posts
posts_sent %>%
slice_max(engagement, n = 10, with_ties = FALSE) %>%
transmute(Date = date, Account = author_handle, Engagement = engagement,
Sentiment = as.character(label), Post = str_trunc(str_squish(text), 160)) %>%
kable()
| 2026-02-02 |
queerlybee.bsky.social |
203 |
Neutral |
I’ve seen an uptick in people streaming minecraft
lately & i just want to remind folks that its one of the games
listed on the BDS list to boycott for palest… |
| 2026-06-15 |
brianpshea.bsky.social |
138 |
Positive |
The fact that a studio can win several awards just last
year and still get shut down because it doesn’t put up Call of Duty
sales numbers says a lot about th… |
| 2026-08-07 |
matpiscatella.bsky.social |
83 |
Positive |
Yes, Grand Theft Auto V ranks 1st in both full game
unit and dollar sales in the US over the past decade, while Red Dead
Redemption II ranks 3rd in each. Cal… |
| 2026-09-25 |
alexaray.bsky.social |
49 |
Negative |
The year all of this popped off publicly was the year
the Call of Duty I wrote on, Call of Duty: Vanguard, came out. That
year, the press and gamer communiti… |
| 2026-04-13 |
irishdocsenv.bsky.social |
40 |
Negative |
Updated Statement on Government Response to Fossil Fuel
Blockades. The government is failing to deliver a Just Transition and
instead binding us to further f… |
| 2026-08-14 |
jakesteinberg.substack.com |
34 |
Neutral |
“Good news! You can buy South of Midnight now because
your money won’t go to Xbox Anyway, here are a bunch of Xbox games and
controllers to spend your money … |
| 2026-10-17 |
gnarlyanimal.bsky.social |
32 |
Negative |
we literally have so many good video games coming out
recently and we’re still seeing little think pieces about how gaming is
dead written by niggas with 600… |
| 2026-06-15 |
andyrobinson.bsky.social |
29 |
Negative |
Last year, Compulsion CEO Guillaume Provost said the
studio’s role within Microsoft was“not to make blockbusters like Call of
Duty, but to provide games that… |
| 2026-02-27 |
stephentotilo.bsky.social |
28 |
Negative |
NEW: Major League Baseball took issue this week with
the name of Call of Duty’s “World Series of Warzone” esports series,
citing potential brand confusion Ac… |
| 2026-10-15 |
deanpreston.bsky.social |
25 |
Negative |
This Y Combinator backed tech bro is inciting violence
against people in the Tenderloin. This is one of the most disgusting
things I’ve seen in San Francisco… |