Between January and September 2026, the number of media stories produced about artificial intelligence dwarfed the number of stories written about climate change.
This analysis of news topics was completed using data maintained and aggregated by the online service Media Cloud, an open-source platform used for media analysis. The analysis examined the number of news stories produced on these topics, by week, from January 4, 2026, through the week of August 30, 2026.
The analysis shows a tremendous amount of media attention dedicated to the topic of artificial intelligence.
For example, the period with the most coverage of AI topics was the week of May 10, 2026, which had 2,342 stories produced. By comparison, the same week had only 817 stories produced regarding climate change. So during this time, there were nearly three stories about AI for every story dealing with the topic of climate change.
As another point of measurement, the week with the lowest number of stories about AI — 1,246 — was the week of March 29, 2026. During the same week, by comparison, there were 849 stories written about climate change. A week-by-week plot is available in the interactive graphic below.
These data are a clear example of agenda setting, which is a media communications theory stating that while the news media does not tell the public what to think, it does tell the public what to think about. Considering the high number of stories produced about AI, the media coverage compels the public to believe that AI is a more important topic than climate change, at least during the time period analyzed.
Hover over a week to compare story counts for the two topics of Artificial Intelligence and Climate Change.
The following code extracts the data and creates the interactive graphic. The API key is excluded.
############################################################
# MEDIACLOUD ANALYSIS: INTERACTIVE WEEKLY LINE CHART
############################################################
############################################################
# STEP 1: Install Required Packages if Needed
############################################################
required_packages <- c(
"tidyverse",
"httr2",
"lubridate",
"plotly"
)
for (pkg in required_packages) {
if (!requireNamespace(pkg, quietly = TRUE)) {
install.packages(
pkg,
repos = "https://cloud.r-project.org"
)
}
}
############################################################
# STEP 2: Load Packages
############################################################
library(tidyverse)
library(httr2)
library(lubridate)
library(plotly)
############################################################
# STEP 3: Verify MediaCloud API Key
############################################################
# The key is stored outside this document.
# Never include your API key in a publicly shared script.
if (!nzchar(Sys.getenv("MEDIACLOUD_KEY"))) {
stop(
"No MediaCloud API key was found. ",
"Set MEDIACLOUD_KEY in your private R session ",
"or .Renviron file before knitting."
)
}
############################################################
# STEP 4: Define Topics
############################################################
# Quotation marks tell MediaCloud to search exact phrases.
topics <- c(
"Artificial Intelligence" = "\"artificial intelligence\"",
"Climate Change" = "\"climate change\""
)
############################################################
# STEP 5: Define the Date Range
############################################################
# Begin on Sunday and end on Saturday.
start_date <- "2026-01-04"
end_date <- "2026-09-05"
############################################################
# STEP 6: Create Function to Download Daily Story Counts
############################################################
get_counts <- function(query) {
# Pause between requests to reduce rate-limit errors.
Sys.sleep(35)
response <-
request(
"https://search.mediacloud.org/api/search/count-over-time"
) |>
req_headers(
Authorization = paste(
"Token",
Sys.getenv("MEDIACLOUD_KEY")
)
) |>
req_url_query(
q = query,
start = start_date,
end = end_date,
platform = "onlinenews-mediacloud",
cs = 34412234
) |>
req_perform()
results <- resp_body_json(response)
map_dfr(
results$count_over_time$counts,
as_tibble
) |>
mutate(
date = as.Date(date)
)
}
############################################################
# STEP 7: Download Data for Both Topics
############################################################
topic_data <-
imap_dfr(
topics,
function(search_query, topic_name) {
get_counts(search_query) |>
mutate(
topic = topic_name
)
}
)
############################################################
# STEP 8: Calculate Weekly Story Counts
############################################################
# Each week begins on Sunday.
weekly_counts <-
topic_data |>
mutate(
week = floor_date(
date,
unit = "week",
week_start = 7
)
) |>
group_by(
topic,
week
) |>
summarise(
stories = sum(
count,
na.rm = TRUE
),
.groups = "drop"
) |>
arrange(
topic,
week
)
############################################################
# STEP 9: Create the Interactive Plotly Chart
############################################################
# %{y:,.0f} displays whole-number counts with commas.
# %{x|%b %d, %Y} displays the week as a readable date.
# <extra></extra> removes the redundant trace-name box.
Plotly_Graphic <-
plot_ly(
data = weekly_counts,
x = ~week,
y = ~stories,
color = ~topic,
colors = "Set1",
type = "scatter",
mode = "lines+markers",
customdata = ~topic,
line = list(
width = 2
),
marker = list(
size = 6
),
hovertemplate = paste0(
"<b>Topic:</b> %{customdata}<br>",
"<b>Story count:</b> %{y:,.0f}<br>",
"<b>Week beginning:</b> %{x|%b %d, %Y}",
"<extra></extra>"
)
) |>
layout(
title = list(
text = "Weekly Media Coverage Volume"
),
xaxis = list(
title = "Week Beginning (Sunday)",
type = "date",
tickformat = "%b %d",
hoverformat = "%b %d, %Y"
),
yaxis = list(
title = "Number of Stories",
tickformat = ",.0f",
rangemode = "tozero"
),
legend = list(
title = list(
text = "Topic"
)
),
hovermode = "x unified",
separators = ".,"
)
############################################################
# STEP 10: Display the Interactive Chart
############################################################
print(Plotly_Graphic)