###Tweets: ##Background: This summit was a notable meeting between the Chinese and US leaders to try and defuse some of the tensions which had been building during that time. It resulted in generally a favorable aspect between the two leaders. In the comparisons of the tweets which came out about that time, it is not overly surprising that the Xi administration linked to terms related to China more and the US administration linked to terms related to the US. The interesting part comes from the comparison of the use terms which came out of the summit, even as the tweets tend to be a rather limited view of the situation and biased to a given topic as the tweets gathered were all in English. From the documents it can be seen that both sides were using generally positive terms in regards to the situation, like relationship compromise and deepening. However, amusingly China referred to itself more than anything other while the US had nations as their most used term.
###Quantitative Text Analysis In the comparison of the presidential inaugural addresses, this is being done on length, word diversity, and readability. Additionally, these addresses can be understood on the cosine similarity and keyness by party. In terms of length, which can be can be understood in the number of tokens needed to process the address. However, despite the want of politicians to talk the number of tokens has not changed overly much across all the addresses. The one which has changed greatly is that of the word choice and complexity. As the decades have moved, and the understanding of who the address is aimed at has changed there is a notable drop in the complexity of the language being used measured in US grade level. Even despite this, there are still a lot of consistent words which will continue to be used between addresses and even addresses of a similar era will remain generally consistent. For example, topics like jobs or drugs will be usually relegated to more modern speakers, but terms like government or people are very often present with good reason. These are notable and well crafted address which are meant to be a summation of nation concerns and the beginning of some era of change, but these sorts of consistencies between addresses point to an amusing level of irony behind that particular concept.
Data Note: CPD collection
source: GovInfo Permission: Agreement Query: API Selection: 2021-01-20 forward gaps: Only goverment documents
Tweet and API comparison
GovInfo Compilation of Presidential Documents (CPD) & Xi-Biden Summit Tweets Description: 1. Collect every document from the Compilation of Presidential Documents (CPD) collection mentioning “Xi Jinping” since 20 January 2021 via the GovInfo Search API. 2. Analyzes the November 2021 Biden-Xi virtual summit tweets dataset using quanteda: - Keywords-in-Context (kwic()) around President Xi and summit discussions. - Differential keyness (textstat_keyness()) comparing rhetorical framing between the Biden and Xi administrations.
package_id date_issued
DCPD-2026DIGEST 2026-10-16
DCPD-2026CHECKLIST 2026-10-16
DCPD-202600638 2026-09-24
DCPD-202600636 2026-09-24
DCPD-202600635 2026-09-23
DCPD-202600631 2026-09-22
DCPD-202600630 2026-09-22
DCPD-202600620 2026-09-18
DCPD-202600601 2026-09-12
DCPD-202600598 2026-09-11
title
Digest of Other White House Announcements
Checklist of White House Press Releases
Remarks at a State Dinner Honoring President Xi Jinping of China
Remarks at a Welcoming Ceremony for President Xi Jinping of China
Remarks in an Exchange With Reporters Upon Arrival From Joint Base Andrews, Maryland
Remarks Prior to a Meeting With Prime Minister Sanae Takaichi of Japan and an Exchange With Reporters in New York City
Remarks Following a Meeting With Prime Minister Andy Burnham of the United Kingdom and an Exchange With Reporters in New York City
Remarks on Prescription Drug Prices and an Exchange With Reporters
Remarks to United States Embassy Personnel and Business Leaders in Dublin, Ireland
Presidential Determination on Major Drug Transit or Major Illicit Drug Producing Countries for Fiscal Year 2027
size_mb status
0.80 Already Downloaded
0.33 Already Downloaded
0.24 Already Downloaded
0.23 Already Downloaded
0.24 Already Downloaded
0.23 Already Downloaded
0.26 Already Downloaded
0.34 Already Downloaded
0.28 Already Downloaded
0.25 Already Downloaded
pre keyword
president biden communist china leader xi
biden urges guardrails conflict virtual xi
president joe biden chinese counterpart xi
biden opens virtual summit china's xi
breakthrough first virtual summit biden xi
held virtual summit chinese president xi
joe biden xi
china unleashing covid-19 world summit xi
#xijinping virtual summit #biden told xi
bosses you’ll realize just condescending xi
post
jinpig pledged virtual summit improve
summit
jinping expected discuss damage control
white house #breakingnews #biden #china
biden said u.s.will work dvance
jinping historic meeting man runs
jinping kick virtual summit expected
jinping
#america sever relations impose severe
biden summit interaction especially old
pre keyword
president joe biden chinese counterpart xi jinping
held virtual summit chinese president xi jinping
joe biden xi jinping
china unleashing covid-19 world summit xi jinping
president joe biden chinese president xi jinping
hold virtual summit chinese president xi jinping
us maintaining close communication facilitate xi jinping
president biden tells chinese president xi jinping
joe biden criticised decision president xi jinping
joe biden xi jinping
post
expected discuss damage control rather
historic meeting man runs united
kick virtual summit expected last
monday
joe biden virtual summit chinese
looking forward candid forthright discussion
attend glasgow summit accusing china
discuss complex nature ties two
keyword pre post
biden breaking news us president communist china leader xi
xi biden communist china leader jinpig pledged virtual summit
summit xi jinpig pledged virtual improve cooperation china offered
biden recap urges guardrails conflict virtual
xi urges guardrails conflict virtual summit
summit guardrails conflict virtual xi
biden u.s president joe chinese counterpart xi jinping
xi joe biden chinese counterpart jinping expected discuss damage
summit key differences main focus later today washington time
biden #breaking opens virtual summit china's
summit #breaking biden opens virtual china's xi white house
xi opens virtual summit china's white house #breakingnews #biden
# g_dispersion <- textplot_xray(# kwic(toks, pattern = "xi"),# kwic(toks, pattern = "biden"),# kwic(toks, pattern = "summit"),# kwic(toks, pattern = "taiwan")# ) +# theme_bw() +# labs(title = "Lexical Dispersion of Summit Keywords Across Tweet Stream",# x = "Token Position in Corpus", y = "Keyword")# print(g_dispersion)biden_regex <-"\\b(biden|joe|potus|whitehouse|washington|us|u\\.s|usa|america|american)\\b"xi_regex <-"\\b(xi|jinping|china|chinese|beijing|ccp|prc)\\b"raw_texts <-tolower(as.character(tweet_corpus))has_biden <-str_detect(raw_texts, biden_regex)has_xi <-str_detect(raw_texts, xi_regex)docvars(tweet_corpus, "admin_focus") <-case_when( has_biden &!has_xi ~"Biden_Admin",!has_biden & has_xi ~"Xi_Admin", has_biden & has_xi ~"Bilateral",TRUE~"Other")cat("Distribution of tweets by administration focus:\n")
Warning: package 'quanteda.textmodels' was built under R version 4.5.3
Warning: package 'tidyr' was built under R version 4.5.3
inaug_corpus <- data_corpus_inauguralsummary_info <-summary(inaug_corpus, n =5)print(summary_info)
corpus of 60 documents, showing 5 documents:
Text Types Tokens Sentences Year President FirstName
1789-Washington 625 1537 24 1789 Washington George
1793-Washington 96 147 5 1793 Washington George
1797-Adams 826 2577 37 1797 Adams John
1801-Jefferson 717 1923 43 1801 Jefferson Thomas
1805-Jefferson 804 2380 45 1805 Jefferson Thomas
Party
none
none
Federalist
Democratic-Republican
Democratic-Republican
Year President Length
1793 Washington 147
1945 Roosevelt 633
1865 Lincoln 775
1905 Roosevelt 1079
1849 Taylor 1178
p_length <-ggplot(metrics_df, aes(x = Year, y = Length, color = Party)) +geom_point(size =2.5, alpha =0.8) +geom_smooth(method ="loess", color ="darkgray", se =FALSE, linetype ="dashed") +theme_minimal() +labs(title ="Length of U.S. Presidential Inaugural Addresses Over Time",subtitle ="Word count measured by ntoken(); historical peak in 1841 (W.H. Harrison)",x ="Year", y ="Token Count" )print(p_length)
Year President Length TTR
1789 Washington 1537 0.7806748
1793 Washington 147 0.9354839
1797 Adams 2577 0.6542056
1801 Jefferson 1923 0.7293973
1805 Jefferson 2380 0.6726014
1809 Madison 1261 0.8326996
p_lexdiv <-ggplot(metrics_df, aes(x = Year, y = TTR)) +geom_point(aes(color = Party), size =2.5) +geom_smooth(method ="loess", se =TRUE, color ="steelblue") +theme_minimal() +labs(title ="Lexical Diversity (TTR) Across Inaugural Addresses",subtitle ="Vocabulary repetition vs. richness across historical eras",x ="Year", y ="Type-Token Ratio (TTR)" )print(p_lexdiv)
`geom_smooth()` using formula = 'y ~ x'
readability_res <-textstat_readability( inaug_corpus,measure =c("Flesch.Kincaid", "Flesch"))metrics_df$Flesch_Kincaid <- readability_res$Flesch.Kincaidmetrics_df$Flesch_Ease <- readability_res$Fleschcat("\nReadability by Era (Flesch-Kincaid Grade Level):\n")
Readability by Era (Flesch-Kincaid Grade Level):
cat("Earliest 5 Speeches Mean Grade Level:", round(mean(head(metrics_df$Flesch_Kincaid, 5)), 1), "\n")
Earliest 5 Speeches Mean Grade Level: 23.1
cat("Latest 5 Speeches Mean Grade Level:", round(mean(tail(metrics_df$Flesch_Kincaid, 5)), 1), "\n")
Latest 5 Speeches Mean Grade Level: 9.3
p_readability <-ggplot(metrics_df, aes(x = Year, y = Flesch_Kincaid)) +geom_point(aes(color = Party), size =2.5) +geom_smooth(method ="lm", se =TRUE, color ="firebrick") +theme_minimal() +labs(title ="Historical Decline in Inaugural Address Reading Level",subtitle ="Flesch-Kincaid Grade Level steadily dropped from collegiate/graduate to 8th-10th grade",x ="Year", y ="Flesch-Kincaid Grade Level (U.S. School Grade)" )print(p_readability)
`geom_smooth()` using formula = 'y ~ x'
dfm_trimmed <-dfm_trim(inaug_dfm, min_termfreq =5, min_docfreq =3)cos_matrix <-as.matrix(textstat_simil(dfm_trimmed, method ="cosine"))n_docs <-nrow(cos_matrix)predecessor_sim <-numeric(n_docs)predecessor_sim[1] <-NAfor (i in2:n_docs) { predecessor_sim[i] <- cos_matrix[i, i -1]}metrics_df$Predecessor_Sim <- predecessor_simp_sim <-ggplot(na.omit(metrics_df), aes(x = Year, y = Predecessor_Sim)) +geom_line(color ="darkgray") +geom_point(aes(color = Party), size =2.5) +theme_minimal() +labs(title ="Rhetorical Continuity with Immediate Predecessor",subtitle ="Cosine similarity between consecutive inaugural addresses over time",x ="Year", y ="Cosine Similarity" )print(p_sim)
# Plot keynessp_keyness <-textplot_keyness( keyness_party,n =15,margin =0.2,color =c("dodgerblue3", "firebrick3")) +theme_minimal() +labs(title ="Differential Word Keyness by Political Party",subtitle ="Target = Democratic Party | Reference = Republican Party (Chi-squared measure)",x ="Chi-squared Statistic" )print(p_keyness)
wf_model <-textmodel_wordfish(dfm_trimmed, dir =c(1, ndoc(dfm_trimmed)))metrics_df$Theta <- wf_model$thetametrics_df$SE_Theta <- wf_model$se.thetacat("\nSummary of Wordfish Theta Estimates:\n")
Summary of Wordfish Theta Estimates:
summary(metrics_df$Theta)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-1.3197 -0.9742 -0.1805 0.0000 1.0412 1.5086
textplot_scale1d(wf_model, margin ="documents")
p_wf_time <-ggplot(metrics_df, aes(x = Year, y = Theta, color = Party)) +geom_point(size =3, alpha =0.85) +geom_errorbar(aes(ymin = Theta -1.96* SE_Theta, ymax = Theta +1.96* SE_Theta), width =1.5, alpha =0.4) +geom_smooth(aes(group =1), method ="loess", color ="darkgray", se =FALSE, linetype ="dashed") +theme_minimal() +labs(title ="Wordfish Latent Dimension (Theta) Over Time",subtitle ="Unsupervised scaling reveals clear chronological language evolution across centuries",x ="Year", y ="Estimated Latent Position (Theta)" )print(p_wf_time)
`geom_smooth()` using formula = 'y ~ x'
textplot_scale1d(wf_model, margin ="features") +labs(title ="Wordfish Feature Estimates: Word Weight (Beta) vs Word Marginal Frequency (Psi)",subtitle ="Outlier words have the highest discriminatory power across speeches" )
wf_features <-data.frame(word = wf_model$features,beta = wf_model$beta,psi = wf_model$psi,stringsAsFactors =FALSE)cat("\nTop Words on Negative Scale (Historical/Early Era):\n")
Top Words on Negative Scale (Historical/Early Era):