Using R to scrape and analyze Wikipedia data on all UK prime ministers, this post explores historical patterns in prime ministerial tenure. It includes Gantt-style charts, duration distributions, and a decade-by-decade count of prime ministers — prompted by Keir Starmer's resignation. Key findings: Robert Walpole was the longest-serving PM, the 1830s saw the highest turnover, and the Thatcher-Blair era was unusually stable compared to recent rapid turnover.
Table of contents
Downloading prime ministerial data from WikipediaMost and longest serving prime ministersGraphic summaries736 Impressions