Built with blockbuilder.org
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title> Brexit Indicative Votes </title>
</head>
<script src="https://d3js.org/d3.v5.min.js" charset="utf-8"></script>
<link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Karla' rel='stylesheet'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" charset="utf-8">
<script src="https://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js"></script>
<script src='https://code.jquery.com/jquery-1.9.1.min.js'></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" charset="utf-8"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.0.4/fuse.min.js'></script>
<div class="dropdown">
<select id="d3-dropdown">
<option value="All">All</option>
<option value="Con">Conservative</option>
<option value="Lab">Labour</option>
<option value="SNP">Scottish National Party</option>
<option value="LD">Liberal Democrats</option>
<option value="TIG">The Independent Group</option>
<option value="DUP">Democratic Unionist</option>
<option value="Ind">Independents</option>
<option value="SF">Sinn Féin</option>
<option value="PC">Plaid Cymru</option>
<option value="Grn">Green</option>
<option value="Oth">Other</option>
</select>
<p id="selected-dropdown"></p>
<div class="selectory">
<select id="selectNumber">
<option>Choose an MP</option>
</select>
</body>
</html>
<style>
body {
font-family: 'Inconsolata';
}
.dropdown {
font-family: 'Inconsolata';
left:0;
top:0;
}
* { box-sizing: border-box; }
body {
font: 16px Arial;
}
#selectNumber {
font-family: 'Inconsolata';
position:absolute;
right:0;
top:0;
}
</style>
<script>
var margins = { top: 70, right: 300, bottom: 10, left: 60 },
outerWidth = 1700,
outerHeight = 2000,
width = outerWidth - margins.left - margins.right,
height = outerHeight - margins.top - margins.bottom;
data = d3.csvParse(`Party,Name,Const,Voting record
Con,Nigel Adams,Selby and Ainsty (Leave 58%),11111201
Con,Bim Afolami,Hitchin and Harpenden (Remain 60%),21101120
Con,Adam Afriyie,Windsor (Remain 54%),11111001
Con,Peter Aldous,Waveney (Leave 63%),11111110
Con,Lucy Allan,Telford (Leave 67%),22222222
Con,Sir David Amess,Southend West (Leave 55%),11111001
Con,Stuart Andrew,Pudsey (Remain 52%),11111001
Con,Edward Argar,Charnwood (Leave 58%),11111211
Con,Victoria Atkins,Louth and Horncastle (Leave 69%),11111111
Con,Richard Bacon,South Norfolk (Leave 51%),11111001
Con,Kemi Badenoch,Saffron Walden (Leave 51%),11111201
Con,Steve Baker,Wycombe (Remain 52%),11111001
Con,Harriett Baldwin,West Worcestershire (Leave 53%),11111222
Con,Stephen Barclay,North East Cambridgeshire (Leave 69%),22222222
Con,John Baron,Basildon and Billericay (Leave 67%),11111021
Con,Guto Bebb,Aberconwy (Leave 53%),00110110
Con,Sir Henry Bellingham,North West Norfolk (Leave 66%),11111001
Con,Richard Benyon,Newbury (Remain 52%),01101111
Con,Sir Paul Beresford,Mole Valley (Remain 52%),11111111
Con,Jake Berry,Rossendale and Darwen (Leave 59%),11111011
Con,Bob Blackman,Harrow East (Remain 53%),11111000
Con,Crispin Blunt,Reigate (Remain 52%),11111001
Con,Nick Boles,Grantham and Stamford (Leave 61%),02101110
Con,Peter Bone,Wellingborough (Leave 63%),11111001
Con,Sir Peter Bottomley,Worthing West (Leave 56%),11111121
Con,Andrew Bowie,West Aberdeenshire and Kincardine (Remain 61%),11111111
Con,Ben Bradley,Mansfield (Leave 71%),11111001
Con,Karen Bradley,Staffordshire Moorlands (Leave 65%),22222222
Con,Sir Graham Brady,Altrincham and Sale West (Remain 62%),11111111
Con,Suella Braverman,Fareham (Leave 55%),11111001
Con,Jack Brereton,Stoke-on-Trent South (Leave 71%),11111001
Con,Andrew Bridgen,North West Leicestershire (Leave 61%),11111001
Con,Steve Brine,Winchester (Remain 60%),02102110
Con,James Brokenshire,Old Bexley and Sidcup (Leave 63%),22222222
Con,Fiona Bruce,Congleton (Leave 53%),11111001
Con,Robert Buckland,South Swindon (Leave 52%),11111111
Con,Alex Burghart,Brentwood and Ongar (Leave 61%),11111221
Con,Conor Burns,Bournemouth West (Leave 58%),11111001
Con,Alistair Burt,North East Bedfordshire (Leave 53%),02102110
Con,Alun Cairns,Vale of Glamorgan (Leave 52%),22222222
Con,James Cartlidge,South Suffolk (Leave 54%),11101110
Con,Sir William Cash,Stone (Leave 58%),11111001
Con,Maria Caulfield,Lewes (Remain 53%),11111000
Con,Alex Chalk,Cheltenham (Remain 57%),02112111
Con,Rehman Chishti,Gillingham and Rainham (Leave 64%),11111021
Con,Sir Christopher Chope,Christchurch (Leave 60%),11111001
Con,Jo Churchill,Bury St Edmunds (Leave 54%),11111111
Con,Colin Clark,Gordon (Remain 55%),21111122
Con,Greg Clark,Tunbridge Wells (Remain 55%),22222222
Con,Kenneth Clarke,Rushcliffe (Remain 59%),02000111
Con,Simon Clarke,Middlesbrough South and East Cle... (Leave 65%),11111001
Con,James Cleverly,Braintree (Leave 61%),11111211
Con,Sir Geoffrey Clifton-Brown,The Cotswolds (Remain 52%),11111001
Con,Thérèse Coffey,Suffolk Coastal (Leave 56%),11111221
Con,Damian Collins,Folkestone and Hythe (Leave 62%),11101110
Con,Alberto Costa,South Leicestershire (Leave 58%),11101110
Con,Robert Courts,Witney (Remain 54%),11111000
Con,Geoffrey Cox,Torridge and West Devon (Leave 57%),22222222
Con,Stephen Crabb,Preseli Pembrokeshire (Leave 56%),01101110
Con,Tracey Crouch,Chatham and Aylesford (Leave 65%),11111021
Con,Chris Davies,Brecon and Radnorshire (Leave 52%),11111000
Con,David T. C. Davies,Monmouth (Remain 52%),11111001
Con,Glyn Davies,Montgomeryshire (Leave 56%),11111000
Con,Mims Davies,Eastleigh (Leave 54%),11111011
Con,Philip Davies,Shipley (Leave 52%),11111001
Con,David Davis,Haltemprice and Howden (Leave 55%),11111011
Con,Caroline Dinenage,Gosport (Leave 62%),11111001
Con,Jonathan Djanogly,Huntingdon (Leave 53%),02101110
Con,Leo Docherty,Aldershot (Leave 58%),22222222
Con,Michelle Donelan,Chippenham (Leave 52%),11111201
Con,Nadine Dorries,Mid Bedfordshire (Leave 52%),11111001
Con,Steve Double,St Austell and Newquay (Leave 64%),11111001
Con,Oliver Dowden,Hertsmere (Leave 51%),11111111
Con,Jackie Doyle-Price,Thurrock (Leave 70%),11111011
Con,Richard Drax,South Dorset (Leave 59%),11111001
Con,James Duddridge,Rochford and Southend East (Leave 60%),11111001
Con,David Duguid,Banff and Buchan (Leave 54%),11111110
Con,Sir Alan Duncan,Rutland and Melton (Leave 54%),21120112
Con,Iain Duncan Smith,Chingford and Woodford Green (Remain 51%),11111001
Con,Philip Dunne,Ludlow (Leave 59%),11111101
Con,Michael Ellis,Northampton North (Leave 61%),11111011
Con,Tobias Ellwood,Bournemouth East (Leave 54%),22222222
Con,Charlie Elphicke,Dover (Leave 63%),11111001
Con,George Eustice,Camborne and Redruth (Leave 58%),11101000
Con,Nigel Evans,Ribble Valley (Leave 59%),11111001
Con,Sir David Evennett,Bexleyheath and Crayford (Leave 65%),11111211
Con,Michael Fabricant,Lichfield (Leave 58%),11111001
Con,Sir Michael Fallon,Sevenoaks (Leave 54%),11121100
Con,Mark Field,Cities of London and Westminster (Remain 71%),02110101
Con,Vicky Ford,Chelmsford (Leave 51%),01101112
Con,Kevin Foster,Torbay (Leave 63%),11111010
Con,Liam Fox,North Somerset (Remain 52%),22222222
Con,Mark Francois,Rayleigh and Wickford (Leave 68%),11111001
Con,Lucy Frazer,South East Cambridgeshire (Remain 55%),21111121
Con,George Freeman,Mid Norfolk (Leave 61%),02101210
Con,Mike Freer,Finchley and Golders Green (Remain 69%),11110111
Con,Marcus Fysh,Yeovil (Leave 59%),11111001
Con,Sir Roger Gale,North Thanet (Leave 65%),11111111
Con,Mark Garnier,Wyre Forest (Leave 63%),12111200
Con,David Gauke,South West Hertfordshire (Remain 54%),22222222
Con,Nusrat Ghani,Wealden (Leave 53%),11111011
Con,Nick Gibb,Bognor Regis and Littlehampton (Leave 64%),11121212
Con,Dame Cheryl Gillan,Chesham and Amersham (Remain 55%),11111111
Con,John Glen,Salisbury (Leave 50%),11111111
Con,Zac Goldsmith,Richmond Park (Remain 72%),11111001
Con,Robert Goodwill,Scarborough and Whitby (Leave 61%),11111011
Con,Michael Gove,Surrey Heath (Leave 52%),22222222
Con,Luke Graham,Ochil and South Perthshire (Remain 61%),11111120
Con,Richard Graham,Gloucester (Leave 59%),21121112
Con,Bill Grant,"Ayr, Carrick and Cumnock (Remain 57%)",11111110
Con,Helen Grant,Maidstone and The Weald (Leave 56%),11111111
Con,James Gray,North Wiltshire (Leave 50%),11111001
Con,Chris Grayling,Epsom and Ewell (Remain 52%),22222222
Con,Chris Green,Bolton West (Leave 56%),11111001
Con,Damian Green,Ashford (Leave 60%),01111120
Con,Justine Greening,Putney (Remain 73%),20220122
Con,Dominic Grieve,Beaconsfield (Remain 51%),20120111
Con,Andrew Griffiths,Burton (Leave 65%),11111011
Con,Sam Gyimah,East Surrey (Leave 54%),20122112
Con,Kirstene Hair,Angus (Remain 52%),11111221
Con,Robert Halfon,Harlow (Leave 68%),11101120
Con,Luke Hall,Thornbury and Yate (Leave 53%),11111111
Con,Philip Hammond,Runnymede and Weybridge (Remain 50%),22222222
Con,Stephen Hammond,Wimbledon (Remain 71%),02100110
Con,Matt Hancock,West Suffolk (Leave 63%),22222222
Con,Greg Hands,Chelsea and Fulham (Remain 71%),11111121
Con,Mark Harper,Forest of Dean (Leave 58%),11111001
Con,Richard Harrington,Watford (Leave 51%),02100112
Con,Rebecca Harris,Castle Point (Leave 73%),11111001
Con,Trudy Harrison,Copeland (Leave 60%),11111010
Con,Simon Hart,Carmarthen West and South Pembro... (Leave 55%),11101220
Con,Sir John Hayes,South Holland and The Deepings (Leave 71%),11111001
Con,Sir Oliver Heald,North East Hertfordshire (Leave 51%),01121112
Con,James Heappey,Wells (Leave 53%),11111221
Con,Chris Heaton-Harris,Daventry (Leave 59%),11111011
Con,Peter Heaton-Jones,North Devon (Leave 57%),11111211
Con,Gordon Henderson,Sittingbourne and Sheppey (Leave 66%),11111000
Con,Nick Herbert,Arundel and South Downs (Leave 51%),01101110
Con,Damian Hinds,East Hampshire (Remain 51%),22222222
Con,Simon Hoare,North Dorset (Leave 56%),01101110
Con,George Hollingbery,Meon Valley (Leave 53%),11111101
Con,Kevin Hollinrake,Thirsk and Malton (Leave 56%),11101110
Con,Philip Hollobone,Kettering (Leave 61%),11111001
Con,Adam Holloway,Gravesham (Leave 65%),11111001
Con,John Howell,Henley (Remain 57%),12111111
Con,Nigel Huddleston,Mid Worcestershire (Leave 59%),21121222
Con,Eddie Hughes,Walsall North (Leave 74%),11111001
Con,Jeremy Hunt,South West Surrey (Remain 59%),22222222
Con,Nick Hurd,"Ruislip, Northwood and Pinner (Remain 51%)",22121112
Con,Alister Jack,Dumfries and Galloway (Remain 55%),11111101
Con,Margot James,Stourbridge (Leave 64%),02102112
Con,Sajid Javid,Bromsgrove (Leave 55%),22222222
Con,Ranil Jayawardena,North East Hampshire (Remain 54%),11111001
Con,Sir Bernard Jenkin,Harwich and North Essex (Leave 61%),11111001
Con,Andrea Jenkyns,Morley and Outwood (Leave 60%),11111001
Con,Robert Jenrick,Newark (Leave 56%),11111011
Con,Boris Johnson,Uxbridge and South Ruislip (Leave 56%),11111001
Con,Caroline Johnson,Sleaford and North Hykeham (Leave 62%),11111001
Con,Gareth Johnson,Dartford (Leave 64%),11111001
Con,Joseph Johnson,Orpington (Leave 58%),10111111
Con,Andrew Jones,Harrogate and Knaresborough (Remain 53%),11111111
Con,David Jones,Clwyd West (Leave 53%),11111001
Con,Marcus Jones,Nuneaton (Leave 65%),11111011
Con,Daniel Kawczynski,Shrewsbury and Atcham (Leave 53%),11111011
Con,Gillian Keegan,Chichester (Leave 51%),11111112
Con,Seema Kennedy,South Ribble (Leave 57%),11111111
Con,Stephen Kerr,Stirling (Remain 68%),11111110
Con,Sir Greg Knight,East Yorkshire (Leave 63%),11111011
Con,Julian Knight,Solihull (Leave 53%),11111200
Con,Kwasi Kwarteng,Spelthorne (Leave 60%),11111011
Con,Dame Eleanor Laing,Epping Forest (Leave 61%),22222222
Con,John Lamont,"Berwickshire, Roxburgh and Selkirk (Remain 57%)",11111221
Con,Mark Lancaster,Milton Keynes North (Remain 50%),11111001
Con,Pauline Latham,Mid Derbyshire (Leave 53%),11111201
Con,Andrea Leadsom,South Northamptonshire (Leave 53%),22222222
Con,Phillip Lee,Bracknell (Leave 53%),10110111
Con,Jeremy Lefroy,Stafford (Leave 57%),02202120
Con,Sir Edward Leigh,Gainsborough (Leave 62%),11111001
Con,Sir Oliver Letwin,West Dorset (Leave 51%),01101110
Con,Andrew Lewer,Northampton South (Leave 60%),11111001
Con,Brandon Lewis,Great Yarmouth (Leave 72%),22222222
Con,Julian Lewis,New Forest East (Leave 60%),11111001
Con,Ian Liddell-Grainger,Bridgwater and West Somerset (Leave 62%),11111011
Con,David Lidington,Aylesbury (Leave 52%),22222222
Con,Julia Lopez,Hornchurch and Upminster (Leave 69%),11111001
Con,Jack Lopresti,Filton and Bradley Stoke (Remain 52%),11111011
Con,Jonathan Lord,Woking (Remain 56%),11111001
Con,Tim Loughton,East Worthing and Shoreham (Leave 54%),11111001
Con,Craig Mackinlay,South Thanet (Leave 62%),11111001
Con,Rachel Maclean,Redditch (Leave 61%),11111001
Con,Sir Patrick McLoughlin,Derbyshire Dales (Leave 51%),11111111
Con,Stephen McPartland,Stevenage (Leave 57%),11111001
Con,Esther McVey,Tatton (Remain 54%),11111001
Con,Anne Main,St Albans (Remain 62%),11111001
Con,Alan Mak,Havant (Leave 62%),11111001
Con,Kit Malthouse,North West Hampshire (Leave 55%),11111001
Con,Scott Mann,North Cornwall (Leave 60%),11111000
Con,Paul Masterton,East Renfrewshire (Remain 74%),01102110
Con,Theresa May,Maidenhead (Remain 55%),22222222
Con,Paul Maynard,Blackpool North and Cleveleys (Leave 67%),11111001
Con,Mark Menzies,Fylde (Leave 57%),11111011
Con,Johnny Mercer,"Plymouth, Moor View (Leave 66%)",11111011
Con,Huw Merriman,Bexhill and Battle (Leave 58%),10111011
Con,Stephen Metcalfe,South Basildon and East Thurrock (Leave 73%),11111001
Con,Maria Miller,Basingstoke (Leave 54%),11111001
Con,Amanda Milling,Cannock Chase (Leave 69%),11111021
Con,Nigel Mills,Amber Valley (Leave 65%),11111001
Con,Anne Milton,Guildford (Remain 59%),02122112
Con,Andrew Mitchell,Sutton Coldfield (Leave 52%),01121002
Con,Damien Moore,Southport (Remain 54%),11111111
Con,Penny Mordaunt,Portsmouth North (Leave 64%),22222222
Con,Nicky Morgan,Loughborough (Remain 50%),01101110
Con,Anne Marie Morris,Newton Abbot (Leave 56%),11111011
Con,David Morris,Morecambe and Lunesdale (Leave 59%),11111111
Con,James Morris,Halesowen and Rowley Regis (Leave 66%),11111011
Con,Wendy Morton,Aldridge-Brownhills (Leave 68%),11111011
Con,David Mundell,"Dumfriesshire, Clydesdale and Tw... (Remain 56%)",22222222
Con,Sheryll Murray,South East Cornwall (Leave 55%),11111001
Con,Andrew Murrison,South West Wiltshire (Leave 58%),11111022
Con,Robert Neill,Bromley and Chislehurst (Remain 50%),01101110
Con,Sarah Newton,Truro and Falmouth (Remain 54%),02122110
Con,Caroline Nokes,Romsey and Southampton North (Remain 54%),22222222
Con,Jesse Norman,Hereford and South Herefordshire (Leave 60%),11111111
Con,Neil O'Brien,Harborough (Leave 52%),11111021
Con,Matthew Offord,Hendon (Remain 58%),11111001
Con,Guy Opperman,Hexham (Remain 55%),11111111
Con,Neil Parish,Tiverton and Honiton (Leave 58%),11121000
Con,Priti Patel,Witham (Leave 61%),11111001
Con,Owen Paterson,North Shropshire (Leave 59%),11111001
Con,Mark Pawsey,Rugby (Leave 58%),01101110
Con,Sir Mike Penning,Hemel Hempstead (Leave 55%),11111011
Con,John Penrose,Weston-super-Mare (--),11101000
Con,Andrew Percy,Brigg and Goole (Leave 66%),11101000
Con,Claire Perry,Devizes (Leave 51%),22222222
Con,Chris Philp,Croydon South (Remain 54%),11111201
Con,Christopher Pincher,Tamworth (Leave 66%),11111001
Con,Dan Poulter,Central Suffolk and North Ipswich (Leave 54%),11111010
Con,Rebecca Pow,Taunton Deane (Leave 53%),11121110
Con,Victoria Prentis,Banbury (Leave 51%),11121110
Con,Mark Prisk,Hertford and Stortford (Remain 51%),11111110
Con,Mark Pritchard,The Wrekin (Leave 58%),11111011
Con,Tom Pursglove,Corby (Leave 60%),11111001
Con,Jeremy Quin,Horsham (Remain 51%),11111111
Con,Will Quince,Colchester (Leave 51%),11111001
Con,Dominic Raab,Esher and Walton (Remain 58%),11111001
Con,John Redwood,Wokingham (Remain 58%),11111011
Con,Jacob Rees-Mogg,North East Somerset (Leave 52%),11111001
Con,Laurence Robertson,Tewkesbury (Leave 54%),11111001
Con,Mary Robinson,Cheadle (Remain 57%),11111111
Con,Andrew Rosindell,Romford (Leave 69%),11111001
Con,Douglas Ross,Moray (Remain 50%),11111221
Con,Lee Rowley,North East Derbyshire (Leave 62%),11111001
Con,Amber Rudd,Hastings and Rye (Leave 56%),22222222
Con,David Rutley,Macclesfield (Remain 52%),22222222
Con,Antoinette Sandbach,Eddisbury (Leave 52%),00102110
Con,Paul Scully,Sutton and Cheam (Leave 51%),11111001
Con,Bob Seely,Isle of Wight (Leave 62%),11111011
Con,Andrew Selous,South West Bedfordshire (Leave 59%),11111221
Con,Grant Shapps,Welwyn Hatfield (Leave 53%),11111001
Con,Alok Sharma,Reading West (Leave 53%),11111111
Con,Alec Shelbrooke,Elmet and Rothwell (Leave 56%),22222222
Con,Keith Simpson,Broadland (Leave 54%),11111111
Con,Chris Skidmore,Kingswood (Leave 57%),11111111
Con,Chloe Smith,Norwich North (Leave 57%),11111221
Con,Henry Smith,Crawley (Leave 58%),11111001
Con,Julian Smith,Skipton and Ripon (Leave 53%),22222222
Con,Royston Smith,"Southampton, Itchen (Leave 60%)",11111001
Con,Sir Nicholas Soames,Mid Sussex (Remain 53%),01101111
Con,Dame Caroline Spelman,Meriden (Leave 59%),01101110
Con,Mark Spencer,Sherwood (Leave 64%),11111021
Con,Andrew Stephenson,Pendle (Leave 63%),11111001
Con,John Stevenson,Carlisle (Leave 60%),11101210
Con,Bob Stewart,Beckenham (Remain 52%),11111001
Con,Iain Stewart,Milton Keynes South (Leave 53%),11111001
Con,Rory Stewart,Penrith and The Border (Leave 55%),01121112
Con,Sir Gary Streeter,South West Devon (Leave 55%),11111110
Con,Mel Stride,Central Devon (Leave 51%),11111111
Con,Graham Stuart,Beverley and Holderness (Leave 59%),11111001
Con,Julian Sturdy,York Outer (Remain 55%),11111200
Con,Rishi Sunak,Richmond (Yorks) (Leave 55%),11111001
Con,Sir Desmond Swayne,New Forest West (Leave 56%),11111001
Con,Sir Hugo Swire,East Devon (Leave 50%),11111121
Con,Sir Robert Syms,Poole (Leave 57%),11111011
Con,Derek Thomas,St Ives (Leave 55%),11111000
Con,Ross Thomson,Aberdeen South (Remain 68%),11111001
Con,Maggie Throup,Erewash (Leave 63%),11111011
Con,Kelly Tolhurst,Rochester and Strood (Leave 64%),11111011
Con,Justin Tomlinson,North Swindon (Leave 57%),11111001
Con,Michael Tomlinson,Mid Dorset and North Poole (Leave 58%),11111001
Con,Craig Tracey,North Warwickshire (Leave 68%),11111011
Con,David Tredinnick,Bosworth (Leave 61%),11101110
Con,Anne-Marie Trevelyan,Berwick-upon-Tweed (Leave 56%),11111001
Con,Elizabeth Truss,South West Norfolk (Leave 66%),22222222
Con,Tom Tugendhat,Tonbridge and Malling (Leave 53%),21221222
Con,Edward Vaizey,Wantage (Remain 54%),02102110
Con,Shailesh Vara,North West Cambridgeshire (Leave 57%),11111001
Con,Martin Vickers,Cleethorpes (Leave 68%),11111011
Con,Theresa Villiers,Chipping Barnet (Remain 59%),11111201
Con,Charles Walker,Broxbourne (Leave 66%),11111111
Con,Robin Walker,Worcester (Leave 54%),21111111
Con,Ben Wallace,Wyre and Preston North (Leave 54%),11111010
Con,David Warburton,Somerton and Frome (Leave 51%),11111000
Con,Matt Warman,Boston and Skegness (Leave 75%),11111011
Con,Giles Watling,Clacton (Leave 71%),11111001
Con,Helen Whately,Faversham and Mid Kent (Leave 58%),11111001
Con,Heather Wheeler,South Derbyshire (Leave 60%),11111001
Con,Craig Whittaker,Calder Valley (Leave 53%),11111011
Con,John Whittingdale,Maldon (Leave 61%),11111001
Con,Bill Wiggin,North Herefordshire (Leave 58%),11111001
Con,Gavin Williamson,South Staffordshire (Leave 65%),22222222
Con,Mike Wood,Dudley South (Leave 70%),11111021
Con,William Wragg,Hazel Grove (Leave 52%),11111001
Con,Jeremy Wright,Kenilworth and Southam (Remain 53%),22222222
Con,Nadhim Zahawi,Stratford-on-Avon (Leave 51%),11121222
DUP,Gregory Campbell,East Londonderry (--),11121202
DUP,Nigel Dodds,Belfast North (--),11121202
DUP,Sir Jeffrey M. Donaldson,Lagan Valley (--),11121202
DUP,Paul Girvan,South Antrim (--),11121202
DUP,Emma Little Pengelly,Belfast South (--),11121202
DUP,Ian Paisley,North Antrim (--),11121202
DUP,Gavin Robinson,Belfast East (--),11121202
DUP,Jim Shannon,Strangford (--),11121102
DUP,David Simpson,Upper Bann (--),11121202
DUP,Sammy Wilson,East Antrim (--),11121202
Grn,Caroline Lucas,"Brighton, Pavilion (Remain 74%)",10110111
Ind,Ian Austin,Dudley North (Leave 71%),01002112
Ind,Frank Field,Birkenhead (Leave 52%),11111111
Ind,Lady Hermon,North Down (--),10110111
Ind,Kelvin Hopkins,Luton North (Leave 58%),22222222
Ind,Ivan Lewis,Bury South (Leave 55%),01002111
Ind,Stephen Lloyd,Eastbourne (Leave 58%),02000110
Ind,Jared O'Mara,"Sheffield, Hallam (Remain 64%)",22222222
Ind,Fiona Onasanya,Peterborough (Leave 61%),10202111
Ind,Chris Williamson,Derby North (Leave 54%),01011212
Ind,John Woodcock,Barrow and Furness (Leave 57%),20120111
LD,Tom Brake,Carshalton and Wallington (Leave 56%),20220112
LD,Sir Vince Cable,Twickenham (Remain 66%),20120111
LD,Alistair Carmichael,Orkney and Shetland (Remain 60%),20220112
LD,Sir Edward Davey,Kingston and Surbiton (Remain 58%),20220112
LD,Tim Farron,Westmorland and Lonsdale (Remain 53%),20220112
LD,Wera Hobhouse,Bath (Remain 68%),10110111
LD,Christine Jardine,Edinburgh West (Remain 71%),20220112
LD,Norman Lamb,North Norfolk (Leave 58%),00202112
LD,Layla Moran,Oxford West and Abingdon (Remain 62%),20220112
LD,Jamie Stone,"Caithness, Sutherland and Easter... (Remain 51%)",20220112
LD,Jo Swinson,East Dunbartonshire (Remain 73%),20220112
Lab,Diane Abbott,Hackney North and Stoke Newington (Remain 79%),00002112
Lab,Debbie Abrahams,Oldham East and Saddleworth (Leave 60%),00022111
Lab,Rushanara Ali,Bethnal Green and Bow (Remain 69%),00000111
Lab,Rosena Allin-Khan,Tooting (Remain 75%),00010111
Lab,Mike Amesbury,Weaver Vale (Leave 50%),00002112
Lab,Tonia Antoniazzi,Gower (Leave 50%),00010111
Lab,Jonathan Ashworth,Leicester South (Remain 57%),00002112
Lab,Adrian Bailey,West Bromwich West (Leave 69%),00002112
Lab,Sir Kevin Barron,Rother Valley (Leave 67%),01211111
Lab,Margaret Beckett,Derby South (Leave 62%),00022112
Lab,Hilary Benn,Leeds Central (Remain 53%),00002112
Lab,Clive Betts,Sheffield South East (Leave 66%),00000111
Lab,Roberta Blackman-Woods,City of Durham (Remain 56%),00000112
Lab,Paul Blomfield,Sheffield Central (Remain 70%),00000111
Lab,Tracy Brabin,Batley and Spen (Leave 60%),02002112
Lab,Ben Bradshaw,Exeter (Remain 55%),00020111
Lab,Kevin Brennan,Cardiff West (Remain 55%),00000112
Lab,Lyn Brown,West Ham (Remain 53%),00020111
Lab,Nicholas Brown,Newcastle upon Tyne East (Remain 59%),00002112
Lab,Chris Bryant,Rhondda (Leave 61%),00002111
Lab,Karen Buck,Westminster North (Remain 67%),00020111
Lab,Richard Burden,"Birmingham, Northfield (Leave 62%)",00002111
Lab,Richard Burgon,Leeds East (Leave 61%),00002112
Lab,Dawn Butler,Brent Central (Remain 57%),00022111
Lab,Liam Byrne,"Birmingham, Hodge Hill (Leave 51%)",00002112
Lab,Ruth Cadbury,Brentford and Isleworth (Remain 57%),00010111
Lab,Sir Alan Campbell,Tynemouth (Remain 52%),00022112
Lab,Ronnie Campbell,Blyth Valley (Leave 60%),11111010
Lab,Dan Carden,"Liverpool, Walton (Leave 54%)",00002112
Lab,Sarah Champion,Rotherham (Leave 68%),01011111
Lab,Jenny Chapman,Darlington (Leave 58%),00002112
Lab,Bambos Charalambous,"Enfield, Southgate (Remain 62%)",00000112
Lab,Ann Clwyd,Cynon Valley (Leave 57%),10110111
Lab,Vernon Coaker,Gedling (Leave 56%),00002111
Lab,Julie Cooper,Burnley (Leave 67%),02002112
Lab,Rosie Cooper,West Lancashire (Leave 55%),01011111
Lab,Yvette Cooper,"Normanton, Pontefract and Castle... (Leave 69%)",00002112
Lab,Jeremy Corbyn,Islington North (Remain 78%),00002112
Lab,Neil Coyle,Bermondsey and Old Southwark (Remain 73%),00010111
Lab,Sir David Crausby,Bolton North East (Leave 58%),00000111
Lab,Mary Creagh,Wakefield (Leave 63%),00020111
Lab,Stella Creasy,Walthamstow (Remain 67%),00020111
Lab,Jon Cruddas,Dagenham and Rainham (Leave 70%),01001112
Lab,John Cryer,Leyton and Wanstead (Remain 65%),00002112
Lab,Judith Cummins,Bradford South (Leave 64%),02022112
Lab,Alex Cunningham,Stockton North (Leave 67%),00000111
Lab,Jim Cunningham,Coventry South (Remain 51%),10001111
Lab,Janet Daby,Lewisham East (Remain 65%),00020111
Lab,Nic Dakin,Scunthorpe (Leave 69%),00022112
Lab,Wayne David,Caerphilly (Leave 55%),00002112
Lab,Geraint Davies,Swansea West (Remain 57%),00020111
Lab,Marsha De Cordova,Battersea (Remain 77%),00020111
Lab,Gloria De Piero,Ashfield (Leave 71%),02002112
Lab,Thangam Debbonaire,Bristol West (Remain 79%),00000112
Lab,Emma Dent Coad,Kensington (Remain 69%),00010111
Lab,Tanmanjeet Singh Dhesi,Slough (Leave 54%),00002112
Lab,Anneliese Dodds,Oxford East (Remain 68%),00000112
Lab,Stephen Doughty,Cardiff South and Penarth (Remain 55%),00020111
Lab,Peter Dowd,Bootle (Leave 55%),00002112
Lab,David Drew,Stroud (Remain 54%),00000112
Lab,Jack Dromey,"Birmingham, Erdington (Leave 63%)",00002111
Lab,Rosie Duffield,Canterbury (Remain 55%),00020111
Lab,Angela Eagle,Wallasey (Remain 50%),00020112
Lab,Maria Eagle,Garston and Halewood (Remain 52%),00020111
Lab,Clive Efford,Eltham (Leave 52%),00000111
Lab,Julie Elliott,Sunderland Central (Leave 60%),00022112
Lab,Dame Louise Ellman,"Liverpool, Riverside (Remain 73%)",00010111
Lab,Chris Elmore,Ogmore (Leave 60%),00020111
Lab,Bill Esterson,Sefton Central (Remain 55%),00000111
Lab,Chris Evans,Islwyn (Leave 59%),02002112
Lab,Paul Farrelly,Newcastle-under-Lyme (Leave 62%),00000111
Lab,Jim Fitzpatrick,Poplar and Limehouse (Remain 66%),01012111
Lab,Colleen Fletcher,Coventry North East (Leave 59%),00002112
Lab,Caroline Flint,Don Valley (Leave 69%),21011111
Lab,Yvonne Fovargue,Makerfield (Leave 65%),01022122
Lab,Vicky Foxcroft,"Lewisham, Deptford (Remain 75%)",00000112
Lab,James Frith,Bury North (Leave 54%),00000112
Lab,Gill Furniss,"Sheffield, Brightside and Hillsb... (Leave 61%)",00002112
Lab,Hugh Gaffney,"Coatbridge, Chryston and Bellshill (Remain 61%)",00000112
Lab,Barry Gardiner,Brent North (Remain 57%),00022112
Lab,Ruth George,High Peak (Leave 51%),00020111
Lab,Preet Kaur Gill,"Birmingham, Edgbaston (Remain 53%)",00020112
Lab,Mary Glindon,North Tyneside (Leave 59%),02002112
Lab,Roger Godsiff,"Birmingham, Hall Green (Remain 66%)",00000111
Lab,Helen Goodman,Bishop Auckland (Leave 61%),00002111
Lab,Kate Green,Stretford and Urmston (Remain 52%),00020111
Lab,Lilian Greenwood,Nottingham South (Remain 54%),00020111
Lab,Margaret Greenwood,Wirral West (Remain 55%),00022112
Lab,Nia Griffith,Llanelli (Leave 55%),00002112
Lab,John Grogan,Keighley (Leave 53%),00000112
Lab,Andrew Gwynne,Denton and Reddish (Leave 61%),02002112
Lab,Louise Haigh,"Sheffield, Heeley (Leave 58%)",00000111
Lab,Fabian Hamilton,Leeds North East (Remain 63%),00020111
Lab,David Hanson,Delyn (Leave 55%),00002111
Lab,Emma Hardy,Kingston upon Hull West and Hessle (Leave 68%),00002112
Lab,Harriet Harman,Camberwell and Peckham (Remain 70%),00000111
Lab,Carolyn Harris,Swansea East (Leave 62%),02002112
Lab,Helen Hayes,Dulwich and West Norwood (Remain 78%),00020111
Lab,Sue Hayman,Workington (Leave 60%),00002112
Lab,John Healey,Wentworth and Dearne (Leave 69%),00022122
Lab,Sir Mark Hendrick,Preston (Leave 57%),00000110
Lab,Stephen Hepburn,Jarrow (Leave 62%),11111111
Lab,Mike Hill,Hartlepool (Leave 70%),01022112
Lab,Meg Hillier,Hackney South and Shoreditch (Remain 78%),00020111
Lab,Dame Margaret Hodge,Barking (Leave 60%),00020111
Lab,Sharon Hodgson,Washington and Sunderland West (Leave 62%),00002111
Lab,Kate Hoey,Vauxhall (Remain 78%),11211002
Lab,Kate Hollern,Blackburn (Leave 54%),00002222
Lab,George Howarth,Knowsley (Leave 52%),00000111
Lab,Sir Lindsay Hoyle,Chorley (Leave 57%),22222222
Lab,Rupa Huq,Ealing Central and Acton (Remain 71%),00020111
Lab,Imran Hussain,Bradford East (Leave 55%),00002112
Lab,Dan Jarvis,Barnsley Central (Leave 68%),01002112
Lab,Diana Johnson,Kingston upon Hull North (Leave 60%),00002111
Lab,Darren Jones,Bristol North West (Remain 61%),00020111
Lab,Gerald Jones,Merthyr Tydfil and Rhymney (Leave 58%),00002112
Lab,Graham P Jones,Hyndburn (Leave 66%),00022111
Lab,Helen Jones,Warrington North (Leave 59%),01001111
Lab,Kevan Jones,North Durham (Leave 60%),01012111
Lab,Sarah Jones,Croydon Central (Leave 50%),00000112
Lab,Susan Elan Jones,Clwyd South (Leave 60%),00020111
Lab,Mike Kane,Wythenshawe and Sale East (Remain 50%),02002112
Lab,Barbara Keeley,Worsley and Eccles South (Leave 60%),00022112
Lab,Liz Kendall,Leicester West (Leave 52%),00020111
Lab,Afzal Khan,"Manchester, Gorton (Remain 62%)",00002112
Lab,Ged Killen,Rutherglen and Hamilton West (Remain 63%),00020111
Lab,Stephen Kinnock,Aberavon (Leave 60%),02002110
Lab,Peter Kyle,Hove (Remain 66%),00000111
Lab,Lesley Laird,Kirkcaldy and Cowdenbeath (Remain 58%),00000112
Lab,David Lammy,Tottenham (Remain 76%),20020111
Lab,Ian Lavery,Wansbeck (Leave 56%),02002102
Lab,Karen Lee,Lincoln (Leave 57%),00012112
Lab,Emma Lewell-Buck,South Shields (Leave 62%),01022112
Lab,Clive Lewis,Norwich South (Remain 60%),00010111
Lab,Tony Lloyd,Rochdale (Leave 57%),00002111
Lab,Rebecca Long Bailey,Salford and Eccles (Leave 54%),00002112
Lab,Ian C. Lucas,Wrexham (Leave 57%),00001111
Lab,Holly Lynch,Halifax (Leave 59%),00002112
Lab,Steve McCabe,"Birmingham, Selly Oak (Remain 53%)",00002112
Lab,Kerry McCarthy,Bristol East (Remain 53%),00010111
Lab,Siobhain McDonagh,Mitcham and Morden (Remain 55%),10110111
Lab,Andy McDonald,Middlesbrough (Leave 66%),00002122
Lab,John McDonnell,Hayes and Harlington (Leave 59%),00002112
Lab,Pat McFadden,Wolverhampton South East (Leave 68%),00022111
Lab,Conor McGinn,St Helens North (Leave 58%),00002112
Lab,Alison McGovern,Wirral South (Remain 53%),00022111
Lab,Liz McInnes,Heywood and Middleton (Leave 62%),02002112
Lab,Catherine McKinnell,Newcastle upon Tyne North (Leave 57%),00020111
Lab,Jim McMahon,Oldham West and Royton (Leave 61%),02002112
Lab,Anna McMorrin,Cardiff North (Remain 61%),10010111
Lab,Justin Madders,Ellesmere Port and Neston (Leave 58%),01002111
Lab,Khalid Mahmood,"Birmingham, Perry Barr (Leave 51%)",00002112
Lab,Shabana Mahmood,"Birmingham, Ladywood (Remain 64%)",00000111
Lab,Seema Malhotra,Feltham and Heston (Leave 56%),00002111
Lab,John Mann,Bassetlaw (Leave 68%),11011111
Lab,Gordon Marsden,Blackpool South (Leave 68%),00001111
Lab,Sandy Martin,Ipswich (Leave 57%),00000111
Lab,Rachael Maskell,York Central (Remain 61%),00010111
Lab,Christian Matheson,City of Chester (Remain 57%),00010111
Lab,Ian Mearns,Gateshead (Leave 56%),02002112
Lab,Edward Miliband,Doncaster North (Leave 72%),00002112
Lab,Madeleine Moon,Bridgend (Remain 50%),00010111
Lab,Jessica Morden,Newport East (Leave 60%),00022112
Lab,Stephen Morgan,Portsmouth South (Leave 52%),00010111
Lab,Grahame Morris,Easington (Leave 67%),11011111
Lab,Ian Murray,Edinburgh South (Remain 78%),00200111
Lab,Lisa Nandy,Wigan (Leave 63%),02000122
Lab,Alex Norris,Nottingham North (Leave 64%),00002112
Lab,Melanie Onn,Great Grimsby (Leave 71%),01002122
Lab,Chi Onwurah,Newcastle upon Tyne Central (Remain 52%),00000111
Lab,Kate Osamor,Edmonton (Remain 54%),00010111
Lab,Albert Owen,Ynys Môn (Leave 51%),00000112
Lab,Stephanie Peacock,Barnsley East (Leave 71%),01002112
Lab,Teresa Pearce,Erith and Thamesmead (Leave 54%),00022112
Lab,Matthew Pennycook,Greenwich and Woolwich (Remain 64%),00000111
Lab,Toby Perkins,Chesterfield (Leave 59%),00001111
Lab,Jess Phillips,"Birmingham, Yardley (Leave 60%)",00000111
Lab,Bridget Phillipson,Houghton and Sunderland South (Leave 62%),00022111
Lab,Laura Pidcock,North West Durham (Leave 55%),00002112
Lab,Jo Platt,Leigh (Leave 63%),02002112
Lab,Luke Pollard,"Plymouth, Sutton and Devonport (Leave 54%)",00000111
Lab,Stephen Pound,Ealing North (Remain 54%),00002112
Lab,Lucy Powell,Manchester Central (Remain 63%),00002112
Lab,Yasmin Qureshi,Bolton South East (Leave 63%),00002112
Lab,Faisal Rashid,Warrington South (Leave 51%),00000112
Lab,Angela Rayner,Ashton-under-Lyne (Leave 62%),00002112
Lab,Steve Reed,Croydon North (Remain 59%),00000112
Lab,Christina Rees,Neath (Leave 54%),00002112
Lab,Ellie Reeves,Lewisham West and Penge (Remain 66%),00020111
Lab,Rachel Reeves,Leeds West (Leave 55%),00000111
Lab,Emma Reynolds,Wolverhampton North East (Leave 68%),00002111
Lab,Jonathan Reynolds,Stalybridge and Hyde (Leave 59%),00002112
Lab,Marie Rimmer,St Helens South and Whiston (Leave 56%),00000111
Lab,Geoffrey Robinson,Coventry North West (Leave 59%),00001112
Lab,Matt Rodda,Reading East (Remain 62%),00000112
Lab,Danielle Rowley,Midlothian (Remain 62%),00000112
Lab,Chris Ruane,Vale of Clwyd (Leave 56%),00002111
Lab,Lloyd Russell-Moyle,"Brighton, Kemptown (Remain 57%)",00010111
Lab,Naz Shah,Bradford West (Remain 53%),00002112
Lab,Virendra Sharma,"Ealing, Southall (Remain 58%)",00000111
Lab,Barry Sheerman,Huddersfield (Leave 51%),00020111
Lab,Paula Sherriff,Dewsbury (Leave 57%),02002112
Lab,Tulip Siddiq,Hampstead and Kilburn (Remain 77%),00010111
Lab,Dennis Skinner,Bolsover (Leave 70%),11011010
Lab,Andy Slaughter,Hammersmith (Remain 69%),00020111
Lab,Ruth Smeeth,Stoke-on-Trent North (Leave 72%),01011111
Lab,Cat Smith,Lancaster and Fleetwood (Leave 51%),00002112
Lab,Eleanor Smith,Wolverhampton South West (Leave 54%),00002112
Lab,Jeff Smith,"Manchester, Withington (Remain 74%)",00000111
Lab,Laura Smith,Crewe and Nantwich (Leave 59%),01012111
Lab,Nick Smith,Blaenau Gwent (Leave 62%),00022112
Lab,Owen Smith,Pontypridd (Remain 54%),20210111
Lab,Karin Smyth,Bristol South (Remain 52%),00000111
Lab,Gareth Snell,Stoke-on-Trent Central (Leave 65%),01011111
Lab,Alex Sobel,Leeds North West (Remain 65%),00000111
Lab,John Spellar,Warley (Leave 62%),01011111
Lab,Keir Starmer,Holborn and St Pancras (Remain 73%),00002112
Lab,Jo Stevens,Cardiff Central (Remain 70%),20210111
Lab,Wes Streeting,Ilford North (Leave 53%),00020111
Lab,Graham Stringer,Blackley and Broughton (Leave 51%),11211201
Lab,Paul Sweeney,Glasgow North East (Remain 59%),00000112
Lab,Mark Tami,Alyn and Deeside (Leave 58%),00022112
Lab,Gareth Thomas,Harrow West (Remain 55%),00000111
Lab,Nick Thomas-Symonds,Torfaen (Leave 61%),00022112
Lab,Emily Thornberry,Islington South and Finsbury (Remain 72%),00002112
Lab,Stephen Timms,East Ham (Remain 53%),00000112
Lab,Jon Trickett,Hemsworth (Leave 68%),02002112
Lab,Anna Turley,Redcar (Leave 68%),00020111
Lab,Karl Turner,Kingston upon Hull East (Leave 73%),00002222
Lab,Derek Twigg,Halton (Leave 58%),01011111
Lab,Stephen Twigg,"Liverpool, West Derby (Leave 50%)",00000112
Lab,Liz Twist,Blaydon (Leave 56%),00002112
Lab,Keith Vaz,Leicester East (Leave 53%),00000112
Lab,Valerie Vaz,Walsall South (Leave 62%),00002112
Lab,Thelma Walker,Colne Valley (Remain 50%),00010111
Lab,Tom Watson,West Bromwich East (Leave 68%),00002112
Lab,Catherine West,Hornsey and Wood Green (Remain 75%),00020111
Lab,Matt Western,Warwick and Leamington (Remain 59%),00000111
Lab,Alan Whitehead,"Southampton, Test (Leave 51%)",00000111
Lab,Martin Whitfield,East Lothian (Remain 65%),00020112
Lab,Paul Williams,Stockton South (Leave 58%),10010111
Lab,Phil Wilson,Sedgefield (Leave 59%),00002112
Lab,Dame Rosie Winterton,Doncaster Central (Leave 66%),22222222
Lab,Mohammad Yasin,Bedford (Leave 52%),00000111
Lab,Daniel Zeichner,Cambridge (Remain 74%),20210111
Oth,John Bercow,Buckingham (Remain 51%),22222222
PC,Jonathan Edwards,Carmarthen East and Dinefwr (Leave 54%),20200112
PC,Ben Lake,Ceredigion (Remain 55%),20200112
PC,Liz Saville Roberts,Dwyfor Meirionnydd (Remain 52%),20200112
PC,Hywel Williams,Arfon (Remain 65%),20200112
SF,Órfhlaith Begley,West Tyrone (--),22222222
SF,Mickey Brady,Newry and Armagh (--),22222222
SF,Michelle Gildernew,Fermanagh and South Tyrone (--),22222222
SF,Chris Hazzard,South Down (--),22222222
SF,Elisha McCallion,Foyle (--),22222222
SF,Paul Maskey,Belfast West (--),22222222
SF,Francie Molloy,Mid Ulster (--),22222222
SNP,Hannah Bardell,Livingston (Remain 56%),20220111
SNP,Mhairi Black,Paisley and Renfrewshire South (Remain 66%),20220111
SNP,Ian Blackford,"Ross, Skye and Lochaber (Remain 57%)",20220111
SNP,Kirsty Blackman,Aberdeen North (Remain 57%),20220111
SNP,Deidre Brock,Edinburgh North and Leith (Remain 78%),20220111
SNP,Alan Brown,Kilmarnock and Loudoun (Remain 60%),20220111
SNP,Lisa Cameron,"East Kilbride, Strathaven and Le... (Remain 62%)",20220111
SNP,Douglas Chapman,Dunfermline and West Fife (Remain 60%),20220111
SNP,Joanna Cherry,Edinburgh South West (Remain 72%),20220111
SNP,Ronnie Cowan,Inverclyde (Remain 64%),20220111
SNP,Angela Crawley,Lanark and Hamilton East (Remain 65%),20220111
SNP,Martyn Day,Linlithgow and East Falkirk (Remain 58%),20220111
SNP,Martin Docherty-Hughes,West Dunbartonshire (Remain 62%),20220111
SNP,Marion Fellows,Motherwell and Wishaw (Remain 63%),20220111
SNP,Stephen Gethins,North East Fife (Remain 62%),20220111
SNP,Patricia Gibson,North Ayrshire and Arran (Remain 58%),20220111
SNP,Patrick Grady,Glasgow North (Remain 78%),20220121
SNP,Peter Grant,Glenrothes (Remain 54%),20220111
SNP,Neil Gray,Airdrie and Shotts (Remain 60%),20220111
SNP,Drew Hendry,"Inverness, Nairn, Badenoch and S... (Remain 59%)",20220111
SNP,Stewart Hosie,Dundee East (Remain 62%),20220111
SNP,Chris Law,Dundee West (Remain 59%),20220111
SNP,David Linden,Glasgow East (Remain 56%),20220111
SNP,Stewart Malcolm McDonald,Glasgow South (Remain 72%),20220111
SNP,Stuart C. McDonald,"Cumbernauld, Kilsyth and Kirkint... (Remain 62%)",20220111
SNP,John McNally,Falkirk (Remain 58%),22222222
SNP,Angus Brendan MacNeil,Na h-Eileanan an Iar (Remain 56%),22220111
SNP,Carol Monaghan,Glasgow North West (Remain 69%),20220111
SNP,Gavin Newlands,Paisley and Renfrewshire North (Remain 64%),20220111
SNP,Brendan O'Hara,Argyll and Bute (Remain 61%),20220111
SNP,Tommy Sheppard,Edinburgh East (Remain 72%),20220111
SNP,Chris Stephens,Glasgow South West (Remain 59%),20220111
SNP,Alison Thewliss,Glasgow Central (Remain 71%),20220111
SNP,Philippa Whitford,Central Ayrshire (Remain 57%),20220111
SNP,Pete Wishart,Perth and North Perthshire (Remain 60%),22220111
TIG,Heidi Allen,South Cambridgeshire (Remain 62%),10110121
TIG,Luciana Berger,"Liverpool, Wavertree (Remain 64%)",10110111
TIG,Ann Coffey,Stockport (Remain 53%),10110111
TIG,Mike Gapes,Ilford South (Remain 56%),10110111
TIG,Chris Leslie,Nottingham East (Remain 57%),10110111
TIG,Joan Ryan,Enfield North (Remain 51%),20110111
TIG,Gavin Shuker,Luton South (Leave 55%),10110111
TIG,Angela Smith,Penistone and Stocksbridge (Leave 61%),10110111
TIG,Anna Soubry,Broxtowe (Leave 52%),10110111
TIG,Chuka Umunna,Streatham (Remain 79%),10110111
TIG,Sarah Wollaston,Totnes (Leave 54%),10110111`)
var maxVotesPerDay = 415;
var votes = ["for", "against", "abstained"];
var voteKeys= ["Customs Union",
"Confirmatory Public Vote",
"Labour Plan",
"Common Market 2.0",
"Revoke Article 50",
"No Deal",
"Contingent Preferential Arrangements",
"EEA/EFTA without Customs Union"];
var MPS = d3.map(data, d=>d.Name).keys()
var select = document.getElementById("selectNumber");
var options = MPS.sort();
for(var i = 0; i < options.length; i++) {
var opt = options[i];
var el = document.createElement("option");
el.textContent = opt;
el.value = opt;
select.appendChild(el);
}
var line = d3.line().curve(d3.curveMonotoneY);
var axVotesPerDay = d3.max(votesByDay, d=>d3.max(d, d=>d.length))
var votes = ["for", "against", "abstained"];
var partiesBySize = d3.nest().key(d=>d.Party).rollup(d=>d.length).entries(data)
var partiesBySizeSorted = partiesBySize.sort((a,b)=> b.value-a.value).map(d=>d.key);
var parties = d3.map(data, d=>d.Party).keys()
var xband = d3.scaleBand().domain(d3.range(votes.length).reverse()).range([0,width-margins.left-margins.right]).paddingInner(.08)
var yband = d3.scaleBand().domain(d3.range(votesByDay().length)).range([0,height])
var x = d3.scaleLinear().domain([0,maxVotesPerDay]).range([0, xband.bandwidth()])
var colors = {Con:"#1f78b4",
DUP:"#fb9a99",
Grn:"#33a02c",
Ind:"#cab2d6",
LD:"#ff7f00",
Lab:"#e31a1c",
Oth:"#a6cee3",
PC:"#6a3d9a",
SF:"#b2df8a",
SNP:"#b15928",
TIG:"#fdbf6f"};
fuzzy = new Fuse(data,{keys:["Name"],location:0});
partyNames = {
"Con":"Conservative",
"DUP":"Democratic Unionist",
"Grn":"Green",
"Ind":"Independent",
"LD":"Liberal Democrats",
"Lab":"Labour",
"Oth":"Others",
"PC":"Plaid Cymru",
"SF":"Sinn Féin",
"SNP":"Scottish National Party",
"TIG":"TIG"};
var svg = d3.select("body").append("svg")
.attr("width", outerWidth)
.attr("height", outerHeight)
.append("g")
.style("-webkit-tap-highlight-color", "transparent")
.style("font-size",10).style("font-family", "Inconsolata");
var legend = svg
.append("g")
.attr("class","legend")
.attr("transform", `translate(` + outerWidth/5 + `, 10)`);
legend
.selectAll("g")
.data(partiesBySizeSorted)
.join("g")
.append("g")
.each(function(d,i){
const el = d3.select(this);
el.attr("transform", `translate(${i*50+ 50}, 0)`)
el.append("rect").attr("width",10).attr("height", 10).attr("fill", colors[d])
el.append("text").text(d).attr("x",15).attr("y",10)
});
svg
.append("text")
.attr("y", 55)
.attr("x", width -margins.right+margins.left)
.style("font-weight", "bold")
.text("MOTIONS");
var container = svg
.append("g")
.attr("transform", `translate(${margins.left}, ${margins.top})`);
container
.selectAll("text")
.data(votes)
.join("text")
.text(d=>d.toUpperCase())
.attr("transform", (d,i)=>`translate(${xband(i)} ${margins.top*.2})`);
const paths = container
.selectAll("path")
.data(data)
.join("path")
.style("opacity", 0.15)
// .style("mix-blend-mode", "multiply")
.attr("fill","none")
.attr("stroke",d=>colors[d.Party])
.attr("stroke-opacity",0.5)
.attr("stroke-width", 1)
.attr("d", (d,i)=>{
d.points = [];
votesByDay().forEach((bin,i )=>{
bin.forEach((arr, binIndex)=>{
const index = arr.findIndex(v=>v.Name === d.Name);
if(index!==-1) {
d.points.push([x(index)+xband(binIndex),yband(i)]);
}
})
})
return line(d.points)
})
var barHeight = 10;
const bars = container
.selectAll("g")
.data(votesByDay)
.join("g")
.attr("transform", (d,i)=>`translate(0, ${yband(i)})`);
bars
.append("text")
.attr("transform", (d,i)=>`translate(${width-margins.right}, 4)`)
.style("font-size", "12px")
.text((d,i)=>voteKeys[i]);
var tooltip = d3.select(document.createElement("div")).call(createTooltip);
var barsG = bars
.selectAll("g")
.data(d=> d.map(d=>d3.nest().key(d=>d.Party).rollup(d=>d.length).entries(d)))
.join("g")
.attr("class", "barsG")
.attr("transform", (d,i)=>`translate(${xband(i)}, ${-barHeight/2})`);
barsG
.append("rect")
.attr("width", d=>x(d.map(d=>d.value).reduce((a,b)=>a+b)))
.attr("height", barHeight)
.style("fill", "rgba(0,0,0,0)")
.style("stroke", "black")
.style("stroke-opacity", 0)
.style("cursor","pointer")
.on("mouseover", function(d,i) {
d3.select(this).transition().style("stroke-opacity",1)
tooltip
.html(getTooltipContent(d,i))
.transition()
.style("opacity", 1)
})
.on("mouseleave", function(d) {
d3.select(this).transition().style("stroke-opacity",0)
tooltip.transition().style("opacity", 0)
})
barsG
.each(function(d){
let b=0;
d3.select(this)
.selectAll(".partyRect")
.data(d=>d)
.join("rect")
.attr("width", 10)
.attr("x", (d,i)=>{
const myx = b;
b += x(d.value)
return myx
})
.style("pointer-events","none")
.attr("height",10)
.attr("fill", d=>colors[d.key])
.attr("width", d=>x(d.value-1))
.attr("height", barHeight)
});
svg.on("mousemove", function(d){
let [mx,my] = d3.mouse(this);
var w = width-margins.right-margins.left;
var nmx = Math.min(Math.max(0,mx-margins.left), w)
const name = data[Math.round((nmx/w)*(data.length-1))].Name;
let graphHeight = yband(votesByDay.length-1);
my -= margins.top;
my = Math.max(0, my);
my = Math.min(my, graphHeight);
tooltip
.style("left", `${mx}px`)
.style("top", `${my+100}px`)
})
$("#selectNumber").change(function () {
var input = $('#selectNumber').val()
console.log(input)
const paths = container
.selectAll("path")
.data(data)
.join("path")
.style("opacity", 0.15)
// .style("mix-blend-mode", "multiply")
.attr("fill","none")
.attr("stroke",d=>colors[d.Party])
.attr("stroke-opacity", d=>input === "Choose an MP" ? .25 : d.Name === input ? 1 : .05)
.attr("stroke-width", d=>input === "Choose an MP" ? 1 : d.Name === input ? 2 : 1)
.attr("d", (d,i)=>{
d.points = [];
votesByDay().forEach((bin,i )=>{
bin.forEach((arr, binIndex)=>{
const index = arr.findIndex(v=>v.Name === d.Name);
if(index!==-1) {
d.points.push([x(index)+xband(binIndex),yband(i)]);
}
})
})
return line(d.points)
}); });
d3.select("select")
.on("change",function(d){
var selected = d3.select("#d3-dropdown").node().value;
const paths = container
.selectAll("path")
.data(data)
.join("path")
//.style("opacity", d=> d.Party === selected ? 0.75 :0.01)
.style("opacity", d=> selected === "All" ? 0.15 : d.Party === selected ? 0.15 :0)
// .style("mix-blend-mode", "multiply")
.attr("fill","none")
.attr("stroke",d=>colors[d.Party])
.attr("d", (d,i)=>{
d.points = [];
votesByDay().forEach((bin,i )=>{
bin.forEach((arr, binIndex)=>{
const index = arr.findIndex(v=>v.Name === d.Name);
if(index!==-1) {
d.points.push([x(index)+xband(binIndex),yband(i)]);
}
})
})
return line(d.points)
})
})
function parent () {
document.createElement("div");
parent.appendChild(svg.node());
parent.appendChild(tooltip.node())
return parent
};
function votesByDay() {
let a = [];
let l = data[0]["Voting record"].length
data.forEach(d=>{
for(let i =0; i<l; i++) {
if(!a[i]) a[i]=[[],[],[]];
a[i][+d["Voting record"][i]].push(d)
}
})
a.sort((a,b)=>d3.descending(a.Name, b.Name))
return a
}
function addVoters(el,i){
const r = i * 100 + 100;
el
.join("path")
.attr("d", d=>line(d.line))
}
function sortByParty() {arr=>arr.sort((a,b)=>d3.descending(b.Party,a.Party))}
function getSelectedPartyName() {
return Object.keys(partyNames).find(d=>partyNames[d]===selectedParty);
}
function getTooltipContent (d,i) {
let result = `<b>${votes[i].toUpperCase()}</b><br/><br/>`;
d.sort((a,b)=>b.value-a.value)
d.forEach(d=>{
result +=`<span style='color:#333'>${partyNames[d.key]}<span/>: ${d.value}<br/>`
})
return result;
}
function createTooltip(el) {
el
.style("position", "absolute")
.style("pointer-events", "none")
.style("top", 0)
.style("opacity", 0)
.style("background", "white")
.style("width", "150px")
.style("border-radius", "5px")
.style("box-shadow", "0 0 10px rgba(0,0,0,.25)")
.style("padding", "10px")
.style("line-height", "1.3")
.style("font", "11px sans-serif")
}
function autocomplete(inp, arr) {
/*the autocomplete function takes two arguments,
the text field element and an array of possible autocompleted values:*/
var currentFocus;
/*execute a function when someone writes in the text field:*/
inp.addEventListener("input", function(e) {
var a, b, i, val = this.value;
/*close any already open lists of autocompleted values*/
closeAllLists();
if (!val) { return false;}
currentFocus = -1;
/*create a DIV element that will contain the items (values):*/
a = document.createElement("DIV");
a.setAttribute("id", this.id + "autocomplete-list");
a.setAttribute("class", "autocomplete-items");
/*append the DIV element as a child of the autocomplete container:*/
this.parentNode.appendChild(a);
/*for each item in the array...*/
for (i = 0; i < arr.length; i++) {
/*check if the item starts with the same letters as the text field value:*/
if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
/*create a DIV element for each matching element:*/
b = document.createElement("DIV");
/*make the matching letters bold:*/
b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
b.innerHTML += arr[i].substr(val.length);
/*insert a input field that will hold the current array item's value:*/
b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
/*execute a function when someone clicks on the item value (DIV element):*/
b.addEventListener("click", function(e) {
/*insert the value for the autocomplete text field:*/
inp.value = this.getElementsByTagName("input")[0].value;
/*close the list of autocompleted values,
(or any other open lists of autocompleted values:*/
closeAllLists();
});
a.appendChild(b);
}
}
});
/*execute a function presses a key on the keyboard:*/
inp.addEventListener("keydown", function(e) {
var x = document.getElementById(this.id + "autocomplete-list");
if (x) x = x.getElementsByTagName("div");
if (e.keyCode == 40) {
/*If the arrow DOWN key is pressed,
increase the currentFocus variable:*/
currentFocus++;
/*and and make the current item more visible:*/
addActive(x);
} else if (e.keyCode == 38) { //up
/*If the arrow UP key is pressed,
decrease the currentFocus variable:*/
currentFocus--;
/*and and make the current item more visible:*/
addActive(x);
} else if (e.keyCode == 13) {
/*If the ENTER key is pressed, prevent the form from being submitted,*/
e.preventDefault();
if (currentFocus > -1) {
/*and simulate a click on the "active" item:*/
if (x) x[currentFocus].click();
}
}
});
function addActive(x) {
/*a function to classify an item as "active":*/
if (!x) return false;
/*start by removing the "active" class on all items:*/
removeActive(x);
if (currentFocus >= x.length) currentFocus = 0;
if (currentFocus < 0) currentFocus = (x.length - 1);
/*add class "autocomplete-active":*/
x[currentFocus].classList.add("autocomplete-active");
}
function removeActive(x) {
/*a function to remove the "active" class from all autocomplete items:*/
for (var i = 0; i < x.length; i++) {
x[i].classList.remove("autocomplete-active");
}
}
function closeAllLists(elmnt) {
/*close all autocomplete lists in the document,
except the one passed as an argument:*/
var x = document.getElementsByClassName("autocomplete-items");
for (var i = 0; i < x.length; i++) {
if (elmnt != x[i] && elmnt != inp) {
x[i].parentNode.removeChild(x[i]);
}
}
}
/*execute a function when someone clicks in the document:*/
document.addEventListener("click", function (e) {
closeAllLists(e.target);
});
}
</script>
Modified http://d3js.org/d3.v5.min.js to a secure url
Modified http://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js to a secure url
Modified http://code.jquery.com/jquery-1.9.1.min.js to a secure url
https://d3js.org/d3.v5.min.js
https://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js
https://code.jquery.com/jquery-1.9.1.min.js
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js
https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.0.4/fuse.min.js