The evolution of the Queen’s Christmas speech
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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.
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
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.