First-level agenda-setting theory predicts that issues featured prominently in media content often will become prominent in the minds of media audiences. One aspect of the process is that limits exist on the resources and space available for creating and publishing media content. As a result, media often must decide which issues to feature less prominently in order to free up resources and space for issues the media consider more newsworthy. In other words, issues end up competing with one another for prominence on the media agenda. At times, media’s felt need to cover one issue extensively may push another issue lower on the media agenda, or off the agenda entirely. At other times, though, the two issues might trade places, with one alternately higher and lower than the other on the media agenda. At still other times, two issues might consistently hold roughly the same degree of prominence on the media agenda.
Drawing on what first-level agenda-setting theory says about this phenomenon, my project will compare the media agenda prominence of two issues: the war in Gaza, between Israel and Hamas, and the war in Ukraine, between Ukraine and Russia. Specifically, the analysis will compare the number of stories per week that APNews.com published about each issue between Jan. 1 and Sept. 30, 2025.
The results will enhance theoretical understanding of how similar-but-distinct issues - two wars that, while more or less equally important, occur in different parts of the world and involve different geopolitical tensions - compete for attention on the media agenda.
Weekly APNews.com coverage volume of the wars in Gaza and Ukraine differed during the first nine months of 2025.
Weekly APNews.com coverage volume of the two wars served as the analysis’s dependent variable. It was measured continuously as the number of stories published per week. The independent variable was “story topic,” measured categorically as either “Gaza” or “Ukraine” and operationalized as containing key words or phrases likely to be unique to stories about one topic or the other. Key words and phrases used to identify stories about the war in Gaza were: “Gaza”, “Israel”, “Hamas”, “Israeli hostages”, and “Palestinian refugees.” Key words and phrases used to identify stories about the war in Ukraine were: “Russia”, “Ukraine”, “Vladimir Putin”, and “Volodymyr Zelenskyy.”
Eventually, I will use a paired-samples t-test to assess the statistical significance of coverage volume variation between the two story topics.
The figure below summarizes each story topic’s weekly coverage volume across the period analyzed. It appears that, for most weeks, APNews.com coverage of the war in Gaza exceeded APNews.com coverage volume of the war in Ukraine.
The most notable difference in volume appeared during Week 25, which was the week between June 16 and June 22. The weekly Gaza-related story count peaked at a period high of 182, compared to only 40 for the Ukraine war. An examination of the Gaza-related stories published during that week revealed heavy coverage of a phase of the Gaza war that saw Israel and Iran engaging in direct military attacks on each other. The significance of open warfare between the two regional powers explains the coverage bump. Notably, there appears to be a corresponding drop in coverage of the war in Ukraine.
The peak for Ukraine-related stories appeared during Week 9, the week between Feb. 24 and March 3. A quick inspection of the week’s 108 Ukraine-related stories revealed coverage noting the third anniversary of Russia’s invasion of Ukraine and, perhaps more significantly, reporting on the contentious meeting between U.S. President Donald Trump and Ukrainian President Volodymyr Zelenskyy in the Oval Office. Once again, the period’s high point for coverage of the war in Ukraine corresponded to a trough in coverage of the war in Gaza.
Overall, the results suggest not only differing levels of APNews.com coverage about the two conflicts but also possible nonrandom links between the level of coverage about one and the level of coverage about the other.
Here is the code that produced the figure.
# ============================================
# APNews text analysis (First-level agenda-setting theory version)
# ============================================
# ============================================
# --- Load required libraries ---
# ============================================
if (!require("tidyverse")) install.packages("tidyverse")
if (!require("tidytext")) install.packages("tidytext")
library(tidyverse)
library(tidytext)
# ============================================
# --- Load the APNews data ---
# ============================================
# Read the data from the web
FetchedData <- readRDS(url("https://github.com/drkblake/Data/raw/refs/heads/main/APNews.rds"))
# Save the data on your computer
saveRDS(FetchedData, file = "APNews.rds")
# remove the downloaded data from the environment
rm (FetchedData)
APNews <- readRDS("APNews.rds")
# ============================================
# --- Flag Topic1-related stories ---
# ============================================
# --- Define Topic1 phrases ---
phrases <- c(
"Gaza",
"Israel",
"Hamas",
"Israeli hostages",
"Palestinian refugees"
)
# --- Escape regex special characters ---
escaped_phrases <- str_replace_all(
phrases,
"([\\^$.|?*+()\\[\\]{}\\\\])",
"\\\\\\1"
)
# --- Build whole-word/phrase regex pattern ---
pattern <- paste0("\\b", escaped_phrases, "\\b", collapse = "|")
# --- Apply matching to flag Topic1 stories ---
APNews <- APNews %>%
mutate(
Full.Text.clean = str_squish(Full.Text), # normalize whitespace
Topic1 = if_else(
str_detect(Full.Text.clean, regex(pattern, ignore_case = TRUE)),
"Yes",
"No"
)
)
# ============================================
# --- Flag Topic2-related stories ---
# ============================================
# --- Define Topic2 phrases ---
phrases <- c(
"Russia",
"Ukraine",
"Vladimir Putin",
"Volodymyr Zelenskyy"
)
# --- Escape regex special characters ---
escaped_phrases <- str_replace_all(
phrases,
"([\\^$.|?*+()\\[\\]{}\\\\])",
"\\\\\\1"
)
# --- Build whole-word/phrase regex pattern ---
pattern <- paste0("\\b", escaped_phrases, "\\b", collapse = "|")
# --- Apply matching to flag Topic2 stories ---
APNews <- APNews %>%
mutate(
Full.Text.clean = str_squish(Full.Text),
Topic2 = if_else(
str_detect(Full.Text.clean, regex(pattern, ignore_case = TRUE)),
"Yes",
"No"
)
)
# ============================================
# --- Visualize weekly counts of Topic1- and Topic2-related stories ---
# ============================================
# --- Load plotly if needed ---
if (!require("plotly")) install.packages("plotly")
library(plotly)
# --- Summarize weekly counts for Topic1 = "Yes" ---
Topic1_weekly <- APNews %>%
filter(Topic1 == "Yes") %>%
group_by(Week) %>%
summarize(Count = n(), .groups = "drop") %>%
mutate(Topic = "Gaza") # Note custom Topic1 label
# --- Summarize weekly counts for Topic2 = "Yes" ---
Topic2_weekly <- APNews %>%
filter(Topic2 == "Yes") %>%
group_by(Week) %>%
summarize(Count = n(), .groups = "drop") %>%
mutate(Topic = "Ukraine") # Note custom Topic2 label
# --- Combine both summaries into one data frame ---
Weekly_counts <- bind_rows(Topic2_weekly, Topic1_weekly)
# --- Fill in missing combinations with zero counts ---
Weekly_counts <- Weekly_counts %>%
tidyr::complete(
Topic,
Week = full_seq(range(Week), 1), # generate all week numbers
fill = list(Count = 0)
) %>%
arrange(Topic, Week)
# --- Create interactive plotly line chart ---
AS1 <- plot_ly(
data = Weekly_counts,
x = ~Week,
y = ~Count,
color = ~Topic,
colors = c("steelblue", "firebrick"),
type = "scatter",
mode = "lines+markers",
line = list(width = 2),
marker = list(size = 6)
) %>%
layout(
title = "Weekly Counts of Topic1- and Topic2-Related AP News Articles",
xaxis = list(
title = "Week Number (starting with Week 1 of 2025)",
dtick = 1
),
yaxis = list(title = "Number of Articles"),
legend = list(title = list(text = "Topic")),
hovermode = "x unified"
)
# ============================================
# --- Show the chart ---
# ============================================
AS1