- Peter Tapsell (Conservative Party, Louth and Horncastle) source 1959
- Alan Beith (Liberal Democrats, Berwick-upon-Tweed) source 1973
- John Stanley (Conservative Party, Tonbridge and Malling) source 1974
- George Young (Conservative Party, North West Hampshire) source 1974
- Malcolm Rifkind (Conservative Party, Kensington) source 1974
- Austin Mitchell (Labour Party, Great Grimsby) source 1977
- Jack Straw (Labour Party, Blackburn) source 1979
- Stephen Dorrell (Conservative Party, Charnwood) source 1979
- Frank Dobson (Labour Party, Holborn and St Pancras) source 1979
- Richard Shepherd (Conservative Party, Aldridge-Brownhills) source 1979
- Malcolm Bruce (Liberal Democrats, Gordon) source 1983
- Richard Ottaway (Conservative Party, Croydon South) source 1983
- Francis Maude (Conservative Party, Horsham) source 1983
- Tim Yeo (Conservative Party, South Suffolk) source 1983
- Gordon Brown (Labour Party, Kirkcaldy and Cowdenbeath) source 1983
- Tony Baldry (Conservative Party, Banbury) source 1983
- Nick Raynsford (Labour Party, Greenwich and Woolwich) source 1986
- James Arbuthnot (Conservative Party, North East Hampshire) source 1987
- Joan Ruddock (Labour Party, Lewisham, Deptford) source 1987
- Alistair Darling (Labour Party, Edinburgh South West) source 1987
- David Blunkett (Labour Party, Sheffield, Brightside and Hillsborough) source 1987
- Joan Walley (Labour Party, Stoke-on-Trent North) source 1987
- Dawn Primarolo (Labour Party, Bristol South) source 1987
- Paul Murphy (Labour Party, Torfaen) source 1987
- Frank Doran (Labour Party, Aberdeen North) source 1987
- Ming Campbell (Liberal Democrats, North East Fife) source 1987
- James Paice (Conservative Party, South East Cambridgeshire) source 1987
- William Hague (Conservative Party, Richmond (Yorks)) source 1989
- Joe Benton (Labour Party, Bootle) source 1990
- Peter Hain (Labour Party, Neath) source 1991
- Bob Ainsworth (Labour Party, Coventry North East) source 1992
- Peter Luff (Conservative Party, Mid Worcestershire) source 1992
- George Mudie (Labour Party, Leeds East) source 1992
- Andrew Robathan (Conservative Party, South Leicestershire) source 1992
- Tessa Jowell (Labour Party, Dulwich and West Norwood) source 1992
- James Clappison (Conservative Party, Hertsmere) source 1992
- Charles Hendry (Conservative Party, Wealden) source 1992
- Hugh Bayley (Labour Party, York Central) source 1992
- John Denham (Labour Party, Southampton, Itchen) source 1992
- David Willetts (Conservative Party, Havant) source 1992
- Glenda Jackson (Labour Party, Hampstead and Kilburn) source 1992
- Don Foster (Liberal Democrats, Bath) source 1992
- Andrew Miller (Labour Party, Ellesmere Port and Neston) source 1992
- Jonathan Evans (Conservative Party, Cardiff North) source 1992
- Elfyn Llwyd (Plaid Cymru - The Party of Wales, Dwyfor Meirionnydd) source 1992
- Gerry Sutcliffe (Labour Party, Bradford South) source 1994
- Andrew Stunell (Liberal Democrats, Hazel Grove) source 1997
- Robert Walter (Conservative Party, North Dorset) source 1997
- Hazel Blears (Labour Party, Salford and Eccles) source 1997
- David Heath (Liberal Democrats, Somerton and Frome) source 1997
- David Ruffley (Conservative Party, Bury St Edmunds) source 1997
- Shaun Woodward (Labour Party, St Helens South and Whiston) source 1997
- John Randall (Conservative Party, Uxbridge and South Ruislip) source 1997
- Mike Wood (Labour Party, Batley and Spen) source 1997
- Martin Caton (Labour Party, Gower) source 1997
- Andy Love (Labour Party, Edmonton) source 1997
- Anne McGuire (Labour Party, Stirling) source 1997
- Dave Watts (Labour Party, St Helens North) source 1997
- Andrew Lansley (Conservative Party, South Cambridgeshire) source 1997
- Stephen O'Brien (Conservative Party, Eddisbury) source 1999
- Eric Joyce (Labour Party, Falkirk) source 2000
- Meg Munn (Labour Party, Sheffield, Heeleypa) source 2001
- Annette Brooke (Liberal Democrats, Mid Dorset and North Poole) source 2001
- Tony Cunningham (Labour Party, Workington) source 2001
- Hywel Francis (Labour Party, Aberavon) source 2001
- Mark Hoban (Conservative Party, Fareham) source 2001
- David Hamilton (Labour Party, Midlothian) source 2001
- David Heyes (Labour Party, Ashton-under-Lyne) source 2001
- Hugh Robertson (Conservative Party, Faversham and Mid Kent) source 2001
- Mark Simmonds (Conservative Party, Boston and Skegness) source 2001
- Greg Barker (Conservative Party, Bexhill and Battle) source 2001
- Dai Havard (Labour Party, Merthyr Tydfil and Rhymney) source 2001
- Sarah Teather (Liberal Democrats, Brent Central) source 2003
- Brooks Newmark (Conservative Party, Braintree) source 2005
- Brian Binley (Conservative Party, Northampton South) source 2005
- Linda Riordan (Labour Party, Halifax) source 2005
- Conor Murphy (Sinn Féin, Newry and Armagh) source 2005
- Sian James (Labour Party, Swansea East) source 2005
- Jeremy Browne (Liberal Democrats, Taunton Deane) source 2005
- Lindsay Roy (Labour Party, Glenrothes) source 2008
- Ian Swales (Liberal Democrats, Redcar) source 2010
- Dan Byles (Conservative Party, North Warwickshire) source 2010
- Michael Weatherley (Conservative Party, Hove) source 2010
- Lorraine Fullbrook (Conservative Party, South Ribble) source 2010
- Aidan Burley (Conservative Party, Cannock Chase) source 2010
- Jessica Lee (Conservative Party, Erewash) source 2010
- Chris Kelly (Conservative Party, Dudley South) source 2010
- Laura Sandys (Conservative Party, South Thanet) source 2010
Last active
August 29, 2015 14:16
-
-
Save andylolz/8dba04a31ea06f4ab946 to your computer and use it in GitHub Desktop.
MPs not standing for re-election in 2015. (The year of each MP’s earliest parliamentary membership is also shown)
This file contains 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
import requests | |
import time | |
tmpl = "http://yournextmp.popit.mysociety.org/api/v0.1/search/persons?q=_missing_:standing_in.2015.post_id%20AND%20identifiers.scheme:%22uk.org.publicwhip%22&page={}" | |
more = True | |
page = 0 | |
mps = [] | |
while more: | |
page += 1 | |
print 'Current page: %d' % page | |
j = requests.get(tmpl.format(page)).json() | |
more = j['has_more'] | |
mps += j['result'] | |
time.sleep(0.5) | |
for x in mps: | |
if x["standing_in"] is None or "2015" not in x["standing_in"]: | |
continue | |
success = False | |
for b in x["identifiers"]: | |
if b["scheme"] == "uk.org.publicwhip": | |
if b["identifier"].split("/")[-1] in z: | |
success = True | |
if not success: | |
continue | |
for i, v in enumerate(x["versions"]): | |
if "2015" not in v["data"]["standing_in"] or v["data"]["standing_in"]["2015"] is not None: | |
source = x["versions"][i-1]["information_source"] | |
# TODO: check source is a valid URL | |
print " * [%s](https://yournextmp.com/person/%s) (%s, %s) [source](%s)" % (x["name"], x["id"], x["party_memberships"]["2010"]["name"], x["standing_in"]["2010"]["name"], source) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently unknown:
Patrick McLoughlin (Conservative Party, Derbyshire Dales)