# xkcd-2165

## Generation divides, the news, Parliament

I can’t find the one I’m thinking of that pokes fun at newscasters being confused that non-boomers are getting elected. Today’s news on a Lib Dem MP coming out as pansexual had an article on BBC that was frankly confused about some of the main terms and the trans* umbrella. This is knowledge that could act as a shibboleth in my social bubble, so I wondered if this was a generational thing.

Wikipedia believes Layla Moran was born 1982, so let’s say Gen X. The natural question then is the age of every other MP.

The evil thing to do would be to scrape Wikipedia for each MPs age. This is explicitly against Wiki’s terms of service, but Wiki are nice and have provided Wikidata which means that it’s fairly easy to grab the current set of MPs, their names and their DOB. (Seriously, click the link, the query is built into the link.)

mp_dob <- read_csv(here::here("/static/data/Wiki/MP DOB.csv")) 
mp_dob %>%
ggplot(aes(x=date_of_birth)) + geom_density() + ggthemes::theme_tufte() +
ggtitle("Density plot of dates of birth of current MPs")

mp_dob %>%
ggplot( aes(y=date_of_birth)) + geom_boxplot() + coord_flip() +
ggthemes::theme_tufte() +
ggtitle("Boxplot of same")

So from the graphs, about 50% of MPs are Boomers, but we’d have to be fuzzy on the boundary to call that!

mp_dob %>%
summarise(median date of birth = median(date_of_birth, na.rm = T)) %>%
knitr::kable()
median date of birth
1968-01-04 12:00:00

Slightly to the right of some of the boundaries of Boom.

mp_dob %>%
mutate(generation = case_when(
date_of_birth < ymd("1965-1-1") ~ "Boomer",
date_of_birth < ymd("1985-1-1") ~ "Gen X",
date_of_birth < ymd("2000-1-1") ~ "Milennial",
TRUE ~ "UNKNOWN"
)) %>%
ggplot(aes(x=generation)) + geom_bar() + ggthemes::theme_tufte()

The Unknowns are quite big, but Gen X almost has a majority in the Commons.

## Conclusion

Gen X are reasonably justified in feeling like the generation that the media have forgotten.

I’m going to come back to this to look at how many PMs or Cabinet Ministers are/have been PPE @ Oxbridge grads, or maybe Etonians.