Created
January 27, 2017 22:55
-
-
Save jblumenau/e7a8e0b2e3fd6bfa6f93b22d2e710943 to your computer and use it in GitHub Desktop.
testing the member query api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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