diff --git a/.gitignore b/.gitignore index 7cffbf3..1ecdc9f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ venv/ .venv/ +# Testing +test.py +test_database diff --git a/database/mp.csv b/database/mp.csv index 8dde92f..c281a2e 100644 --- a/database/mp.csv +++ b/database/mp.csv @@ -1,3 +1,523 @@ -ID,Name,PhotoURL -1,Caroline Lucas,https://commons.wikimedia.org/wiki/File:Official_portrait_of_Caroline_Lucas_MP_crop_2.jpg -2,Rachel Hopkins,https://upload.wikimedia.org/wikipedia/commons/a/a5/Official_portrait_of_Rachel_Hopkins_MP_crop_2%2C_2023.jpg +,Unnamed: 0,ID,Name,PhotoURL +0,0.0,1,Caroline Lucas,https://commons.wikimedia.org/wiki/File:Official_portrait_of_Caroline_Lucas_MP_crop_2.jpg +1,1.0,2,Rachel Hopkins,https://upload.wikimedia.org/wikipedia/commons/a/a5/Official_portrait_of_Rachel_Hopkins_MP_crop_2%2C_2023.jpg +2,,Q24052782,Carla Lockhart, +3,,Q19875589,Carol Monaghan, +4,,Q19870758,Caroline Ansell, +5,,Q300107,Caroline Dinenage, +6,,Q27979810,Caroline Johnson, +7,,Q9670,Caroline Lucas, +8,,Q577227,Caroline Nokes, +9,,Q19958026,Carolyn Harris, +10,,Q19930597,Cat Smith, +11,,Q30173119,Preet Gill, +12,,Q575733,Priti Patel, +13,,Q306250,Robert Syms, +14,,Q263076,Robin Walker, +15,,Q391094,Roger Gale, +16,,Q24668273,Rosena Allin-Khan, +17,,Q290855,Rosie Cooper, +18,,Q30164380,Rosie Duffield, +19,,Q261773,Rosie Winterton, +20,,Q20648372,Royston Smith, +21,,Q76363937,Sam Tarry, +22,,Q76449003,Saqib Bhatti, +23,,Q76363563,Sara Britcliffe, +24,,Q76363249,Sarah Atherton, +25,,Q7422176,Sarah Champion, +26,,Q76364344,Sarah Dines, +27,,Q27942399,Sarah Olney, +28,,Q75621688,Sarah Owen, +29,,Q391169,Barry Gardiner, +30,,Q477464,Barry Sheerman, +31,,Q76364048,Bell Ribeiro-Addy, +32,,Q264618,Ben Bradshaw, +33,,Q76364469,Ben Everitt, +34,,Q30172752,Ben Lake, +35,,Q727852,Bernard Jenkin, +36,,Q76363918,Beth Winter, +37,,Q269449,Bill Cash, +38,,Q303465,Bill Esterson, +39,,Q265900,Bill Wiggin, +40,,Q30174692,Bim Afolami, +41,,Q263875,Bob Blackman, +42,,Q577771,Bob Neill, +43,,Q30234248,Bob Seely, +44,,Q180589,Boris Johnson, +45,,Q749687,Brandon Lewis, +46,,Q63929253,Brendan Clarke-Smith, +47,,Q575337,Bridget Phillipson, +48,,Q75818967,Dave Doogan, +49,,Q259646,David Amess, +50,,Q303883,David Evennett, +51,,Q534727,David Lammy, +52,,Q333520,David Mundell, +53,,Q479064,David Rutley, +54,,Q76363601,David Simmonds, +55,,Q296797,David TC Davies, +56,,Q5240825,David Warburton, +57,,Q5242429,Dawn Butler, +58,,Q76450658,Dean Russell, +59,,Q258088,Debbie Abrahams, +60,,Q76364853,Dehenna Davison, +61,,Q19871637,Deidre Brock, +62,,Q272098,Derek Twigg, +63,,Q327823,Desmond Swayne, +64,,Q20127909,Holly Lynch, +65,,Q76363388,Holly Mumby-Croft, +66,,Q20195263,Huw Merriman, +67,,Q14948811,John Nicolson, +68,,Q575513,John Penrose, +69,,Q333846,John Redwood, +70,,Q389677,John Spellar, +71,,Q264684,John Whittingdale, +72,,Q291591,Jon Cruddas, +73,,Q272234,Jon Trickett, +74,,Q259895,Jonathan Ashworth, +75,,Q300142,Jonathan Djanogly, +76,,Q76363124,Jonathan Gullis, +77,,Q695241,Jonathan Lord, +78,,Q501926,Jonathan Reynolds, +79,,Q63929106,Joy Morrissey, +80,,Q19957188,Judith Cummins, +81,,Q749612,Julian Lewis, +82,,Q328608,Julian Sturdy, +83,,Q303011,Julie Elliott, +84,,Q76362964,Julie Marson, +85,,Q78236114,List of MPs elected in the 2019 United Kingdom general election, +86,,Q19883132,Patricia Gibson, +87,,Q19883135,Patrick Grady, +88,,Q263243,Paul Beresford, +89,,Q264132,Paul Blomfield, +90,,Q76364834,Paul Bristow, +91,,Q7150909,Paul Girvan, +92,,Q694929,Paul Maskey, +93,,Q694881,Paul Maynard, +94,,Q20647800,Paul Scully, +95,,Q76363951,Paula Barker, +96,,Q110863310,Paulette Hamilton, +97,,Q750135,Pauline Latham, +98,,Q580464,Penny Mordaunt, +99,,Q261675,Pete Wishart, +100,,Q258963,Peter Aldous, +101,,Q264426,Peter Bone, +102,,Q264477,Peter Bottomley, +103,,Q19957586,Peter Dowd, +104,,Q20113749,Peter Kyle, +105,,Q271683,Rehman Chishti, +106,,Q19871710,Richard Burgon, +107,,Q302187,Richard Drax, +108,,Q98626667,Richard Foord, +109,,Q20055561,Rishi Sunak, +110,,Q269853,Robert Buckland, +111,,Q27671735,Robert Courts, +112,,Q391644,Robert Goodwill, +113,,Q392375,Robert Halfon, +114,,Q17180679,Robert Jenrick, +115,,Q76363319,Robert Largan, +116,,Q266978,Valerie Vaz, +117,,Q441532,Vicky Ford, +118,,Q19957802,Vicky Foxcroft, +119,,Q19938362,Victoria Atkins, +120,,Q20054083,Victoria Prentis, +121,,Q478387,Virendra Sharma, +122,,Q76363411,Virginia Crosbie, +123,,Q19957790,Colleen Fletcher, +124,,Q5149523,Colum Eastwood, +125,,Q269925,Conor Burns, +126,,Q5162256,Conor McGinn, +127,,Q5181182,Craig Mackinlay, +128,,Q20195470,Craig Tracey, +129,,Q264636,Craig Whittaker, +130,,Q264305,Crispin Blunt, +131,,Q478161,Matt Hancock, +132,,Q30164903,Matt Rodda, +133,,Q76362976,Matt Vickers, +134,,Q20648556,Matt Warman, +135,,Q30164376,Matt Western, +136,,Q576537,Matthew Offord, +137,,Q20203414,Matthew Pennycook, +138,,Q676658,Meg Hillier, +139,,Q328769,Mel Stride, +140,,Q7380182,Rupa Huq, +141,,Q259423,Rushanara Ali, +142,,Q19871785,Ruth Cadbury, +143,,Q76450717,Ruth Edwards, +144,,Q727798,Sajid Javid, +145,,Q76364330,Sally-Ann Hart, +146,,Q266146,Chris Bryant, +147,,Q24053857,Chris Elmore, +148,,Q337453,Chris Grayling, +149,,Q5106839,Chris Hazzard, +150,,Q673322,Chris Heaton-Harris, +151,,Q19875413,Chris Law, +152,,Q76364033,Chris Loder, +153,,Q16972528,Chris Philp, +154,,Q575266,Chris Pincher, +155,,Q391526,Chris Skidmore, +156,,Q19059345,Chris Stephens, +157,,Q76363097,Christian Wakeford, +158,,Q20648332,Christina Rees, +159,,Q30164696,Christine Jardine, +160,,Q271715,Christopher Chope, +161,,Q76364263,Claire Coutinho, +162,,Q20631177,Claire Hanna, +163,,Q5129278,Claudia Webbe, +164,,Q263508,Clive Betts, +165,,Q302939,Clive Efford, +166,,Q19938322,Edward Argar, +167,,Q749980,Edward Leigh, +168,,Q272318,Edward Timpson, +169,,Q750188,Eleanor Laing, +170,,Q30234240,Ellie Reeves, +171,,Q76363641,Elliot Colburn, +172,,Q272408,Emily Thornberry, +173,,Q30234242,Emma Hardy, +174,,Q16190712,Emma Lewell-Buck, +175,,Q76364829,Gagan Mohindra, +176,,Q5522788,Gareth Bacon, +177,,Q727981,Gareth Johnson, +178,,Q76363034,Gary Sambrook, +179,,Q328791,Gary Streeter, +180,,Q19883145,Gavin Newlands, +181,,Q5528262,Gavin Robinson, +182,,Q262409,Gavin Williamson, +183,,Q285183,Geoffrey Clifton-Brown, +184,,Q303510,George Eustice, +185,,Q689546,George Howarth, +186,,Q20647531,Gerald Jones, +187,,Q5561727,Giles Watling, +188,,Q24034408,Gill Furniss, +189,,Q30232942,Gillian Keegan, +190,,Q264662,Graham Brady, +191,,Q328737,Graham Stringer, +192,,Q580215,Grahame Morris, +193,,Q478596,Grant Shapps, +194,,Q76363500,Miriam Cates, +195,,Q75838676,Munira Wilson, +196,,Q259361,Nadhim Zahawi, +197,,Q76363111,Nadia Whittome, +198,,Q258586,Nadine Dorries, +199,,Q75583507,Theo Clarke, +200,,Q264766,Theresa May, +201,,Q266793,Theresa Villiers, +202,,Q19874642,Andrea Jenkyns, +203,,Q750091,Andrea Leadsom, +204,,Q265028,Andrew Bridgen, +205,,Q76736652,Andrew Griffith, +206,,Q392216,Andrew Gwynne, +207,,Q16980037,Andrew Lewer, +208,,Q333261,Andrew Mitchell, +209,,Q578234,Andrew Murrison, +210,,Q575493,Andrew Percy, +211,,Q480092,Andrew Rosindell, +212,,Q478714,Andrew Selous, +213,,Q341570,Andrew Stephenson, +214,,Q391341,Andy Slaughter, +215,,Q19883053,Angela Crawley, +216,,Q302763,Angela Eagle, +217,,Q18164278,Angela Rayner, +218,,Q76363854,Angela Richardson, +219,,Q695092,Angus MacNeil, +220,,Q54670211,Anna Firth, +221,,Q30164279,Anna McMorrin, +222,,Q20648244,Anne-Marie Trevelyan, +223,,Q580321,Anne Marie Morris, +224,,Q373047,Anne McLaughlin, +225,,Q16529268,Anneliese Dodds, +226,,Q76450714,Anthony Mangnall, +227,,Q76363542,Antony Higginbotham, +228,,Q106828783,Anum Qaisar, +229,,Q76363973,Apsana Begum, +230,,Q30165327,Lee Rowley, +231,,Q30234245,Leo Docherty, +232,,Q76363431,Lia Nici, +233,,Q269697,Liam Byrne, +234,,Q332374,Liam Fox, +235,,Q392064,Lilian Greenwood, +236,,Q689660,Lindsay Hoyle, +237,,Q19871819,Lisa Cameron, +238,,Q578037,Lisa Nandy, +239,,Q750260,Liz Kendall, +240,,Q19868633,Liz Saville Roberts, +241,,Q272201,Liz Truss, +242,,Q30165748,Liz Twist, +243,,Q30165113,Lloyd Russell-Moyle, +244,,Q76363567,Louie French, +245,,Q19957992,Louise Haigh, +246,,Q19957811,Lucy Frazer, +247,,Q6698469,Lucy Powell, +248,,Q30164902,Luke Pollard, +249,,Q265870,Lyn Brown, +250,,Q20647819,Maggie Throup, +251,,Q75427885,Simon Baynes, +252,,Q478345,Simon Hart, +253,,Q19958093,Simon Hoare, +254,,Q76449017,Simon Jupp, +255,,Q112133647,Simon Lightwood, +256,,Q694759,Siobhain McDonagh, +257,,Q76363409,Siobhan Baillie, +258,,Q291502,Stella Creasy, +259,,Q291393,Stephen Crabb, +260,,Q7609085,Stephen Doughty, +261,,Q7609180,Stephen Farry, +262,,Q332979,Stephen Hammond, +263,,Q3377178,Stephen Kinnock, +264,,Q584156,Stephen McPartland, +265,,Q272346,Stephen Timms, +266,,Q260546,Steve Barclay, +267,,Q265088,Steve Brine, +268,,Q19957580,Steve Double, +269,,Q694869,Steve McCabe, +270,,Q75818978,Steven Bonnar, +271,,Q689514,Stewart Hosie, +272,,Q259707,Stuart Andrew, +273,,Q19957769,Suella Braverman, +274,,Q291057,Yvette Cooper, +275,,Q390756,Yvonne Fovargue, +276,,Q63929279,Zarah Sultana, +277,,Q52587398,Órfhlaith Begley, +278,,Q30164451,Stephanie Peacock, +279,,Q30165325,Bambos Charalambous, +280,,Q750293,Barbara Keeley, +281,,Q3411409,Catherine McKinnell, +282,,Q19871931,Catherine West, +283,,Q290554,Thérèse Coffey, +284,,Q304251,Tim Farron, +285,,Q695228,Tim Loughton, +286,,Q303299,Tobias Ellwood, +287,,Q575462,Toby Perkins, +288,,Q16232474,Tom Pursglove, +289,,Q20648385,Tom Tugendhat, +290,,Q30165536,Tonia Antoniazzi, +291,,Q695295,Tony Lloyd, +292,,Q291557,Tracey Crouch, +293,,Q7831699,Tracy Brabin, +294,,Q28834855,Trudy Harrison, +295,,Q7852071,Tulip Siddiq, +296,,Q296716,Wayne David, +297,,Q75838898,Wendy Chamberlain, +298,,Q19917814,Wendy Morton, +299,,Q30164280,Wera Hobhouse, +300,,Q7983764,Wes Streeting, +301,,Q16751766,Will Quince, +302,,Q20732037,William Wragg, +303,,Q76364163,Kate Kniveton, +304,,Q76364044,Abena Oppong-Asare, +305,,Q258473,Adam Afriyie, +306,,Q689348,Adam Holloway, +307,,Q264585,Alan Whitehead, +308,,Q393751,Alec Shelbrooke, +309,,Q30234239,Alex Burghart, +310,,Q19956858,Alex Chalk, +311,,Q291649,Alex Cunningham, +312,,Q76364874,Alex Davies-Jones, +313,,Q30234243,Alex Norris, +314,,Q30164792,Alex Sobel, +315,,Q76449027,Alexander Stafford, +316,,Q76363294,Alicia Kearns, +317,,Q694639,Alison McGovern, +318,,Q19882771,Alison Thewliss, +319,,Q269124,Alistair Carmichael, +320,,Q30165682,Alister Jack, +321,,Q75818980,Allan Dorans, +322,,Q478531,Alok Sharma, +323,,Q268030,Alun Cairns, +324,,Q450298,Alyn Smith, +325,,Q20648982,Amanda Milling, +326,,Q20648487,Amanda Solloway, +327,,Q75818988,Amy Callaghan, +328,,Q75838761,Daisy Cooper, +329,,Q290646,Damian Collins, +330,,Q391960,Damian Green, +331,,Q676947,Damian Hinds, +332,,Q30163703,Damien Moore, +333,,Q30226321,Dan Carden, +334,,Q727587,Dan Jarvis, +335,,Q575239,Dan Poulter, +336,,Q692315,Daniel Kawczynski, +337,,Q20128211,Daniel Zeichner, +338,,Q16515053,Danny Kruger, +339,,Q76362949,Darren Henry, +340,,Q5307191,Drew Hendry, +341,,Q76363201,Duncan Baker, +342,,Q296689,Ed Davey, +343,,Q216594,Ed Miliband, +344,,Q584062,Esther McVey, +345,,Q337812,Fabian Hamilton, +346,,Q76362972,Felicity Buchan, +347,,Q75621766,Feryal Clark, +348,,Q75410647,Fleur Anderson, +349,,Q19872756,Flick Drummond, +350,,Q24061230,Florence Eshalomi, +351,,Q5479812,Francie Molloy, +352,,Q265935,Nick Brown, +353,,Q391300,Nick Gibb, +354,,Q20648913,Nick Thomas-Symonds, +355,,Q56709363,Nickie Aiken, +356,,Q76363721,Nicola Richards, +357,,Q258292,Nigel Adams, +358,,Q303814,Nigel Evans, +359,,Q16211496,Nigel Huddleston, +360,,Q19957887,Nus Ghani, +361,,Q197894,Owen Paterson, +362,,Q19883152,Owen Thompson, +363,,Q694676,Pat McFadden, +364,,Q271800,Greg Clark, +365,,Q478227,Greg Hands, +366,,Q750219,Greg Knight, +367,,Q576195,Guy Opperman, +368,,Q19882420,Hannah Bardell, +369,,Q234182,Harriet Harman, +370,,Q260429,Harriett Baldwin, +371,,Q264374,Heather Wheeler, +372,,Q20747098,Helen Whately, +373,,Q262742,Hilary Benn, +374,,Q30165535,Jack Brereton, +375,,Q302244,Jack Dromey, +376,,Q695257,Jack Lopresti, +377,,Q302036,Jackie Doyle-Price, +378,,Q574980,Jacob Rees-Mogg, +379,,Q263350,Jake Berry, +380,,Q265140,James Brokenshire, +381,,Q19956787,James Cartlidge, +382,,Q6131460,James Cleverly, +383,,Q302309,James Duddridge, +384,,Q19958052,James Heappey, +385,,Q76363017,Jamie Wallis, +386,,Q55003337,Janet Daby, +387,,Q300292,Jeffrey Donaldson, +388,,Q30169287,Tanmanjeet Singh Dhesi, +389,,Q19882875,Thangam Debbonaire, +390,,Q76364081,Charlotte Nichols, +391,,Q76364111,Cherilyn Mackrory, +392,,Q333852,Cheryl Gillan, +393,,Q576208,Chi Onwurah, +394,,Q333680,Chloe Smith, +395,,Q291169,Jeremy Corbyn, +396,,Q333533,Jeremy Hunt, +397,,Q19946187,Jeremy Quin, +398,,Q260489,Jeremy Wright, +399,,Q76237363,Jerome Mayhew, +400,,Q19979409,Jess Phillips, +401,,Q577024,Jesse Norman, +402,,Q580431,Jessica Morden, +403,,Q75179504,Jill Mortimer, +404,,Q478702,Jim Shannon, +405,,Q19872133,Jo Churchill, +406,,Q76450664,Jo Gideon, +407,,Q20128115,Jo Stevens, +408,,Q19882967,Joanna Cherry, +409,,Q291615,John Cryer, +410,,Q55615175,John Finucane, +411,,Q1700778,John Lamont, +412,,Q694695,John McDonnell, +413,,Q20647673,Justin Madders, +414,,Q272288,Justin Tomlinson, +415,,Q264560,Karen Bradley, +416,,Q266238,Karen Buck, +417,,Q17057181,Karin Smyth, +418,,Q694811,Karl McCartney, +419,,Q391986,Kate Green, +420,,Q19874280,Kate Hollern, +421,,Q20022488,Kate Osamor, +422,,Q76450728,Kate Osborne, +423,,Q76362908,Katherine Fletcher, +424,,Q6383803,Keir Starmer, +425,,Q20055581,Kelly Tolhurst, +426,,Q21592171,Kemi Badenoch, +427,,Q983174,Kenny MacAskill, +428,,Q581095,Kerry McCarthy, +429,,Q750411,Kevan Jones, +430,,Q19958100,Kevin Hollinrake, +431,,Q76364848,Kieran Mullan, +432,,Q107009776,Kim Leadbeater, +433,,Q76363401,Laura Farris, +434,,Q480148,Laurence Robertson, +435,,Q30223601,Layla Moran, +436,,Q63929121,Suzanne Webb, +437,,Q76450672,Tahir Ali, +438,,Q76364051,Taiwo Owatemi, +439,,Q727933,Diana Johnson, +440,,Q153454,Diane Abbott, +441,,Q268584,Dominic Raab, +442,,Q76363678,Marco Longhi, +443,,Q19873418,Marcus Fysh, +444,,Q232639,Margaret Beckett, +445,,Q19883129,Margaret Ferrier, +446,,Q19957949,Margaret Greenwood, +447,,Q688913,Margaret Hodge, +448,,Q19956815,Maria Caulfield, +449,,Q302815,Maria Eagle, +450,,Q334261,Maria Miller, +451,,Q20648527,Marie Rimmer, +452,,Q19881816,Marion Fellows, +453,,Q76362999,Mark Eastwood, +454,,Q390869,Mark Francois, +455,,Q391222,Mark Garnier, +456,,Q478276,Mark Harper, +457,,Q673628,Mark Hendrick, +458,,Q76450655,Mark Jenkinson, +459,,Q583750,Mark Menzies, +460,,Q575693,Mark Pawsey, +461,,Q272569,Mark Tami, +462,,Q30163501,Marsha de Cordova, +463,,Q19883117,Martin Docherty-Hughes, +464,,Q266905,Martin Vickers, +465,,Q391483,Mary Glindon, +466,,Q300004,Philip Davies, +467,,Q689287,Philip Hollobone, +468,,Q19874405,Philippa Whitford, +469,,Q266189,Hywel Williams, +470,,Q302486,Iain Duncan Smith, +471,,Q18921442,Ian Blackford, +472,,Q750129,Ian Lavery, +473,,Q76363211,Ian Levy, +474,,Q748955,Ian Liddell-Grainger, +475,,Q583906,Ian Mearns, +476,,Q575881,Ian Paisley Jr, +477,,Q76364147,Imran Ahmad Khan, +478,,Q19874839,Kirsten Oswald, +479,,Q19868554,Kirsty Blackman, +480,,Q6417459,Kit Malthouse, +481,,Q750204,Kwasi Kwarteng, +482,,Q19863151,Mhairi Black, +483,,Q304027,Michael Fabricant, +484,,Q333937,Michael Gove, +485,,Q20647896,Michael Tomlinson, +486,,Q19872694,Michelle Donelan, +487,,Q337970,Michelle Gildernew, +488,,Q76363909,Mick Whitley, +489,,Q6838584,Mickey Brady, +490,,Q30223596,Mike Amesbury, +491,,Q391008,Mike Freer, +492,,Q16190632,Mike Kane, +493,,Q575593,Mike Penning, +494,,Q19957306,Mims Davies, +495,,Q42846975,Natalie Elphicke, +496,,Q75720091,Navendu Mishra, +497,,Q19882845,Naz Shah, +498,,Q75818970,Neale Hanvey, +499,,Q19957144,Neil Coyle, +500,,Q19882694,Neil Gray, +501,,Q333714,Neil Parish, +502,,Q392101,Nia Griffith, +503,,Q19957590,Oliver Dowden, +504,,Q478711,Oliver Heald, +505,,Q76363044,Olivia Blake, +506,,Q20127923,Rachael Maskell, +507,,Q76448943,Rachel Hopkins, +508,,Q574896,Rachel Reeves, +509,,Q19870873,Ranil Jayawardena, +510,,Q478305,Rebecca Harris, +511,,Q19979355,Rebecca Long-Bailey, +512,,Q20647855,Rebecca Pow, +513,,Q694984,Seema Malhotra, +514,,Q76362953,Selaine Saxby, +515,,Q695007,Shabana Mahmood, +516,,Q267234,Shailesh Vara, +517,,Q689041,Sharon Hodgson, +518,,Q578272,Sheryll Murray, +519,,Q267930,Yasmin Qureshi, +520,,Q580847,Nigel Mills, +521,,Q92816852,Ian Byrne, diff --git a/database/relationship.csv b/database/relationship.csv index cd18e20..b1e3490 100644 --- a/database/relationship.csv +++ b/database/relationship.csv @@ -1,5 +1,352 @@ -MP,University,Subject -1,1,1 -1,2,2 -2,3,3 -2,4,4 +,Unnamed: 0,MP,University,Subject +0,0.0,1,1,1 +1,1.0,1,2,2 +2,2.0,2,3,3 +3,3.0,2,4,4 +0,,Q24052782,5, +0,,Q19875589,6, +0,,Q19870758,7, +1,,Q19870758,7, +0,,Q300107,8, +0,,Q27979810,9, +0,,Q577227,7, +0,,Q19958026,8, +0,,Q19930597,12, +0,,Q30173119,13, +0,,Q263076,14, +0,,Q24668273,15, +1,,Q24668273,15, +0,,Q290855,16, +0,,Q261773,17, +0,,Q76363563,18, +0,,Q76363249,19, +0,,Q7422176,20, +0,,Q27942399,21, +0,,Q477464,22, +0,,Q264618,7, +0,,Q76363918,8, +0,,Q269449,25, +0,,Q303465,26, +0,,Q265900,19, +0,,Q577771,22, +0,,Q749687,29, +1,,Q749687,29, +2,,Q749687,21, +0,,Q575337,30, +0,,Q75818967,31, +0,,Q333520,32, +1,,Q333520,32, +0,,Q479064,22, +1,,Q479064,33, +0,,Q76363601,34, +0,,Q5240825,21, +0,,Q76450658,36, +0,,Q258088,16, +1,,Q258088,37, +0,,Q76364853,17, +0,,Q20127909,12, +0,,Q20195263,40, +1,,Q20195263,40, +0,,Q14948811,41, +0,,Q575513,42, +1,,Q575513,42, +0,,Q333846,43, +1,,Q333846,43, +0,,Q291591,44, +0,,Q272234,17, +1,,Q272234,26, +0,,Q259895,34, +0,,Q76363124,47, +0,,Q695241,48, +0,,Q501926,18, +0,,Q63929106,22, +0,,Q328608,51, +0,,Q19883132,41, +0,,Q19883135,6, +0,,Q263243,54, +0,,Q264132,55, +0,,Q76364834,12, +0,,Q694881,57, +0,,Q20647800,58, +0,,Q261675,32, +0,,Q258963,58, +0,,Q264477,61, +0,,Q20113749,7, +0,,Q19871710,63, +0,,Q302187,64, +1,,Q302187,64, +0,,Q269853,65, +0,,Q27671735,20, +0,,Q392375,1, +0,,Q17180679,63, +0,,Q76363319,18, +0,,Q441532,61, +0,,Q19957802,36, +0,,Q19938362,72, +0,,Q20054083,7, +1,,Q20054083,42, +0,,Q478387,22, +0,,Q269925,75, +0,,Q5162256,76, +0,,Q5181182,77, +0,,Q30164903,7, +0,,Q20648556,34, +0,,Q30164376,80, +0,,Q20203414,22, +1,,Q20203414,14, +0,,Q676658,82, +0,,Q328769,83, +0,,Q7380182,13, +1,,Q7380182,84, +2,,Q7380182,84, +0,,Q259423,85, +1,,Q259423,85, +0,,Q19871785,37, +0,,Q5106839,87, +0,,Q16972528,57, +0,,Q575266,22, +0,,Q76363097,12, +1,,Q76363097,90, +0,,Q20648332,91, +0,,Q30164696,41, +0,,Q76364263,93, +0,,Q20631177,90, +0,,Q5129278,95, +1,,Q5129278,36, +0,,Q263508,96, +0,,Q19938322,97, +0,,Q749980,40, +0,,Q750188,32, +0,,Q30234240,100, +0,,Q76363641,101, +0,,Q272408,102, +0,,Q30234242,26, +1,,Q30234242,16, +0,,Q16190712,34, +1,,Q16190712,104, +0,,Q76364829,21, +0,,Q328791,21, +0,,Q19883145,107, +0,,Q5528262,5, +0,,Q262409,109, +0,,Q24034408,110, +0,,Q580215,104, +1,,Q580215,111, +0,,Q75838676,112, +0,,Q259361,113, +0,,Q75583507,9, +0,,Q266793,80, +1,,Q266793,40, +2,,Q266793,115, +0,,Q19874642,90, +0,,Q265028,117, +0,,Q76736652,117, +0,,Q16980037,9, +0,,Q333261,120, +0,,Q578234,121, +1,,Q578234,80, +2,,Q578234,121, +3,,Q578234,121, +0,,Q575493,26, +1,,Q575493,122, +0,,Q478714,22, +0,,Q391341,1, +0,,Q19883053,41, +1,,Q19883053,125, +0,,Q302763,85, +0,,Q18164278,127, +0,,Q695092,6, +0,,Q54670211,34, +0,,Q30164279,130, +1,,Q30164279,75, +0,,Q580321,30, +0,,Q76450714,1, +0,,Q76363542,17, +1,,Q76363542,40, +0,,Q106828783,125, +0,,Q30165327,18, +1,,Q30165327,25, +0,,Q30234245,64, +0,,Q269697,18, +1,,Q269697,137, +0,,Q392064,112, +0,,Q19871819,41, +1,,Q19871819,125, +2,,Q19871819,6, +0,,Q578037,9, +0,,Q750260,141, +0,,Q19868633,101, +0,,Q30165748,101, +0,,Q30165113,109, +1,,Q30165113,7, +0,,Q19957811,84, +0,,Q30164902,1, +0,,Q265870,147, +0,,Q20647819,18, +0,,Q19958093,149, +0,,Q694759,150, +0,,Q291502,151, +1,,Q291502,22, +0,,Q291393,80, +1,,Q291393,152, +0,,Q7609085,153, +0,,Q332979,154, +0,,Q3377178,141, +0,,Q260546,151, +0,,Q390756,26, +0,,Q63929279,77, +0,,Q52587398,87, +0,,Q30164451,113, +0,,Q30165325,161, +0,,Q750293,37, +0,,Q3411409,32, +0,,Q304251,9, +0,,Q695228,44, +0,,Q303299,166, +1,,Q303299,166, +0,,Q30165536,1, +0,,Q695295,117, +0,,Q291557,17, +0,,Q7831699,170, +1,,Q7831699,166, +0,,Q28834855,37, +0,,Q296716,130, +1,,Q296716,8, +0,,Q75838898,32, +0,,Q19917814,90, +0,,Q7983764,175, +0,,Q16751766,101, +0,,Q20732037,18, +0,,Q258473,178, +0,,Q30234239,179, +1,,Q30234239,21, +0,,Q19956858,43, +0,,Q76364874,130, +0,,Q30234243,117, +0,,Q30164792,26, +0,,Q76449027,184, +0,,Q76363294,185, +0,,Q694639,113, +0,,Q19882771,187, +0,,Q450298,26, +1,,Q450298,188, +0,,Q20648982,113, +0,,Q75838761,26, +1,,Q75838761,117, +0,,Q290646,184, +0,,Q391960,14, +0,,Q676947,193, +0,,Q30163703,194, +0,,Q30226321,22, +0,,Q727587,64, +1,,Q727587,101, +2,,Q727587,21, +0,,Q692315,125, +0,,Q20128211,198, +0,,Q16515053,32, +1,,Q16515053,85, +0,,Q76363201,188, +0,,Q296689,115, +0,,Q76362972,179, +0,,Q75410647,122, +0,,Q19872756,17, +1,,Q19872756,75, +0,,Q24061230,205, +0,,Q20648913,83, +0,,Q56709363,1, +0,,Q76363721,77, +0,,Q258292,209, +0,,Q303814,8, +0,,Q16211496,179, +0,,Q19957887,212, +1,,Q19957887,26, +0,,Q197894,72, +0,,Q694676,32, +0,,Q271800,22, +1,,Q271800,215, +0,,Q478227,216, +0,,Q576195,29, +0,,Q19882420,125, +0,,Q234182,122, +0,,Q260429,220, +1,,Q260429,220, +0,,Q262742,7, +0,,Q30165535,113, +1,,Q30165535,222, +0,,Q19956787,18, +0,,Q300292,224, +0,,Q30169287,113, +1,,Q30169287,185, +2,,Q30169287,225, +0,,Q76364081,16, +0,,Q333680,122, +0,,Q291169,228, +0,,Q19946187,30, +0,,Q260489,1, +0,,Q76237363,32, +1,,Q76237363,231, +0,,Q577024,113, +1,,Q577024,48, +0,,Q580431,77, +0,,Q76450664,77, +0,,Q20128115,18, +0,,Q291615,236, +1,,Q291615,236, +0,,Q1700778,41, +0,,Q20647673,20, +0,,Q272288,47, +0,,Q264560,240, +0,,Q266238,22, +0,,Q17057181,242, +1,,Q17057181,242, +0,,Q391986,32, +0,,Q20022488,13, +0,,Q76362908,117, +0,,Q983174,32, +0,,Q581095,16, +1,,Q581095,247, +2,,Q581095,247, +0,,Q480148,248, +0,,Q76364051,102, +0,,Q727933,154, +0,,Q153454,84, +0,,Q334261,22, +0,,Q390869,80, +1,,Q390869,21, +0,,Q478276,254, +0,,Q673628,255, +1,,Q673628,161, +0,,Q583750,41, +0,,Q30163501,257, +0,,Q19883117,150, +1,,Q19883117,258, +2,,Q19883117,258, +0,,Q689287,220, +0,,Q19874405,260, +0,,Q575881,87, +0,,Q19874839,41, +0,,Q6417459,9, +0,,Q304027,7, +1,,Q304027,166, +0,,Q20647896,21, +0,,Q19957306,8, +0,,Q42846975,102, +0,,Q19957144,17, +0,,Q392101,19, +1,,Q392101,269, +0,,Q19957590,270, +0,,Q478711,96, +1,,Q478711,40, +0,,Q76363044,20, +0,,Q20127923,242, +0,,Q19870873,22, +0,,Q478305,275, +1,,Q478305,22, +0,,Q694984,44, +1,,Q694984,276, +0,,Q76362953,215, +0,,Q695007,85, +1,,Q695007,25, +0,,Q267930,113, +0,,Q580847,9, +0,,Q92816852,90, diff --git a/database/university.csv b/database/university.csv index 0e52ed0..ebcb621 100644 --- a/database/university.csv +++ b/database/university.csv @@ -1,5 +1,352 @@ -ID,UniName,UniLocation,WikiURL -1,University of Exeter,"50.736111, -3.535",https://www.wikidata.org/wiki/Q1414861 -2,University of Kansas,"38.9584, -95.2478",https://www.wikidata.org/wiki/Q52413 -3,University of Leicester,"52.621389, -1.124444", https://www.wikidata.org/wiki/Q1333399 -4,University of Bedfordshire,"51.877778, -0.411389",https://www.wikidata.org/wiki/Q3047150 +,Unnamed: 0,ID,UniName,UniLocation,WikiURL +0,0.0,1,University of Exeter,"50.736111, -3.535",https://www.wikidata.org/wiki/Q1414861 +1,1.0,2,University of Kansas,"38.9584, -95.2478",https://www.wikidata.org/wiki/Q52413 +2,2.0,3,University of Leicester,"52.621389, -1.124444", https://www.wikidata.org/wiki/Q1333399 +3,3.0,4,University of Bedfordshire,"51.877778, -0.411389",https://www.wikidata.org/wiki/Q3047150 +4,,5,Ulster University,"54.60361099243164, -5.928611278533936", +5,,6,University of Strathclyde,"55.86171722412109, -4.241699695587158", +6,,7,"Royal Holloway, University of London","51.42472076416016, -0.566944420337677", +7,,7,University of Sussex,"50.86527633666992, -0.0855555534362793", +8,,8,Swansea University,"51.60972213745117, -3.980555534362793", +9,,9,Newcastle University,"54.97800064086914, -1.615000009536743", +10,,10,University of Sussex,"50.86527633666992, -0.0855555534362793", +11,,11,Swansea University,"51.60972213745117, -3.980555534362793", +12,,12,Lancaster University,"54.01027679443359, -2.785555601119995", +13,,13,University of East London,"51.50777816772461, 0.06361111253499985", +14,,14,"Balliol College, Oxford","51.75469970703125, -1.257799983024597", +15,,15,"Lucy Cavendish College, Cambridge","52.21120071411133, 0.1101000010967255", +16,,15,Brunel University London,"51.53277587890625, -0.472777783870697", +17,,16,University of Liverpool,"53.40599822998047, -2.967000007629395", +18,,17,University of Hull,"53.770263671875, -0.3671410083770752", +19,,18,University of Manchester,"53.46666717529297, -2.233333349227905", +20,,19,Bangor University,"53.22890090942383, -4.130099773406982", +21,,20,University of Sheffield,"53.38069915771484, -1.488800048828125", +22,,21,King's College London,"51.51194381713867, -0.1161111146211624", +23,,22,London School of Economics,"51.51388931274414, -0.116666667163372", +24,,23,University of Sussex,"50.86527633666992, -0.0855555534362793", +25,,24,Swansea University,"51.60972213745117, -3.980555534362793", +26,,25,"Lincoln College, Oxford","51.75326156616211, -1.255905032157898", +27,,26,University of Leeds,"53.80722045898438, -1.551666617393494", +28,,27,Bangor University,"53.22890090942383, -4.130099773406982", +29,,28,London School of Economics,"51.51388931274414, -0.116666667163372", +30,,29,University of Buckingham,"51.99583435058594, -0.991944432258606", +31,,29,Inner Temple,"51.51250076293945, -0.1089999973773956", +32,,29,King's College London,"51.51194381713867, -0.1161111146211624", +33,,30,"Hertford College, Oxford","51.75420379638672, -1.253466963768005", +34,,31,University of Dundee,"56.45722198486328, -2.98027777671814", +35,,32,University of Edinburgh,"55.9473876953125, -3.187194347381592", +36,,32,Strathclyde Business School,"55.86100006103516, -4.244999885559082", +37,,33,London School of Economics,"51.51388931274414, -0.116666667163372", +38,,33,Harvard University,"42.37444305419922, -71.116943359375", +39,,34,Durham University,"54.77500152587891, -1.575000047683716", +40,,35,King's College London,"51.51194381713867, -0.1161111146211624", +41,,36,De Montfort University,"52.63000106811523, -1.140499949455261", +42,,37,University of Liverpool,"53.40599822998047, -2.967000007629395", +43,,37,University of Salford,"53.48444366455078, -2.271389007568359", +44,,38,University of Hull,"53.770263671875, -0.3671410083770752", +45,,39,Lancaster University,"54.01027679443359, -2.785555601119995", +46,,40,"University College, Durham","54.77553176879883, -1.576159954071045", +47,,40,City Law School,"51.5272216796875, -0.1055555567145348", +48,,41,University of Glasgow,"55.87194442749023, -4.287499904632568", +49,,42,Columbia Business School,"40.80997848510742, -73.96096038818359", +50,,42,"Downing College, Cambridge","52.20080184936523, 0.1247999966144562", +51,,43,"Magdalen College, Oxford","51.75237274169922, -1.247076988220215", +52,,43,"St Antony's College, Oxford","51.76314926147461, -1.262902975082397", +53,,44,University of Warwick,"52.38000106811523, -1.56166660785675", +54,,45,University of Hull,"53.770263671875, -0.3671410083770752", +55,,45,University of Leeds,"53.80722045898438, -1.551666617393494", +56,,46,Durham University,"54.77500152587891, -1.575000047683716", +57,,47,Oxford Brookes University,"51.75426483154297, -1.222699999809265", +58,,48,"Merton College, Oxford","51.75099945068359, -1.251999974250793", +59,,49,University of Manchester,"53.46666717529297, -2.233333349227905", +60,,50,London School of Economics,"51.51388931274414, -0.116666667163372", +61,,51,Harper Adams University,"52.7796516418457, -2.427516937255859", +62,,52,University of Glasgow,"55.87194442749023, -4.287499904632568", +63,,53,University of Strathclyde,"55.86171722412109, -4.241699695587158", +64,,54,University of Otago,"-45.86555480957031, 170.5138854980469", +65,,55,York St John University,"53.96540069580078, -1.080672979354858", +66,,56,Lancaster University,"54.01027679443359, -2.785555601119995", +67,,57,"University College, Oxford","51.75249862670898, -1.251999974250793", +68,,58,University of Reading,"51.44194412231445, -0.945555567741394", +69,,59,University of Edinburgh,"55.9473876953125, -3.187194347381592", +70,,60,University of Reading,"51.44194412231445, -0.945555567741394", +71,,61,"Trinity College, Cambridge","52.20700073242188, 0.1146000027656555", +72,,62,University of Sussex,"50.86527633666992, -0.0855555534362793", +73,,63,"St John's College, Cambridge","52.20805740356445, 0.116666667163372", +74,,64,Royal Agricultural University,"51.54305648803711, -1.995000004768372", +75,,64,Royal Military Academy Sandhurst,"51.34027862548828, -0.7686111330986023", +76,,65,"Hatfield College, Durham","54.77439880371094, -1.574100017547607", +77,,66,University of Sheffield,"53.38069915771484, -1.488800048828125", +78,,67,University of Exeter,"50.73611068725586, -3.535000085830688", +79,,68,"St John's College, Cambridge","52.20805740356445, 0.116666667163372", +80,,69,University of Manchester,"53.46666717529297, -2.233333349227905", +81,,70,"Trinity College, Cambridge","52.20700073242188, 0.1146000027656555", +82,,71,De Montfort University,"52.63000106811523, -1.140499949455261", +83,,72,"Corpus Christi College, Cambridge","52.20309829711914, 0.1180000007152557", +84,,73,"Royal Holloway, University of London","51.42472076416016, -0.566944420337677", +85,,73,"Downing College, Cambridge","52.20080184936523, 0.1247999966144562", +86,,74,London School of Economics,"51.51388931274414, -0.116666667163372", +87,,75,University of Southampton,"50.93463134765625, -1.395949959754944", +88,,76,London Metropolitan University,"51.55157470703125, -0.1106870025396347", +89,,77,University of Birmingham,"52.45055389404297, -1.930555582046509", +90,,78,University of Sussex,"50.86527633666992, -0.0855555534362793", +91,,79,Durham University,"54.77500152587891, -1.575000047683716", +92,,80,University of Bristol,"51.45639038085938, -2.60444450378418", +93,,81,London School of Economics,"51.51388931274414, -0.116666667163372", +94,,81,"Balliol College, Oxford","51.75469970703125, -1.257799983024597", +95,,82,"St Hilda's College, Oxford","51.74916076660156, -1.245334029197693", +96,,83,"St Edmund Hall, Oxford","51.75299835205078, -1.25", +97,,84,University of East London,"51.50777816772461, 0.06361111253499985", +98,,84,Marc Bloch University,"48.57949829101562, 7.764100074768066", +99,,84,"Newnham College, Cambridge","52.19950103759766, 0.1076999977231026", +100,,85,University of Oxford,"51.75500106811523, -1.254999995231628", +101,,85,"St John's College, Oxford","51.75611877441406, -1.258605003356934", +102,,86,University of Salford,"53.48444366455078, -2.271389007568359", +103,,87,Queen's University Belfast,"54.58416748046875, -5.934722423553467", +104,,88,"University College, Oxford","51.75249862670898, -1.251999974250793", +105,,89,London School of Economics,"51.51388931274414, -0.116666667163372", +106,,90,Lancaster University,"54.01027679443359, -2.785555601119995", +107,,90,Open University,"52.02500152587891, -0.7055555582046509", +108,,91,Ystrad Mynach College,"51.63459014892578, -3.240230083465576", +109,,92,University of Glasgow,"55.87194442749023, -4.287499904632568", +110,,93,"Exeter College, Oxford","51.75387191772461, -1.256046056747437", +111,,94,Open University,"52.02500152587891, -0.7055555582046509", +112,,95,"Birkbeck, University of London","51.52194595336914, -0.1302777826786041", +113,,95,De Montfort University,"52.63000106811523, -1.140499949455261", +114,,96,"Pembroke College, Cambridge","52.20199966430664, 0.119999997317791", +115,,97,"Oriel College, Oxford","51.75189971923828, -1.25380003452301", +116,,98,"University College, Durham","54.77553176879883, -1.576159954071045", +117,,99,University of Edinburgh,"55.9473876953125, -3.187194347381592", +118,,100,"St Catherine's College, Oxford","51.75706481933594, -1.245097994804382", +119,,101,Aberystwyth University,"52.41806030273438, -4.065760135650635", +120,,102,University of Kent,"51.29700088500977, 1.069000005722046", +121,,103,University of Leeds,"53.80722045898438, -1.551666617393494", +122,,103,University of Liverpool,"53.40599822998047, -2.967000007629395", +123,,104,Durham University,"54.77500152587891, -1.575000047683716", +124,,104,Northumbria University,"54.97639846801758, -1.608000040054321", +125,,105,King's College London,"51.51194381713867, -0.1161111146211624", +126,,106,King's College London,"51.51194381713867, -0.1161111146211624", +127,,107,James Watt College,"55.94800186157227, -4.754000186920166", +128,,108,Ulster University,"54.60361099243164, -5.928611278533936", +129,,109,University of Bradford,"53.79166793823242, -1.762222170829773", +130,,110,Leeds Beckett University,"53.80416488647461, -1.549444437026978", +131,,111,Northumbria University,"54.97639846801758, -1.608000040054321", +132,,111,Newcastle College,"54.96666717529297, -1.627777814865112", +133,,112,"St Catharine's College, Cambridge","52.20280075073242, 0.1169999986886978", +134,,113,University College London,"51.52472305297852, -0.1336111128330231", +135,,114,Newcastle University,"54.97800064086914, -1.615000009536743", +136,,115,University of Bristol,"51.45639038085938, -2.60444450378418", +137,,115,City Law School,"51.5272216796875, -0.1055555567145348", +138,,115,"Jesus College, Oxford","51.75339889526367, -1.256899952888489", +139,,116,Open University,"52.02500152587891, -0.7055555582046509", +140,,117,University of Nottingham,"52.93899917602539, -1.197000026702881", +141,,118,University of Nottingham,"52.93899917602539, -1.197000026702881", +142,,119,Newcastle University,"54.97800064086914, -1.615000009536743", +143,,120,"Jesus College, Cambridge","52.20916748046875, 0.1233333349227905", +144,,121,"Hughes Hall, Cambridge","52.20090103149414, 0.1324999928474426", +145,,121,University of Bristol,"51.45639038085938, -2.60444450378418", +146,,121,Britannia Royal Naval College,"50.35722351074219, -3.582777738571167", +147,,121,"Dartmouth, Devon","50.35100173950195, -3.578999996185303", +148,,122,University of Leeds,"53.80722045898438, -1.551666617393494", +149,,122,University of York,"53.94659042358398, -1.052500009536743", +150,,123,London School of Economics,"51.51388931274414, -0.116666667163372", +151,,124,University of Exeter,"50.73611068725586, -3.535000085830688", +152,,125,University of Glasgow,"55.87194442749023, -4.287499904632568", +153,,125,University of Stirling,"56.14583206176758, -3.919444561004639", +154,,126,"St John's College, Oxford","51.75611877441406, -1.258605003356934", +155,,127,Stockport College,"53.40439987182617, -2.158699989318848", +156,,128,University of Strathclyde,"55.86171722412109, -4.241699695587158", +157,,129,Durham University,"54.77500152587891, -1.575000047683716", +158,,130,Cardiff University,"51.48770141601562, -3.178999900817871", +159,,130,University of Southampton,"50.93463134765625, -1.395949959754944", +160,,131,"Hertford College, Oxford","51.75420379638672, -1.253466963768005", +161,,132,University of Exeter,"50.73611068725586, -3.535000085830688", +162,,133,University of Hull,"53.770263671875, -0.3671410083770752", +163,,133,City Law School,"51.5272216796875, -0.1055555567145348", +164,,134,University of Stirling,"56.14583206176758, -3.919444561004639", +165,,135,University of Manchester,"53.46666717529297, -2.233333349227905", +166,,135,"Lincoln College, Oxford","51.75326156616211, -1.255905032157898", +167,,136,Royal Military Academy Sandhurst,"51.34027862548828, -0.7686111330986023", +168,,137,University of Manchester,"53.46666717529297, -2.233333349227905", +169,,137,Harvard Business School,"42.36722183227539, -71.12249755859375", +170,,138,"St Catharine's College, Cambridge","52.20280075073242, 0.1169999986886978", +171,,139,University of Glasgow,"55.87194442749023, -4.287499904632568", +172,,139,University of Stirling,"56.14583206176758, -3.919444561004639", +173,,139,University of Strathclyde,"55.86171722412109, -4.241699695587158", +174,,140,Newcastle University,"54.97800064086914, -1.615000009536743", +175,,141,"Queens' College, Cambridge","52.20190048217773, 0.1146999970078468", +176,,142,Aberystwyth University,"52.41806030273438, -4.065760135650635", +177,,143,Aberystwyth University,"52.41806030273438, -4.065760135650635", +178,,144,University of Bradford,"53.79166793823242, -1.762222170829773", +179,,144,University of Sussex,"50.86527633666992, -0.0855555534362793", +180,,145,"Newnham College, Cambridge","52.19950103759766, 0.1076999977231026", +181,,146,University of Exeter,"50.73611068725586, -3.535000085830688", +182,,147,University of Roehampton,"51.45660018920898, -0.2431000024080276", +183,,148,University of Manchester,"53.46666717529297, -2.233333349227905", +184,,149,"Greyfriars, Oxford","51.74679946899414, -1.24016797542572", +185,,150,University of Essex,"51.8763313293457, 0.9448699951171875", +186,,151,University of Cambridge,"52.20527648925781, 0.1172222197055817", +187,,151,London School of Economics,"51.51388931274414, -0.116666667163372", +188,,152,University of Bristol,"51.45639038085938, -2.60444450378418", +189,,152,London Business School,"51.52639007568359, -0.160833328962326", +190,,153,"Corpus Christi College, Oxford","51.75090789794922, -1.253702044487", +191,,154,Queen Mary University of London,"51.52299880981445, -0.03999999910593033", +192,,155,"Queens' College, Cambridge","52.20190048217773, 0.1146999970078468", +193,,156,University of Cambridge,"52.20527648925781, 0.1172222197055817", +194,,157,University of Leeds,"53.80722045898438, -1.551666617393494", +195,,158,University of Birmingham,"52.45055389404297, -1.930555582046509", +196,,159,Queen's University Belfast,"54.58416748046875, -5.934722423553467", +197,,160,University College London,"51.52472305297852, -0.1336111128330231", +198,,161,Liverpool John Moores University,"53.40299987792969, -2.970000028610229", +199,,162,University of Salford,"53.48444366455078, -2.271389007568359", +200,,163,University of Edinburgh,"55.9473876953125, -3.187194347381592", +201,,164,Newcastle University,"54.97800064086914, -1.615000009536743", +202,,165,University of Warwick,"52.38000106811523, -1.56166660785675", +203,,166,"City, University of London","51.52780151367188, -0.1023000031709671", +204,,166,Loughborough University,"52.76833343505859, -1.22861111164093", +205,,167,University of Exeter,"50.73611068725586, -3.535000085830688", +206,,168,University of Nottingham,"52.93899917602539, -1.197000026702881", +207,,169,University of Hull,"53.770263671875, -0.3671410083770752", +208,,170,University of the Arts London,"51.51777648925781, -0.1163888871669769", +209,,170,Loughborough University,"52.76833343505859, -1.22861111164093", +210,,171,University of Salford,"53.48444366455078, -2.271389007568359", +211,,172,Cardiff University,"51.48770141601562, -3.178999900817871", +212,,172,Swansea University,"51.60972213745117, -3.980555534362793", +213,,173,University of Edinburgh,"55.9473876953125, -3.187194347381592", +214,,174,Open University,"52.02500152587891, -0.7055555582046509", +215,,175,"Selwyn College, Cambridge","52.20119857788086, 0.1061000004410744", +216,,176,Aberystwyth University,"52.41806030273438, -4.065760135650635", +217,,177,University of Manchester,"53.46666717529297, -2.233333349227905", +218,,178,Wye College,"51.18399810791016, 0.9389299750328064", +219,,179,"Christ Church, Oxford","51.75019836425781, -1.255853056907654", +220,,179,King's College London,"51.51194381713867, -0.1161111146211624", +221,,180,"Magdalen College, Oxford","51.75237274169922, -1.247076988220215", +222,,181,Cardiff University,"51.48770141601562, -3.178999900817871", +223,,182,University of Nottingham,"52.93899917602539, -1.197000026702881", +224,,183,University of Leeds,"53.80722045898438, -1.551666617393494", +225,,184,"St Benet's Hall, Oxford","51.75795364379883, -1.260787010192871", +226,,185,"Fitzwilliam College, Cambridge","52.21446990966797, 0.1048899963498116", +227,,186,University College London,"51.52472305297852, -0.1336111128330231", +228,,187,University of Aberdeen,"57.16500091552734, -2.099999904632568", +229,,188,University of Leeds,"53.80722045898438, -1.551666617393494", +230,,188,Nottingham Trent University,"52.95640182495117, -1.151999950408936", +231,,189,University College London,"51.52472305297852, -0.1336111128330231", +232,,190,University of Leeds,"53.80722045898438, -1.551666617393494", +233,,190,University of Nottingham,"52.93899917602539, -1.197000026702881", +234,,191,"St Benet's Hall, Oxford","51.75795364379883, -1.260787010192871", +235,,192,"Balliol College, Oxford","51.75469970703125, -1.257799983024597", +236,,193,"Trinity College, Oxford","51.75534439086914, -1.2569580078125", +237,,194,University of Central Lancashire,"53.76300048828125, -2.70740008354187", +238,,195,London School of Economics,"51.51388931274414, -0.116666667163372", +239,,196,Royal Military Academy Sandhurst,"51.34027862548828, -0.7686111330986023", +240,,196,Aberystwyth University,"52.41806030273438, -4.065760135650635", +241,,196,King's College London,"51.51194381713867, -0.1161111146211624", +242,,197,University of Stirling,"56.14583206176758, -3.919444561004639", +243,,198,"King's College, Cambridge","52.20429992675781, 0.1162000000476837", +244,,199,University of Edinburgh,"55.9473876953125, -3.187194347381592", +245,,199,University of Oxford,"51.75500106811523, -1.254999995231628", +246,,200,Nottingham Trent University,"52.95640182495117, -1.151999950408936", +247,,201,"Jesus College, Oxford","51.75339889526367, -1.256899952888489", +248,,202,"Christ Church, Oxford","51.75019836425781, -1.255853056907654", +249,,203,University of York,"53.94659042358398, -1.052500009536743", +250,,204,University of Hull,"53.770263671875, -0.3671410083770752", +251,,204,University of Southampton,"50.93463134765625, -1.395949959754944", +252,,205,Utrecht University,"52.08527755737305, 5.175000190734863", +253,,206,"St Edmund Hall, Oxford","51.75299835205078, -1.25", +254,,207,University of Exeter,"50.73611068725586, -3.535000085830688", +255,,208,University of Birmingham,"52.45055389404297, -1.930555582046509", +256,,209,Selby High School,"53.78070068359375, -1.078699946403503", +257,,210,Swansea University,"51.60972213745117, -3.980555534362793", +258,,211,"Christ Church, Oxford","51.75019836425781, -1.255853056907654", +259,,212,Birmingham City University,"52.48222351074219, -1.888611078262329", +260,,212,University of Leeds,"53.80722045898438, -1.551666617393494", +261,,213,"Corpus Christi College, Cambridge","52.20309829711914, 0.1180000007152557", +262,,214,University of Edinburgh,"55.9473876953125, -3.187194347381592", +263,,215,London School of Economics,"51.51388931274414, -0.116666667163372", +264,,215,"Magdalene College, Cambridge","52.21049880981445, 0.1164999976754189", +265,,216,"Robinson College, Cambridge","52.20479965209961, 0.1046999990940094", +266,,217,University of Buckingham,"51.99583435058594, -0.991944432258606", +267,,218,University of Stirling,"56.14583206176758, -3.919444561004639", +268,,219,University of York,"53.94659042358398, -1.052500009536743", +269,,220,Desautels Faculty of Management,"45.50255966186523, -73.57643890380859", +270,,220,"Lady Margaret Hall, Oxford","51.76483154296875, -1.254035949707031", +271,,221,University of Sussex,"50.86527633666992, -0.0855555534362793", +272,,222,University College London,"51.52472305297852, -0.1336111128330231", +273,,222,Keele University,"53.00299835205078, -2.273000001907349", +274,,223,University of Manchester,"53.46666717529297, -2.233333349227905", +275,,224,Castlereagh College,"54.57799911499023, -5.894000053405762", +276,,225,University College London,"51.52472305297852, -0.1336111128330231", +277,,225,"Fitzwilliam College, Cambridge","52.21446990966797, 0.1048899963498116", +278,,225,"Keble College, Oxford","51.7588996887207, -1.257714986801147", +279,,226,University of Liverpool,"53.40599822998047, -2.967000007629395", +280,,227,University of York,"53.94659042358398, -1.052500009536743", +281,,228,University of North London,"51.55179977416992, -0.1106000021100044", +282,,229,"Hertford College, Oxford","51.75420379638672, -1.253466963768005", +283,,230,University of Exeter,"50.73611068725586, -3.535000085830688", +284,,231,University of Edinburgh,"55.9473876953125, -3.187194347381592", +285,,231,Cranfield University,"52.07333374023438, -0.6277777552604675", +286,,232,University College London,"51.52472305297852, -0.1336111128330231", +287,,232,"Merton College, Oxford","51.75099945068359, -1.251999974250793", +288,,233,University of Birmingham,"52.45055389404297, -1.930555582046509", +289,,234,University of Birmingham,"52.45055389404297, -1.930555582046509", +290,,235,University of Manchester,"53.46666717529297, -2.233333349227905", +291,,236,University of Hertfordshire,"51.75333404541016, -0.2438888847827911", +292,,236,London College of Communication,"51.49468231201172, -0.1018805578351021", +293,,237,University of Glasgow,"55.87194442749023, -4.287499904632568", +294,,238,University of Sheffield,"53.38069915771484, -1.488800048828125", +295,,239,Oxford Brookes University,"51.75426483154297, -1.222699999809265", +296,,240,Imperial College London,"51.49835586547852, -0.1768939942121506", +297,,241,London School of Economics,"51.51388931274414, -0.116666667163372", +298,,242,University of Bath,"51.37960052490234, -2.328000068664551", +299,,242,University of East Anglia,"52.62166595458984, 1.241666674613953", +300,,243,University of Edinburgh,"55.9473876953125, -3.187194347381592", +301,,244,University of East London,"51.50777816772461, 0.06361111253499985", +302,,245,University of Nottingham,"52.93899917602539, -1.197000026702881", +303,,246,University of Edinburgh,"55.9473876953125, -3.187194347381592", +304,,247,University of Liverpool,"53.40599822998047, -2.967000007629395", +305,,247,"Goldsmiths, University of London","51.47389984130859, -0.03539999946951866", +306,,247,London Guildhall University,"51.5177001953125, -0.08829999715089798", +307,,248,University of Bolton,"53.57361221313477, -2.435833215713501", +308,,249,University of Kent,"51.29700088500977, 1.069000005722046", +309,,250,Queen Mary University of London,"51.52299880981445, -0.03999999910593033", +310,,251,"Newnham College, Cambridge","52.19950103759766, 0.1076999977231026", +311,,252,London School of Economics,"51.51388931274414, -0.116666667163372", +312,,253,University of Bristol,"51.45639038085938, -2.60444450378418", +313,,253,King's College London,"51.51194381713867, -0.1161111146211624", +314,,254,"Brasenose College, Oxford","51.75320434570312, -1.254731059074402", +315,,255,Victoria University of Manchester,"53.46749877929688, -2.232500076293945", +316,,255,Liverpool John Moores University,"53.40299987792969, -2.970000028610229", +317,,256,University of Glasgow,"55.87194442749023, -4.287499904632568", +318,,257,London South Bank University,"51.49813842773438, -0.1015399992465973", +319,,258,University of Essex,"51.8763313293457, 0.9448699951171875", +320,,258,Glasgow School of Art,"55.86612319946289, -4.263733386993408", +321,,258,Glasgow Metropolitan College,"55.86259841918945, -4.248899936676025", +322,,259,"Lady Margaret Hall, Oxford","51.76483154296875, -1.254035949707031", +323,,260,University of Glasgow Medical School,"55.87200164794922, -4.288000106811523", +324,,261,Queen's University Belfast,"54.58416748046875, -5.934722423553467", +325,,262,University of Glasgow,"55.87194442749023, -4.287499904632568", +326,,263,Newcastle University,"54.97800064086914, -1.615000009536743", +327,,264,University of Sussex,"50.86527633666992, -0.0855555534362793", +328,,264,Loughborough University,"52.76833343505859, -1.22861111164093", +329,,265,King's College London,"51.51194381713867, -0.1161111146211624", +330,,266,Swansea University,"51.60972213745117, -3.980555534362793", +331,,267,University of Kent,"51.29700088500977, 1.069000005722046", +332,,268,University of Hull,"53.770263671875, -0.3671410083770752", +333,,269,Bangor University,"53.22890090942383, -4.130099773406982", +334,,269,"Somerville College, Oxford","51.7590446472168, -1.262272000312805", +335,,270,"Trinity Hall, Cambridge","52.2056999206543, 0.1156999990344048", +336,,271,"Pembroke College, Cambridge","52.20199966430664, 0.119999997317791", +337,,271,City Law School,"51.5272216796875, -0.1055555567145348", +338,,272,University of Sheffield,"53.38069915771484, -1.488800048828125", +339,,273,University of East Anglia,"52.62166595458984, 1.241666674613953", +340,,274,London School of Economics,"51.51388931274414, -0.116666667163372", +341,,275,Bedales School,"51.02027893066406, -0.9422222375869751", +342,,275,London School of Economics,"51.51388931274414, -0.116666667163372", +343,,276,University of Warwick,"52.38000106811523, -1.56166660785675", +344,,276,Aston University,"52.48600006103516, -1.889500021934509", +345,,277,"Magdalene College, Cambridge","52.21049880981445, 0.1164999976754189", +346,,278,University of Oxford,"51.75500106811523, -1.254999995231628", +347,,278,"Lincoln College, Oxford","51.75326156616211, -1.255905032157898", +348,,279,University College London,"51.52472305297852, -0.1336111128330231", +349,,280,Newcastle University,"54.97800064086914, -1.615000009536743", +350,,281,Open University,"52.02500152587891, -0.7055555582046509", diff --git a/json/wiki_extract_474_mp_names.json b/json/wiki_extract_474_mp_names.json new file mode 100644 index 0000000..b37c090 --- /dev/null +++ b/json/wiki_extract_474_mp_names.json @@ -0,0 +1 @@ +{"Q24052782": {"Name": "Carla Lockhart"}, "Q19875589": {"Name": "Carol Monaghan"}, "Q19870758": {"Name": "Caroline Ansell"}, "Q300107": {"Name": "Caroline Dinenage"}, "Q27979810": {"Name": "Caroline Johnson"}, "Q9670": {"Name": "Caroline Lucas"}, "Q577227": {"Name": "Caroline Nokes"}, "Q19958026": {"Name": "Carolyn Harris"}, "Q19930597": {"Name": "Cat Smith"}, "Q30173119": {"Name": "Preet Gill"}, "Q575733": {"Name": "Priti Patel"}, "Q306250": {"Name": "Robert Syms"}, "Q263076": {"Name": "Robin Walker"}, "Q391094": {"Name": "Roger Gale"}, "Q24668273": {"Name": "Rosena Allin-Khan"}, "Q290855": {"Name": "Rosie Cooper"}, "Q30164380": {"Name": "Rosie Duffield"}, "Q261773": {"Name": "Rosie Winterton"}, "Q20648372": {"Name": "Royston Smith"}, "Q76363937": {"Name": "Sam Tarry"}, "Q76449003": {"Name": "Saqib Bhatti"}, "Q76363563": {"Name": "Sara Britcliffe"}, "Q76363249": {"Name": "Sarah Atherton"}, "Q7422176": {"Name": "Sarah Champion"}, "Q76364344": {"Name": "Sarah Dines"}, "Q27942399": {"Name": "Sarah Olney"}, "Q75621688": {"Name": "Sarah Owen"}, "Q391169": {"Name": "Barry Gardiner"}, "Q477464": {"Name": "Barry Sheerman"}, "Q76364048": {"Name": "Bell Ribeiro-Addy"}, "Q264618": {"Name": "Ben Bradshaw"}, "Q76364469": {"Name": "Ben Everitt"}, "Q30172752": {"Name": "Ben Lake"}, "Q727852": {"Name": "Bernard Jenkin"}, "Q76363918": {"Name": "Beth Winter"}, "Q269449": {"Name": "Bill Cash"}, "Q303465": {"Name": "Bill Esterson"}, "Q265900": {"Name": "Bill Wiggin"}, "Q30174692": {"Name": "Bim Afolami"}, "Q263875": {"Name": "Bob Blackman"}, "Q577771": {"Name": "Bob Neill"}, "Q30234248": {"Name": "Bob Seely"}, "Q180589": {"Name": "Boris Johnson"}, "Q749687": {"Name": "Brandon Lewis"}, "Q63929253": {"Name": "Brendan Clarke-Smith"}, "Q575337": {"Name": "Bridget Phillipson"}, "Q75818967": {"Name": "Dave Doogan"}, "Q259646": {"Name": "David Amess"}, "Q303883": {"Name": "David Evennett"}, "Q534727": {"Name": "David Lammy"}, "Q333520": {"Name": "David Mundell"}, "Q479064": {"Name": "David Rutley"}, "Q76363601": {"Name": "David Simmonds"}, "Q296797": {"Name": "David Davies"}, "Q5240825": {"Name": "David Warburton"}, "Q5242429": {"Name": "Dawn Butler"}, "Q76450658": {"Name": "Dean Russell"}, "Q258088": {"Name": "Debbie Abrahams"}, "Q76364853": {"Name": "Dehenna Davison"}, "Q19871637": {"Name": "Deidre Brock"}, "Q272098": {"Name": "Derek Twigg"}, "Q327823": {"Name": "Desmond Swayne"}, "Q20127909": {"Name": "Holly Lynch"}, "Q76363388": {"Name": "Holly Mumby-Croft"}, "Q20195263": {"Name": "Huw Merriman"}, "Q14948811": {"Name": "John Nicolson"}, "Q575513": {"Name": "John Penrose"}, "Q333846": {"Name": "John Redwood"}, "Q389677": {"Name": "John Spellar"}, "Q264684": {"Name": "John Whittingdale"}, "Q291591": {"Name": "Jon Cruddas"}, "Q272234": {"Name": "Jon Trickett"}, "Q259895": {"Name": "Jonathan Ashworth"}, "Q300142": {"Name": "Jonathan Djanogly"}, "Q76363124": {"Name": "Jonathan Gullis"}, "Q695241": {"Name": "Jonathan Lord"}, "Q3183448": {"Name": "Jonathan Reynolds"}, "Q501926": {"Name": "Jonathan Reynolds"}, "Q63929106": {"Name": "Joy Morrissey"}, "Q19957188": {"Name": "Judith Cummins"}, "Q749612": {"Name": "Julian Lewis"}, "Q328608": {"Name": "Julian Sturdy"}, "Q303011": {"Name": "Julie Elliott"}, "Q76362964": {"Name": "Julie Marson"}, "Q78236114": {"Name": "list of MPs elected in the 2019 United Kingdom general election"}, "Q19883132": {"Name": "Patricia Gibson"}, "Q19883135": {"Name": "Patrick Grady"}, "Q263243": {"Name": "Paul Beresford"}, "Q264132": {"Name": "Paul Blomfield"}, "Q76364834": {"Name": "Paul Bristow"}, "Q7150909": {"Name": "Paul Girvan"}, "Q694929": {"Name": "Paul Maskey"}, "Q694881": {"Name": "Paul Maynard"}, "Q20647800": {"Name": "Paul Scully"}, "Q76363951": {"Name": "Paula Barker"}, "Q110863310": {"Name": "Paulette Hamilton"}, "Q750135": {"Name": "Pauline Latham"}, "Q580464": {"Name": "Penny Mordaunt"}, "Q261675": {"Name": "Pete Wishart"}, "Q258963": {"Name": "Peter Aldous"}, "Q264426": {"Name": "Peter Bone"}, "Q264477": {"Name": "Peter Bottomley"}, "Q19957586": {"Name": "Peter Dowd"}, "Q20113749": {"Name": "Peter Kyle"}, "Q271683": {"Name": "Rehman Chishti"}, "Q19871710": {"Name": "Richard Burgon"}, "Q302187": {"Name": "Richard Drax"}, "Q98626667": {"Name": "Richard Foord"}, "Q20055561": {"Name": "Rishi Sunak"}, "Q269853": {"Name": "Robert Buckland"}, "Q27671735": {"Name": "Robert Courts"}, "Q391644": {"Name": "Robert Goodwill"}, "Q392375": {"Name": "Robert Halfon"}, "Q17180679": {"Name": "Robert Jenrick"}, "Q76363319": {"Name": "Robert Largan"}, "Q266978": {"Name": "Valerie Vaz"}, "Q441532": {"Name": "Vicky Ford"}, "Q19957802": {"Name": "Vicky Foxcroft"}, "Q19938362": {"Name": "Victoria Atkins"}, "Q20054083": {"Name": "Victoria Prentis"}, "Q478387": {"Name": "Virendra Sharma"}, "Q76363411": {"Name": "Virginia Crosbie"}, "Q19957790": {"Name": "Colleen Fletcher"}, "Q5149523": {"Name": "Colum Eastwood"}, "Q269925": {"Name": "Conor Burns"}, "Q5162256": {"Name": "Conor McGinn"}, "Q5181182": {"Name": "Craig Mackinlay"}, "Q20195470": {"Name": "Craig Tracey"}, "Q264636": {"Name": "Craig Whittaker"}, "Q264305": {"Name": "Crispin Blunt"}, "Q478161": {"Name": "Matt Hancock"}, "Q30164903": {"Name": "Matt Rodda"}, "Q76362976": {"Name": "Matt Vickers"}, "Q20648556": {"Name": "Matt Warman"}, "Q30164376": {"Name": "Matt Western"}, "Q576537": {"Name": "Matthew Offord"}, "Q20203414": {"Name": "Matthew Pennycook"}, "Q676658": {"Name": "Meg Hillier"}, "Q328769": {"Name": "Mel Stride"}, "Q7380182": {"Name": "Rupa Huq"}, "Q259423": {"Name": "Rushanara Ali"}, "Q19871785": {"Name": "Ruth Cadbury"}, "Q76450717": {"Name": "Ruth Edwards"}, "Q727798": {"Name": "Sajid Javid"}, "Q76364330": {"Name": "Sally-Ann Hart"}, "Q266146": {"Name": "Chris Bryant"}, "Q24053857": {"Name": "Chris Elmore"}, "Q337453": {"Name": "Chris Grayling"}, "Q5106839": {"Name": "Chris Hazzard"}, "Q673322": {"Name": "Chris Heaton-Harris"}, "Q19875413": {"Name": "Chris Law"}, "Q76364033": {"Name": "Chris Loder"}, "Q16972528": {"Name": "Chris Philp"}, "Q575266": {"Name": "Christopher Pincher"}, "Q391526": {"Name": "Chris Skidmore"}, "Q19059345": {"Name": "Chris Stephens"}, "Q76363097": {"Name": "Christian Wakeford"}, "Q20648332": {"Name": "Christina Rees"}, "Q30164696": {"Name": "Christine Jardine"}, "Q271715": {"Name": "Christopher Chope"}, "Q76364263": {"Name": "Claire Coutinho"}, "Q20631177": {"Name": "Claire Hanna"}, "Q5129278": {"Name": "Claudia Webbe"}, "Q263508": {"Name": "Clive Betts"}, "Q302939": {"Name": "Clive Efford"}, "Q19938322": {"Name": "Edward Argar"}, "Q749980": {"Name": "Edward Leigh"}, "Q272318": {"Name": "Edward Timpson"}, "Q750188": {"Name": "Eleanor Laing"}, "Q30234240": {"Name": "Ellie Reeves"}, "Q76363641": {"Name": "Elliot Colburn"}, "Q272408": {"Name": "Emily Thornberry"}, "Q30234242": {"Name": "Emma Hardy"}, "Q16190712": {"Name": "Emma Lewell-Buck"}, "Q76364829": {"Name": "Gagan Mohindra"}, "Q5522788": {"Name": "Gareth Bacon"}, "Q727981": {"Name": "Gareth Johnson"}, "Q76363034": {"Name": "Gary Sambrook"}, "Q328791": {"Name": "Gary Streeter"}, "Q19883145": {"Name": "Gavin Newlands"}, "Q5528262": {"Name": "Gavin Robinson"}, "Q262409": {"Name": "Gavin Williamson"}, "Q285183": {"Name": "Geoffrey Clifton-Brown"}, "Q303510": {"Name": "George Eustice"}, "Q689546": {"Name": "George Howarth"}, "Q20647531": {"Name": "Gerald Jones"}, "Q5561727": {"Name": "Giles Watling"}, "Q24034408": {"Name": "Gill Furniss"}, "Q30232942": {"Name": "Gillian Keegan"}, "Q264662": {"Name": "Graham Brady"}, "Q328737": {"Name": "Graham Stringer"}, "Q580215": {"Name": "Grahame Morris"}, "Q478596": {"Name": "Grant Shapps"}, "Q76363500": {"Name": "Miriam Cates"}, "Q75838676": {"Name": "Munira Wilson"}, "Q259361": {"Name": "Nadhim Zahawi"}, "Q76363111": {"Name": "Nadia Whittome"}, "Q258586": {"Name": "Nadine Dorries"}, "Q75583507": {"Name": "Theo Clarke"}, "Q264766": {"Name": "Theresa May"}, "Q266793": {"Name": "Theresa Villiers"}, "Q19874642": {"Name": "Andrea Jenkyns"}, "Q750091": {"Name": "Andrea Leadsom"}, "Q265028": {"Name": "Andrew Bridgen"}, "Q76736652": {"Name": "Andrew Griffith"}, "Q392216": {"Name": "Andrew Gwynne"}, "Q16980037": {"Name": "Andrew Lewer"}, "Q333261": {"Name": "Andrew Mitchell"}, "Q578234": {"Name": "Andrew Murrison"}, "Q575493": {"Name": "Andrew Percy"}, "Q480092": {"Name": "Andrew Rosindell"}, "Q478714": {"Name": "Andrew Selous"}, "Q341570": {"Name": "Andrew Stephenson"}, "Q391341": {"Name": "Andy Slaughter"}, "Q19883053": {"Name": "Angela Crawley"}, "Q302763": {"Name": "Angela Eagle"}, "Q18164278": {"Name": "Angela Rayner"}, "Q76363854": {"Name": "Angela Richardson"}, "Q695092": {"Name": "Angus MacNeil"}, "Q54670211": {"Name": "Anna Firth"}, "Q30164279": {"Name": "Anna McMorrin"}, "Q20648244": {"Name": "Anne-Marie Trevelyan"}, "Q580321": {"Name": "Anne Marie Morris"}, "Q373047": {"Name": "Anne McLaughlin"}, "Q16529268": {"Name": "Anneliese Dodds"}, "Q76450714": {"Name": "Anthony Mangnall"}, "Q76363542": {"Name": "Antony Higginbotham"}, "Q106828783": {"Name": "Anum Qaisar-Javed"}, "Q76363973": {"Name": "Apsana Begum"}, "Q30165327": {"Name": "Lee Rowley"}, "Q30234245": {"Name": "Leo Docherty"}, "Q76363431": {"Name": "Lia Nici"}, "Q269697": {"Name": "Liam Byrne"}, "Q332374": {"Name": "Liam Fox"}, "Q392064": {"Name": "Lilian Greenwood"}, "Q689660": {"Name": "Lindsay Hoyle"}, "Q19871819": {"Name": "Lisa Cameron"}, "Q578037": {"Name": "Lisa Nandy"}, "Q750260": {"Name": "Liz Kendall"}, "Q19868633": {"Name": "Liz Saville Roberts"}, "Q272201": {"Name": "Liz Truss"}, "Q30165748": {"Name": "Liz Twist"}, "Q30165113": {"Name": "Lloyd Russell-Moyle"}, "Q76363567": {"Name": "Louie French"}, "Q19957992": {"Name": "Louise Haigh"}, "Q19957811": {"Name": "Lucy Frazer"}, "Q6698469": {"Name": "Lucy Powell"}, "Q30164902": {"Name": "Luke Pollard"}, "Q265870": {"Name": "Lyn Brown"}, "Q20647819": {"Name": "Maggie Throup"}, "Q75427885": {"Name": "Simon Baynes"}, "Q478345": {"Name": "Simon Hart"}, "Q19958093": {"Name": "Simon Hoare"}, "Q76449017": {"Name": "Simon Jupp"}, "Q112133647": {"Name": "Simon Lightwood"}, "Q694759": {"Name": "Siobhain McDonagh"}, "Q76363409": {"Name": "Siobhan Baillie"}, "Q291502": {"Name": "Stella Creasy"}, "Q291393": {"Name": "Stephen Crabb"}, "Q7609085": {"Name": "Stephen Doughty"}, "Q7609180": {"Name": "Stephen Farry"}, "Q332979": {"Name": "Stephen Hammond"}, "Q3377178": {"Name": "Stephen Kinnock"}, "Q584156": {"Name": "Stephen McPartland"}, "Q272346": {"Name": "Stephen Timms"}, "Q260546": {"Name": "Stephen Barclay"}, "Q265088": {"Name": "Steve Brine"}, "Q19957580": {"Name": "Steve Double"}, "Q694869": {"Name": "Steve McCabe"}, "Q75818978": {"Name": "Steven Bonnar"}, "Q689514": {"Name": "Stewart Hosie"}, "Q259707": {"Name": "Stuart Andrew"}, "Q19957769": {"Name": "Suella Braverman"}, "Q291057": {"Name": "Yvette Cooper"}, "Q390756": {"Name": "Yvonne Fovargue"}, "Q63929279": {"Name": "Zarah Sultana"}, "Q52587398": {"Name": "\u00d3rfhlaith Begley"}, "Q30164451": {"Name": "Stephanie Peacock"}, "Q30165325": {"Name": "Bambos Charalambous"}, "Q750293": {"Name": "Barbara Keeley"}, "Q3411409": {"Name": "Catherine McKinnell"}, "Q19871931": {"Name": "Catherine West"}, "Q290554": {"Name": "Th\u00e9r\u00e8se Coffey"}, "Q304251": {"Name": "Tim Farron"}, "Q695228": {"Name": "Tim Loughton"}, "Q303299": {"Name": "Tobias Ellwood"}, "Q575462": {"Name": "Toby Perkins"}, "Q16232474": {"Name": "Tom Pursglove"}, "Q20648385": {"Name": "Tom Tugendhat"}, "Q30165536": {"Name": "Tonia Antoniazzi"}, "Q695295": {"Name": "Tony Lloyd"}, "Q291557": {"Name": "Tracey Crouch"}, "Q7831699": {"Name": "Tracy Brabin"}, "Q28834855": {"Name": "Trudy Harrison"}, "Q7852071": {"Name": "Tulip Siddiq"}, "Q296716": {"Name": "Wayne David"}, "Q75838898": {"Name": "Wendy Chamberlain"}, "Q19917814": {"Name": "Wendy Morton"}, "Q30164280": {"Name": "Wera Hobhouse"}, "Q7983764": {"Name": "Wes Streeting"}, "Q16751766": {"Name": "Will Quince"}, "Q20732037": {"Name": "William Wragg"}, "Q76364163": {"Name": "Kate Kniveton"}, "Q76364044": {"Name": "Abena Oppong-Asare"}, "Q258473": {"Name": "Adam Afriyie"}, "Q689348": {"Name": "Adam Holloway"}, "Q264585": {"Name": "Alan Whitehead"}, "Q393751": {"Name": "Alec Shelbrooke"}, "Q30234239": {"Name": "Alex Burghart"}, "Q19956858": {"Name": "Alex Chalk"}, "Q291649": {"Name": "Alex Cunningham"}, "Q76364874": {"Name": "Alex Davies-Jones"}, "Q30234243": {"Name": "Alex Norris"}, "Q30164792": {"Name": "Alex Sobel"}, "Q76449027": {"Name": "Alexander Stafford"}, "Q76363294": {"Name": "Alicia Kearns"}, "Q694639": {"Name": "Alison McGovern"}, "Q19882771": {"Name": "Alison Thewliss"}, "Q269124": {"Name": "Alistair Carmichael"}, "Q30165682": {"Name": "Alister Jack"}, "Q75818980": {"Name": "Allan Dorans"}, "Q478531": {"Name": "Alok Sharma"}, "Q268030": {"Name": "Alun Cairns"}, "Q450298": {"Name": "Alyn Smith"}, "Q20648982": {"Name": "Amanda Milling"}, "Q20648487": {"Name": "Amanda Solloway"}, "Q75818988": {"Name": "Amy Callaghan"}, "Q75838761": {"Name": "Daisy Cooper"}, "Q290646": {"Name": "Damian Collins"}, "Q391960": {"Name": "Damian Green"}, "Q676947": {"Name": "Damian Hinds"}, "Q30163703": {"Name": "Damien Moore"}, "Q30226321": {"Name": "Dan Carden"}, "Q727587": {"Name": "Dan Jarvis"}, "Q575239": {"Name": "Dan Poulter"}, "Q692315": {"Name": "Daniel Kawczynski"}, "Q20128211": {"Name": "Daniel Zeichner"}, "Q16515053": {"Name": "Danny Kruger"}, "Q76362949": {"Name": "Darren Henry"}, "Q5307191": {"Name": "Drew Hendry"}, "Q76363201": {"Name": "Duncan Baker"}, "Q296689": {"Name": "Ed Davey"}, "Q216594": {"Name": "Ed Miliband"}, "Q584062": {"Name": "Esther McVey"}, "Q337812": {"Name": "Fabian Hamilton"}, "Q76362972": {"Name": "Felicity Buchan"}, "Q75621766": {"Name": "Feryal Clark"}, "Q19872756": {"Name": "Flick Drummond"}, "Q24061230": {"Name": "Florence Eshalomi"}, "Q5479812": {"Name": "Francie Molloy"}, "Q265935": {"Name": "Nick Brown"}, "Q56709363": {"Name": "Nickie Aiken"}, "Q76363721": {"Name": "Nicola Richards"}, "Q258292": {"Name": "Nigel Adams"}, "Q303814": {"Name": "Nigel Evans"}, "Q19883152": {"Name": "Owen Thompson"}, "Q478227": {"Name": "Greg Hands"}, "Q260429": {"Name": "Harriett Baldwin"}, "Q20747098": {"Name": "Helen Whately"}, "Q695257": {"Name": "Jack Lopresti"}, "Q6131460": {"Name": "James Cleverly"}, "Q302309": {"Name": "James Duddridge"}, "Q76363017": {"Name": "Jamie Wallis"}, "Q300292": {"Name": "Jeffrey Donaldson"}, "Q19882875": {"Name": "Thangam Debbonaire"}, "Q76364081": {"Name": "Charlotte Nichols"}, "Q76364111": {"Name": "Cherilyn Mackrory"}, "Q576208": {"Name": "Chi Onwurah"}, "Q291169": {"Name": "Jeremy Corbyn"}, "Q333533": {"Name": "Jeremy Hunt"}, "Q260489": {"Name": "Jeremy Wright"}, "Q76237363": {"Name": "Jerome Mayhew"}, "Q19872133": {"Name": "Jo Churchill"}, "Q76450664": {"Name": "Jo Gideon"}, "Q19882967": {"Name": "Joanna Cherry"}, "Q291615": {"Name": "John Cryer"}, "Q55615175": {"Name": "John Finucane"}, "Q20647673": {"Name": "Justin Madders"}, "Q264560": {"Name": "Karen Bradley"}, "Q266238": {"Name": "Karen Buck"}, "Q694811": {"Name": "Karl McCartney"}, "Q391986": {"Name": "Kate Green"}, "Q19874280": {"Name": "Kate Hollern"}, "Q20022488": {"Name": "Kate Osamor"}, "Q76362908": {"Name": "Katherine Fletcher"}, "Q6383803": {"Name": "Keir Starmer"}, "Q21592171": {"Name": "Kemi Badenoch"}, "Q983174": {"Name": "Kenny MacAskill"}, "Q19958100": {"Name": "Kevin Hollinrake"}, "Q76364848": {"Name": "Kieran Mullan"}, "Q107009776": {"Name": "Kim Leadbeater"}, "Q480148": {"Name": "Laurence Robertson"}, "Q30223601": {"Name": "Layla Moran"}, "Q63929121": {"Name": "Suzanne Webb"}, "Q76450672": {"Name": "Tahir Ali"}, "Q76364051": {"Name": "Taiwo Owatemi"}, "Q727933": {"Name": "Diana Johnson"}, "Q153454": {"Name": "Diane Abbott"}, "Q268584": {"Name": "Dominic Raab"}, "Q76363678": {"Name": "Marco Longhi"}, "Q19873418": {"Name": "Marcus Fysh"}, "Q232639": {"Name": "Margaret Beckett"}, "Q19883129": {"Name": "Margaret Ferrier"}, "Q19957949": {"Name": "Margaret Greenwood"}, "Q688913": {"Name": "Margaret Hodge"}, "Q19956815": {"Name": "Maria Caulfield"}, "Q302815": {"Name": "Maria Eagle"}, "Q20648527": {"Name": "Marie Rimmer"}, "Q19881816": {"Name": "Marion Fellows"}, "Q76362999": {"Name": "Mark Eastwood"}, "Q390869": {"Name": "Mark Francois"}, "Q391222": {"Name": "Mark Garnier"}, "Q478276": {"Name": "Mark Harper"}, "Q673628": {"Name": "Mark Hendrick"}, "Q76450655": {"Name": "Mark Jenkinson"}, "Q583750": {"Name": "Mark Menzies"}, "Q575693": {"Name": "Mark Pawsey"}, "Q272569": {"Name": "Mark Tami"}, "Q30163501": {"Name": "Marsha de Cordova"}, "Q19883117": {"Name": "Martin Docherty-Hughes"}, "Q266905": {"Name": "Martin Vickers"}, "Q391483": {"Name": "Mary Glindon"}, "Q300004": {"Name": "Philip Davies"}, "Q689287": {"Name": "Philip Hollobone"}, "Q19874405": {"Name": "Philippa Whitford"}, "Q266189": {"Name": "Hywel Williams"}, "Q302486": {"Name": "Iain Duncan Smith"}, "Q18921442": {"Name": "Ian Blackford"}, "Q750129": {"Name": "Ian Lavery"}, "Q76363211": {"Name": "Ian Levy"}, "Q748955": {"Name": "Ian Liddell-Grainger"}, "Q583906": {"Name": "Ian Mearns"}, "Q575881": {"Name": "Ian Paisley Jr"}, "Q76364147": {"Name": "Imran Ahmad Khan"}, "Q19874839": {"Name": "Kirsten Oswald"}, "Q19868554": {"Name": "Kirsty Blackman"}, "Q6417459": {"Name": "Kit Malthouse"}, "Q750204": {"Name": "Kwasi Kwarteng"}, "Q19863151": {"Name": "Mhairi Black"}, "Q304027": {"Name": "Michael Fabricant"}, "Q333937": {"Name": "Michael Gove"}, "Q20647896": {"Name": "Michael Tomlinson"}, "Q19872694": {"Name": "Michelle Donelan"}, "Q337970": {"Name": "Michelle Gildernew"}, "Q6838584": {"Name": "Mickey Brady"}, "Q30223596": {"Name": "Mike Amesbury"}, "Q391008": {"Name": "Mike Freer"}, "Q16190632": {"Name": "Mike Kane"}, "Q575593": {"Name": "Mike Penning"}, "Q19957306": {"Name": "Mims Davies"}, "Q42846975": {"Name": "Natalie Elphicke"}, "Q75720091": {"Name": "Navendu Mishra"}, "Q75818970": {"Name": "Neale Hanvey"}, "Q19957144": {"Name": "Neil Coyle"}, "Q19882694": {"Name": "Neil Gray"}, "Q392101": {"Name": "Nia Griffith"}, "Q19957590": {"Name": "Oliver Dowden"}, "Q478711": {"Name": "Oliver Heald"}, "Q76363044": {"Name": "Olivia Blake"}, "Q20127923": {"Name": "Rachael Maskell"}, "Q76448943": {"Name": "Rachel Hopkins"}, "Q574896": {"Name": "Rachel Reeves"}, "Q19870873": {"Name": "Ranil Jayawardena"}, "Q478305": {"Name": "Rebecca Harris"}, "Q19979355": {"Name": "Rebecca Long-Bailey"}, "Q20647855": {"Name": "Rebecca Pow"}, "Q694984": {"Name": "Seema Malhotra"}, "Q76362953": {"Name": "Selaine Saxby"}, "Q695007": {"Name": "Shabana Mahmood"}, "Q689041": {"Name": "Sharon Hodgson"}, "Q578272": {"Name": "Sheryll Murray"}, "Q267930": {"Name": "Yasmin Qureshi"}, "Q580847": {"Name": "Nigel Mills"}, "Q92816852": {"Name": "Ian Byrne"}} diff --git a/models/populate_database.py b/models/populate_database.py new file mode 100644 index 0000000..7b7a14a --- /dev/null +++ b/models/populate_database.py @@ -0,0 +1,139 @@ +import pandas as pd +import numpy as np + +import json +from pathlib import Path + +def add_mp(mp_id: str, dict_in: dict, df: pd.DataFrame): + """Add an entry to dataframe of mp.csv + """ + + if mp_id in df["ID"]: + return df + else: + # Create new row for mp + if "PhotoURL" in dict_in.keys(): + photo_url = dict_in["PhotoURL"] + else: + photo_url = None + + row = pd.DataFrame([{ + "ID": mp_id, + "Name": dict_in["Name"], + "PhotoURL": photo_url, + }]) + return pd.concat([df, row], ignore_index=True) + + +def add_subject(dict_in, df): + """Add an entry to dataframe of subject.csv + TODO + """ + return df + +def add_university(dict_in, df): + """Add an entry to dataframe of university.csv + """ + row = None + for uni in dict_in["Education"]: + if uni["UniName"] in df["UniName"]: + continue + else: + # Create new row for University + uni_id = np.max(df["ID"]) + 1 + new_row = pd.DataFrame([{ + "ID": uni_id, + "UniName": uni["UniName"], + "UniLocation": uni["UniLocation"], + # "WikiURL": uni["WikiURL"], + "WikiURL": None, + }]) + if row is None: + row = new_row + else: + row = pd.concat([row, new_row], ignore_index=True) + + if row is None: + return df + else: + return pd.concat([df, row], ignore_index=True) + + +def add_relationship(dict_in, df_mp, df_uni, df_rel, df_sub=None): + """Add an entry to dataframe of relationship.csv, + linking indexes of the different database csv files + + TODO: Add logic for subject once it is ready + """ + # Find MP name and university in DF + # print(df_mp["Name"]) + if dict_in["Name"] in list(df_mp["Name"]): + row = df_mp.loc[df_mp['Name'] == dict_in["Name"]] + row = row.reset_index() + mp_id = str(row["ID"][0]) + print(mp_id) + else: + raise ValueError(f"{dict_in['Name']} not in MP dataframe") + + uni_ids = [] + for uni in dict_in["Education"]: + if uni["UniName"] in list(df_uni["UniName"]): + # uni_ids.append(str(df_uni.loc[df_uni['UniName'] == uni["UniName"]]["ID"])) + row = df_uni.loc[df_uni['UniName'] == uni["UniName"]] + row = row.reset_index() + uni_id = str(row["ID"][0]) + uni_ids.append(uni_id) + + else: + raise ValueError(f"{uni['UniName']} not in df_uni") + + # Add rows for each uni / subject + rows = pd.DataFrame( + [{"MP": mp_id, + "University": uni_id, + "Subject": None} for uni_id in uni_ids] + ) + + # TODO: Add a check to make sure rows do not currently exist + return pd.concat([df_rel, rows], ignore_index=False) + + +def load_name_data(path: Path) -> pd.DataFrame: + """Load JSON data from SPARQL query + + Loads JSON data and returns a Pandas DataFrame with + Wikipedia/Wikidata ID as the index and MP name as column. + + Args: + path (Path): Path to JSON data + + Returns: + pd.DataFrame: Pandas DataFrame + """ + with open(path, 'r') as input_file: + mp_name_id = input_file.readline() + + return json.loads(mp_name_id) + + +def main(): + """Do something useful + """ + + mp_df = pd.read_csv("database/mp.csv") + uni_df = pd.read_csv("database/university.csv") + rel_df = pd.read_csv("database/relationship.csv") + + extracted_name_dict = load_name_data("json/mps.json") + + for mp_id, mp_dict in extracted_name_dict.items(): + mp_df = add_mp(str(mp_id), mp_dict, mp_df) + uni_df = add_university(mp_dict, uni_df) + rel_df = add_relationship(mp_dict, mp_df, uni_df, rel_df) + + mp_df.to_csv("database/mp.csv") + uni_df.to_csv("database/university.csv") + rel_df.to_csv("database/relationship.csv") + +if __name__ == "__main__": + main()