The evolution of the Queen’s Christmas speech

December 22, 2014

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

Every year since her inauguration in 1952, Queen Elizabeth II has delivered a Christmas Broadcast to her subjects. Dominic Nyhuis used R to analyze the transcripts of the speeches, and found some interesting trends in speech length and words used. Here, for example, are word clouds of the speeches from the first half (1962-1976) and second half (1977-2001) of ER2's reign.

Queen1   Queen2

If you'd like to analyze similar transcripts yourself, Dominic's R code provides a good place to start. He used Selenium (controlled by RWebDriver) to automate the process of directing a browser to scrape the transcripts from the Official Website of the British Monarchy. The XML package is used to extract the transcript itself from the page source. Next, stringr is used to decompose the speeches into words. Finally, the word clouds were generated using the wordcloud package (using a Wes Anderson inspired color palette). 

To see more analysis and the complete R code used to generate it, follow the link below.

Automated Data Collection with R Blog: 50 years of Christmas at the Windsors

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)