This report analyzes news headlines that mentioned Donald Trump between August 3, 2026 and October 4, 2026. The headlines were collected from Media Cloud’s United States - National collection, which provides news coverage from sources across the country. The purpose of this report is to identify which words appeared most frequently throughout the selected headlines and use those patterns to better understand what subjects received attention in the news during this period. Using text analysis in R, I break each headline into individual words, a process known as tokenization, and calculate how often each word appears across the dataset. I then create a table showing the five most common words and a bar chart displaying the 25 most frequent words. Before counting the words, I remove common English stop words and selected terms that are too general to provide much information about the topics being covered. This process helps make the results more useful by bringing attention to words that may be connected to specific people, events, political issues and other subjects discussed in the news.
The dataset contains 54,686 headlines after removing entries with missing or empty titles. Each headline serves as a separate source of text that can be analyzed to identify patterns in the coverage. I used several R packages to complete the analysis. The tidyverse package helps organize and manipulate the data, while tidytext provides tools for breaking the headlines into individual words. The stop words package supplies a list of common English words that can be removed before counting. The stringr package helps clean the text and filter out unwanted characters, and knitr is used to format the results into a readable table. Once the data is loaded, I check that the expected title column exists and remove headlines that do not contain usable text. Preparing the data set this way helps prevent missing information from interfering with the analysis and ensures that the word counts are based on actual headline text.
The first step in the text analysis is to break each headline into individual words. This process is called tokenization, and each individual word is referred to as a unigram. All words are converted to lowercase so that the same word is not counted separately because of capitalization. For example, a word appearing at the beginning of a headline should be counted together with the same word appearing in the middle of another headline. After tokenizing the headlines, I remove common English stop words such as “the,” “and” and “of.” These words appear frequently in everyday language but usually do not reveal much about the main subject of a news story.
I also remove selected words that are especially common in political headlines or provide limited information about the specific topics being discussed. This includes Trump’s name and title, generic terms such as “new” and “latest,” common reporting words and web-related text. Removing these terms helps bring other people, events and issues into the results rather than allowing general headline language to dominate the word counts. I then filter out tokens that contain numbers or punctuation and exclude words with only one character. These cleaning decisions make the final list easier to interpret, although they also influence which words appear most frequently. The results should therefore be understood as a look at the vocabulary remaining after cleaning rather than a complete representation of every subject discussed in the original headlines.
This table presents the five most frequently occurring words after the headlines have been cleaned and tokenized. Each word is listed alongside its total frequency, which represents the number of times it appeared across the retained headline text. The table also includes the percentage of all retained word occurrences represented by each word. This percentage is calculated by dividing a word’s frequency by the total number of words remaining after cleaning. It is important to understand that this does not represent the percentage of headlines containing the word, since the same word could appear multiple times or appear in several different headlines. Looking at the five most common words provides a quick overview of the vocabulary that appeared most often in the collection. These results can help identify recurring subjects for further investigation, although the frequency of a word alone does not explain the context in which it was used or whether the coverage presented a positive, negative or neutral perspective.
| Word | Frequency | Percent of Retained Words |
|---|---|---|
| us | 5710 | 1.31 |
| iran | 2840 | 0.65 |
| war | 2170 | 0.50 |
| court | 2013 | 0.46 |
| gop | 1921 | 0.44 |
The bar chart displays the 25 most frequently occurring unigrams after the text-cleaning process. Each bar represents one word, and the length of the bar indicates how many times that word appeared across the headlines. The words are arranged by frequency to make it easier to compare the most common terms with those that appeared less often. Numerical labels are included beside the bars so that the frequency of each word can be read without estimating from the chart’s axis. By displaying the results visually, the chart makes recurring vocabulary easier to identify than a list of word counts alone. The most frequent terms may point toward people, events or issues that received repeated attention during the selected period. However, the chart does not show whether a word was used in a positive or negative context, and it does not measure the overall tone of the news coverage. Instead, it provides a starting point for identifying patterns that could be explored further by examining the original headlines or comparing the words with coverage from another time period.
The word-frequency results provide a starting point for understanding the topics that appeared most often in this collection of Trump-related news headlines. By breaking the headlines into individual words and counting their occurrences, the analysis identifies terms that received repeated attention during the selected time period. The table highlights the five most common retained words, while the bar chart compares the 25 most frequent terms. Together, these visualizations make it easier to see which words appeared most often and provide a foundation for further examination of the news coverage.
Removing common English stop words helps reduce the influence of words that connect sentences but usually do not describe the subject of a story. Removing Trump’s name and selected generic headline terms also helps bring other topics into view. However, these cleaning decisions affect which words appear in the results. A word that is important to the coverage could be excluded if it appears on the custom stop-word list. The results should therefore be considered in the context of the choices made during data preparation.
Word counts also have limitations. A frequently appearing word does not necessarily mean that a topic received positive or negative coverage. The same word can appear in stories with very different perspectives, and individual words do not show how terms are related to one another. The analysis also counts repeated words across headlines rather than measuring how many separate headlines contain each word. In addition, the findings represent a specific collection of news headlines from August 3 through October 4, 2026, so they should not automatically be generalized to all news coverage or other time periods.
Overall, this report uses unigram analysis to identify recurring vocabulary in the selected news collection. The results can help point toward topics worth examining more closely, but they should be interpreted alongside the original headlines and the time period in which the stories were published. Examining the actual top-ranked words is necessary to make more specific claims about which people, issues or events received the most attention.
The following appendix contains the main R script used to load the dataset, clean and tokenize the headlines, count word frequencies, create the top-five table and generate the bar chart.
library(tidyverse)
library(tidytext)
library(stopwords)
library(stringr)
library(knitr)
if (!file.exists("Trump_story_headlines.rds")) {
download.file(
url = "https://github.com/drkblake/Data/raw/refs/heads/main/Trump_story_headlines.rds",
destfile = "Trump_story_headlines.rds",
mode = "wb"
)
}
headlines <- readRDS("Trump_story_headlines.rds")
stopifnot("title" %in% names(headlines))
headlines <- headlines %>%
filter(!is.na(title), str_trim(title) != "")
custom_stop_words <- c(
"trump", "donald", "president", "white", "house", "administration",
"says", "said", "say", "amid", "new", "live", "latest", "update",
"watch", "video", "report", "reports", "according", "breaking",
"exclusive", "via", "amp", "https", "http", "www", "com",
"reuters", "associated", "press"
)
headline_words <- headlines %>%
select(title) %>%
unnest_tokens(output = word, input = title, token = "words") %>%
anti_join(tibble(word = stopwords::stopwords("en")), by = "word") %>%
filter(
str_detect(word, "^[a-z]+$"),
!word %in% custom_stop_words,
str_length(word) > 1
)
word_counts <- headline_words %>% count(word, sort = TRUE)
top_25_words <- word_counts %>%
slice_max(order_by = n, n = 25, with_ties = FALSE) %>%
arrange(n)
total_words <- sum(word_counts$n)
top_5_words <- word_counts %>%
slice_max(order_by = n, n = 5, with_ties = FALSE) %>%
mutate(percent_of_words = round(n / total_words * 100, 2))
knitr::kable(
top_5_words %>%
transmute(Word = word, Frequency = n,
`Percent of Retained Words` = percent_of_words),
caption = "Five Most Frequent Words"
)
ggplot(top_25_words, aes(x = reorder(word, n), y = n)) +
geom_col(fill = "steelblue", width = 0.75) +
geom_text(aes(label = scales::comma(n)), hjust = -0.15, size = 3.5) +
coord_flip() +
scale_y_continuous(labels = scales::comma,
expand = expansion(mult = c(0, 0.15))) +
labs(title = "What Dominated Trump News Headlines?",
subtitle = "25 most frequent words after text cleaning",
x = NULL, y = "Word occurrences",
caption = "Source: Media Cloud, August 3-October 4, 2026") +
theme_minimal(base_size = 12) +
theme(plot.title = element_text(face = "bold"),
panel.grid.major.y = element_blank())