Skip to content

Instantly share code, notes, and snippets.

@jblumenau
Created January 27, 2017 22:55
Show Gist options
  • Save jblumenau/e7a8e0b2e3fd6bfa6f93b22d2e710943 to your computer and use it in GitHub Desktop.
Save jblumenau/e7a8e0b2e3fd6bfa6f93b22d2e710943 to your computer and use it in GitHub Desktop.
testing the member query api
library(xml2)
members <- read_xml("http://data.parliament.uk/membersdataplatform/services/mnis/members/query/membership=all|house=Commons")
start_dates <- xml_text(xml_find_all(xml_find_all(members, "Member"),"HouseStartDate"))
start_dates <- as.Date(start_dates)
table(start_dates > as.Date("1945-01-01"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment