diff --git a/members/people.json b/members/people.json index a3047d42..23b26549 100644 --- a/members/people.json +++ b/members/people.json @@ -699566,6 +699566,10 @@ { "identifier": "Q333811", "scheme": "wikidata" + }, + { + "identifier": "2098", + "scheme": "scotparl_id" } ], "other_names": [ @@ -704988,6 +704992,10 @@ { "identifier": "Q480184", "scheme": "wikidata" + }, + { + "identifier": "16185", + "scheme": "scotparl_id" } ], "other_names": [ @@ -709579,6 +709587,10 @@ { "identifier": "1590", "scheme": "datadotparl_id" + }, + { + "identifier": "16202", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733646,6 +733658,10 @@ { "identifier": "Q559634", "scheme": "wikidata" + }, + { + "identifier": "2641", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733679,6 +733695,10 @@ { "identifier": "Q544729", "scheme": "wikidata" + }, + { + "identifier": "1783", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733711,6 +733731,10 @@ { "identifier": "Q744632", "scheme": "wikidata" + }, + { + "identifier": "2633", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733803,6 +733827,10 @@ { "identifier": "Q544089", "scheme": "wikidata" + }, + { + "identifier": "1866", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733883,6 +733911,10 @@ { "identifier": "Q1738042", "scheme": "wikidata" + }, + { + "identifier": "2103", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733980,6 +734012,10 @@ { "identifier": "Q1231522", "scheme": "wikidata" + }, + { + "identifier": "2678", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733996,6 +734032,10 @@ { "identifier": "Q524532", "scheme": "wikidata" + }, + { + "identifier": "3907", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734016,6 +734056,10 @@ { "identifier": "Q524077", "scheme": "wikidata" + }, + { + "identifier": "1735", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734148,6 +734192,10 @@ { "identifier": "Q887886", "scheme": "wikidata" + }, + { + "identifier": "3771", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734196,6 +734244,10 @@ { "identifier": "Q559022", "scheme": "wikidata" + }, + { + "identifier": "1994", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734367,6 +734419,10 @@ { "identifier": "Q1612012", "scheme": "wikidata" + }, + { + "identifier": "3901", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734419,6 +734475,10 @@ { "identifier": "Q1953630", "scheme": "wikidata" + }, + { + "identifier": "2394", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734467,6 +734527,10 @@ { "identifier": "Q944741", "scheme": "wikidata" + }, + { + "identifier": "2110", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734606,6 +734670,10 @@ { "identifier": "Q467108", "scheme": "wikidata" + }, + { + "identifier": "1756", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734622,6 +734690,10 @@ { "identifier": "Q769138", "scheme": "wikidata" + }, + { + "identifier": "1860", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734706,6 +734778,10 @@ { "identifier": "Q2057654", "scheme": "wikidata" + }, + { + "identifier": "2892", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734754,6 +734830,10 @@ { "identifier": "Q1681399", "scheme": "wikidata" + }, + { + "identifier": "3758", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734802,6 +734882,10 @@ { "identifier": "Q1418512", "scheme": "wikidata" + }, + { + "identifier": "1773", + "scheme": "scotparl_id" } ], "other_names": [ @@ -735006,6 +735090,10 @@ { "identifier": "Q862234", "scheme": "wikidata" + }, + { + "identifier": "3129", + "scheme": "scotparl_id" } ], "other_names": [ @@ -735098,6 +735186,10 @@ { "identifier": "Q1490268", "scheme": "wikidata" + }, + { + "identifier": "2180", + "scheme": "scotparl_id" } ], "other_names": [ @@ -735359,6 +735451,10 @@ { "identifier": "Q121780", "scheme": "wikidata" + }, + { + "identifier": "2133", + "scheme": "scotparl_id" } ], "other_names": [ @@ -735407,6 +735503,10 @@ { "identifier": "Q1691804", "scheme": "wikidata" + }, + { + "identifier": "3896", + "scheme": "scotparl_id" } ], "other_names": [ @@ -735593,6 +735693,10 @@ { "identifier": "Q1083222", "scheme": "wikidata" + }, + { + "identifier": "3759", + "scheme": "scotparl_id" } ], "other_names": [ @@ -735657,6 +735761,10 @@ { "identifier": "Q2357916", "scheme": "wikidata" + }, + { + "identifier": "3763", + "scheme": "scotparl_id" } ], "other_names": [ @@ -735689,6 +735797,10 @@ { "identifier": "Q2063795", "scheme": "wikidata" + }, + { + "identifier": "1857", + "scheme": "scotparl_id" } ], "other_names": [ @@ -736131,6 +736243,10 @@ { "identifier": "Q444675", "scheme": "wikidata" + }, + { + "identifier": "1870", + "scheme": "scotparl_id" } ], "other_names": [ @@ -736187,6 +736303,10 @@ { "identifier": "Q1900397", "scheme": "wikidata" + }, + { + "identifier": "2127", + "scheme": "scotparl_id" } ], "other_names": [ @@ -736320,6 +736440,10 @@ { "identifier": "Q644208", "scheme": "wikidata" + }, + { + "identifier": "4014", + "scheme": "scotparl_id" } ], "other_names": [ @@ -736388,6 +736512,10 @@ { "identifier": "Q2279359", "scheme": "wikidata" + }, + { + "identifier": "3750", + "scheme": "scotparl_id" } ], "other_names": [ @@ -736496,6 +736624,10 @@ { "identifier": "Q467112", "scheme": "wikidata" + }, + { + "identifier": "1848", + "scheme": "scotparl_id" } ], "other_names": [ @@ -926659,6 +926791,10 @@ { "identifier": "Q478812", "scheme": "wikidata" + }, + { + "identifier": "5586", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935399,6 +935535,10 @@ { "identifier": "Q1282862", "scheme": "wikidata" + }, + { + "identifier": "2615", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935415,6 +935555,10 @@ { "identifier": "Q540328", "scheme": "wikidata" + }, + { + "identifier": "4940", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935431,6 +935575,10 @@ { "identifier": "Q1108343", "scheme": "wikidata" + }, + { + "identifier": "3751", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935463,6 +935611,10 @@ { "identifier": "Q1557330", "scheme": "wikidata" + }, + { + "identifier": "5060", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935543,6 +935695,10 @@ { "identifier": "Q1349075", "scheme": "wikidata" + }, + { + "identifier": "5107", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935559,6 +935715,10 @@ { "identifier": "Q509808", "scheme": "wikidata" + }, + { + "identifier": "2826", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935607,6 +935767,10 @@ { "identifier": "Q564093", "scheme": "wikidata" + }, + { + "identifier": "1742", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935671,6 +935835,10 @@ { "identifier": "Q1900077", "scheme": "wikidata" + }, + { + "identifier": "5042", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935711,6 +935879,10 @@ { "identifier": "Q2647232", "scheme": "wikidata" + }, + { + "identifier": "4934", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935779,6 +935951,10 @@ { "identifier": "Q1538053", "scheme": "wikidata" + }, + { + "identifier": "5074", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935867,6 +936043,10 @@ { "identifier": "Q1700987", "scheme": "wikidata" + }, + { + "identifier": "5110", + "scheme": "scotparl_id" } ], "other_names": [ @@ -936031,6 +936211,10 @@ { "identifier": "Q2581473", "scheme": "wikidata" + }, + { + "identifier": "5009", + "scheme": "scotparl_id" } ], "other_names": [ @@ -936079,6 +936263,10 @@ { "identifier": "Q1740263", "scheme": "wikidata" + }, + { + "identifier": "5106", + "scheme": "scotparl_id" } ], "other_names": [ @@ -936095,6 +936283,10 @@ { "identifier": "Q1176878", "scheme": "wikidata" + }, + { + "identifier": "5075", + "scheme": "scotparl_id" } ], "other_names": [ @@ -936159,6 +936351,10 @@ { "identifier": "Q174924", "scheme": "wikidata" + }, + { + "identifier": "4941", + "scheme": "scotparl_id" } ], "other_names": [ @@ -938406,6 +938602,10 @@ { "identifier": "Q16191157", "scheme": "wikidata" + }, + { + "identifier": "5119", + "scheme": "scotparl_id" } ], "other_names": [ @@ -940414,6 +940614,10 @@ { "identifier": "Q19882694", "scheme": "wikidata" + }, + { + "identifier": "16180", + "scheme": "scotparl_id" } ], "other_names": [ @@ -942322,6 +942526,10 @@ { "identifier": "Q20027903", "scheme": "wikidata" + }, + { + "identifier": "16178", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946476,6 +946684,10 @@ { "identifier": "Q24039804", "scheme": "wikidata" + }, + { + "identifier": "5868", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946496,6 +946708,10 @@ { "identifier": "Q24052677", "scheme": "wikidata" + }, + { + "identifier": "5877", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946520,6 +946736,10 @@ { "identifier": "Q24052672", "scheme": "wikidata" + }, + { + "identifier": "4987", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946540,6 +946760,10 @@ { "identifier": "Q24034422", "scheme": "wikidata" + }, + { + "identifier": "5665", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946580,6 +946804,10 @@ { "identifier": "Q24034357", "scheme": "wikidata" + }, + { + "identifier": "5782", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946624,6 +946852,10 @@ { "identifier": "Q24045406", "scheme": "wikidata" + }, + { + "identifier": "5815", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946664,6 +946896,10 @@ { "identifier": "Q24052667", "scheme": "wikidata" + }, + { + "identifier": "5605", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946684,6 +946920,10 @@ { "identifier": "Q24014894", "scheme": "wikidata" + }, + { + "identifier": "5587", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946711,6 +946951,10 @@ { "identifier": "Q24039479", "scheme": "wikidata" + }, + { + "identifier": "5621", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946751,6 +946995,10 @@ { "identifier": "Q24026044", "scheme": "wikidata" + }, + { + "identifier": "5613", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946771,6 +947019,10 @@ { "identifier": "Q24039803", "scheme": "wikidata" + }, + { + "identifier": "3983", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946791,6 +947043,10 @@ { "identifier": "Q24039791", "scheme": "wikidata" + }, + { + "identifier": "5698", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946811,6 +947067,10 @@ { "identifier": "Q24034374", "scheme": "wikidata" + }, + { + "identifier": "5757", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946831,6 +947091,10 @@ { "identifier": "Q24034267", "scheme": "wikidata" + }, + { + "identifier": "5769", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946851,6 +947115,10 @@ { "identifier": "Q24034416", "scheme": "wikidata" + }, + { + "identifier": "5771", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946891,6 +947159,10 @@ { "identifier": "Q24025938", "scheme": "wikidata" + }, + { + "identifier": "5618", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946911,6 +947183,10 @@ { "identifier": "Q24052669", "scheme": "wikidata" + }, + { + "identifier": "5604", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946931,6 +947207,10 @@ { "identifier": "Q24052676", "scheme": "wikidata" + }, + { + "identifier": "5651", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946951,6 +947231,10 @@ { "identifier": "Q24039899", "scheme": "wikidata" + }, + { + "identifier": "5580", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946971,6 +947255,10 @@ { "identifier": "Q24039896", "scheme": "wikidata" + }, + { + "identifier": "5579", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947035,6 +947323,10 @@ { "identifier": "Q24052668", "scheme": "wikidata" + }, + { + "identifier": "5596", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947055,6 +947347,10 @@ { "identifier": "Q24039795", "scheme": "wikidata" + }, + { + "identifier": "5622", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947075,6 +947371,10 @@ { "identifier": "Q24052665", "scheme": "wikidata" + }, + { + "identifier": "5608", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947095,6 +947395,10 @@ { "identifier": "Q24034376", "scheme": "wikidata" + }, + { + "identifier": "5598", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947115,6 +947419,10 @@ { "identifier": "Q24014282", "scheme": "wikidata" + }, + { + "identifier": "5578", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947139,6 +947447,10 @@ { "identifier": "Q24052670", "scheme": "wikidata" + }, + { + "identifier": "5612", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947163,6 +947475,10 @@ { "identifier": "Q24039768", "scheme": "wikidata" + }, + { + "identifier": "4982", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947183,6 +947499,10 @@ { "identifier": "Q24034308", "scheme": "wikidata" + }, + { + "identifier": "5709", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947215,6 +947535,10 @@ { "identifier": "Q24039769", "scheme": "wikidata" + }, + { + "identifier": "4981", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947264,6 +947588,10 @@ { "identifier": "Q24039900", "scheme": "wikidata" + }, + { + "identifier": "3994", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947284,6 +947612,10 @@ { "identifier": "Q24036539", "scheme": "wikidata" + }, + { + "identifier": "5638", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947308,6 +947640,10 @@ { "identifier": "Q24052680", "scheme": "wikidata" + }, + { + "identifier": "5866", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947360,6 +947696,10 @@ { "identifier": "Q24034387", "scheme": "wikidata" + }, + { + "identifier": "5669", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947400,6 +947740,10 @@ { "identifier": "Q24052671", "scheme": "wikidata" + }, + { + "identifier": "5788", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947420,6 +947764,10 @@ { "identifier": "Q514743", "scheme": "wikidata" + }, + { + "identifier": "5793", + "scheme": "scotparl_id" } ], "other_names": [ @@ -949663,6 +950011,10 @@ { "identifier": "Q30163629", "scheme": "wikidata" + }, + { + "identifier": "16198", + "scheme": "scotparl_id" } ], "other_names": [ @@ -949987,6 +950339,10 @@ { "identifier": "Q30167357", "scheme": "wikidata" + }, + { + "identifier": "16213", + "scheme": "scotparl_id" } ], "other_names": [ @@ -951294,6 +951650,10 @@ { "identifier": "Q30164795", "scheme": "wikidata" + }, + { + "identifier": "16193", + "scheme": "scotparl_id" } ], "other_names": [ @@ -951707,6 +952067,10 @@ { "identifier": "Q30260625", "scheme": "wikidata" + }, + { + "identifier": "5800", + "scheme": "scotparl_id" } ], "other_names": [ @@ -952988,6 +953352,12 @@ }, { "id": "uk.org.publicwhip/person/25775", + "identifiers": [ + { + "identifier": "15631", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Wishart", @@ -958369,6 +958739,12 @@ }, { "id": "uk.org.publicwhip/person/25985", + "identifiers": [ + { + "identifier": "16177", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Adam", @@ -958383,6 +958759,12 @@ }, { "id": "uk.org.publicwhip/person/25986", + "identifiers": [ + { + "identifier": "16183", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Brown", @@ -958397,6 +958779,12 @@ }, { "id": "uk.org.publicwhip/person/25987", + "identifiers": [ + { + "identifier": "16196", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Burgess", @@ -958411,6 +958799,12 @@ }, { "id": "uk.org.publicwhip/person/25988", + "identifiers": [ + { + "identifier": "16188", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Callaghan", @@ -958425,6 +958819,12 @@ }, { "id": "uk.org.publicwhip/person/25989", + "identifiers": [ + { + "identifier": "16207", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Chapman", @@ -958439,6 +958839,12 @@ }, { "id": "uk.org.publicwhip/person/25990", + "identifiers": [ + { + "identifier": "16216", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Choudhury", @@ -958453,6 +958859,12 @@ }, { "id": "uk.org.publicwhip/person/25991", + "identifiers": [ + { + "identifier": "16181", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Don", @@ -958467,6 +958879,12 @@ }, { "id": "uk.org.publicwhip/person/25992", + "identifiers": [ + { + "identifier": "16212", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Dowey", @@ -958481,6 +958899,12 @@ }, { "id": "uk.org.publicwhip/person/25993", + "identifiers": [ + { + "identifier": "16175", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Dunbar", @@ -958495,6 +958919,12 @@ }, { "id": "uk.org.publicwhip/person/25994", + "identifiers": [ + { + "identifier": "16199", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Duncan-Glancy", @@ -958509,6 +958939,12 @@ }, { "id": "uk.org.publicwhip/person/25995", + "identifiers": [ + { + "identifier": "16187", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Fairlie", @@ -958523,6 +958959,12 @@ }, { "id": "uk.org.publicwhip/person/25996", + "identifiers": [ + { + "identifier": "16201", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Findlay", @@ -958537,6 +958979,12 @@ }, { "id": "uk.org.publicwhip/person/25997", + "identifiers": [ + { + "identifier": "16194", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Gallacher", @@ -958551,6 +958999,12 @@ }, { "id": "uk.org.publicwhip/person/25998", + "identifiers": [ + { + "identifier": "16204", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Gosal", @@ -958565,6 +959019,12 @@ }, { "id": "uk.org.publicwhip/person/25999", + "identifiers": [ + { + "identifier": "16200", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Gulhane", @@ -958579,6 +959039,12 @@ }, { "id": "uk.org.publicwhip/person/26000", + "identifiers": [ + { + "identifier": "16210", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Hoy", @@ -958593,6 +959059,12 @@ }, { "id": "uk.org.publicwhip/person/26001", + "identifiers": [ + { + "identifier": "16206", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Lumsden", @@ -958607,6 +959079,12 @@ }, { "id": "uk.org.publicwhip/person/26002", + "identifiers": [ + { + "identifier": "16195", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Mackay", @@ -958621,6 +959099,12 @@ }, { "id": "uk.org.publicwhip/person/26003", + "identifiers": [ + { + "identifier": "16205", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Marra", @@ -958635,6 +959119,12 @@ }, { "id": "uk.org.publicwhip/person/26004", + "identifiers": [ + { + "identifier": "16190", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "McAllan", @@ -958649,6 +959139,12 @@ }, { "id": "uk.org.publicwhip/person/26005", + "identifiers": [ + { + "identifier": "16179", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "McLennan", @@ -958663,6 +959159,12 @@ }, { "id": "uk.org.publicwhip/person/26006", + "identifiers": [ + { + "identifier": "16176", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "McNair", @@ -958677,6 +959179,12 @@ }, { "id": "uk.org.publicwhip/person/26007", + "identifiers": [ + { + "identifier": "16184", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Minto", @@ -958691,6 +959199,12 @@ }, { "id": "uk.org.publicwhip/person/26008", + "identifiers": [ + { + "identifier": "16211", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Mochan", @@ -958705,6 +959219,12 @@ }, { "id": "uk.org.publicwhip/person/26009", + "identifiers": [ + { + "identifier": "16186", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Nicoll", @@ -958719,6 +959239,12 @@ }, { "id": "uk.org.publicwhip/person/26010", + "identifiers": [ + { + "identifier": "16203", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "O'Kane", @@ -958733,6 +959259,12 @@ }, { "id": "uk.org.publicwhip/person/26011", + "identifiers": [ + { + "identifier": "16197", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Roddick", @@ -958747,6 +959279,12 @@ }, { "id": "uk.org.publicwhip/person/26012", + "identifiers": [ + { + "identifier": "16215", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Slater", @@ -958761,6 +959299,12 @@ }, { "id": "uk.org.publicwhip/person/26013", + "identifiers": [ + { + "identifier": "16191", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Stevenson", @@ -958775,6 +959319,12 @@ }, { "id": "uk.org.publicwhip/person/26014", + "identifiers": [ + { + "identifier": "16192", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Stewart", @@ -958789,6 +959339,12 @@ }, { "id": "uk.org.publicwhip/person/26015", + "identifiers": [ + { + "identifier": "16182", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Tweed", @@ -958803,6 +959359,12 @@ }, { "id": "uk.org.publicwhip/person/26016", + "identifiers": [ + { + "identifier": "16209", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Villalba", @@ -958817,6 +959379,12 @@ }, { "id": "uk.org.publicwhip/person/26017", + "identifiers": [ + { + "identifier": "16214", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Webber", @@ -958831,6 +959399,12 @@ }, { "id": "uk.org.publicwhip/person/26018", + "identifiers": [ + { + "identifier": "16208", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "White", @@ -958845,6 +959419,12 @@ }, { "id": "uk.org.publicwhip/person/26019", + "identifiers": [ + { + "identifier": "16189", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Whitham", @@ -960212,6 +960792,12 @@ }, { "id": "uk.org.publicwhip/person/26091", + "identifiers": [ + { + "identifier": "16970", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "McCall", @@ -964208,6 +964794,12 @@ }, { "id": "uk.org.publicwhip/person/26290", + "identifiers": [ + { + "identifier": "17689", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Eagle", diff --git a/scripts/add_scottish_ids.py b/scripts/add_scottish_ids.py new file mode 100755 index 00000000..da67ba83 --- /dev/null +++ b/scripts/add_scottish_ids.py @@ -0,0 +1,120 @@ +""" +One-off script to add Scottish Parliament IDs +based on the current date. + +uv run scripts/add_scottish_ids.py +""" + +# /// script +# requires-python = ">=3.9,<3.10" +# dependencies = [ +# "httpx", +# "mysoc-validator==0.8", +# ] +# /// + +import datetime +from pathlib import Path +from typing import Optional + +import httpx +import rich +from mysoc_validator import Popolo +from mysoc_validator.models.popolo import Chamber, IdentifierScheme +from mysoc_validator.models.popolo import ( + Person as PopoloPerson, +) +from pydantic import AliasGenerator, BaseModel, ConfigDict, TypeAdapter +from pydantic.alias_generators import to_pascal as base_pascal + +dataset_url = "https://data.parliament.scot/api/members" + + +def to_pascal(name: str) -> str: + first_round = base_pascal(name) + return first_round.replace("Id", "ID") + + +convert_config = ConfigDict(alias_generator=AliasGenerator(validation_alias=to_pascal)) + + +class Person(BaseModel): + model_config = convert_config + person_id: int + photo_url: Optional[str] = None + notes: str + birth_date: Optional[datetime.date] = None + birth_date_is_protected: bool + parliamentary_name: str + preferred_name: str + gender_type_id: int + is_current: bool + + +def get_scotapi_data(): + data = httpx.get(dataset_url).json() + entries = TypeAdapter(list[Person]).validate_python(data) + + pop = Popolo.from_path(Path("members", "people.json")) + + def get_reversed_result(name: str, date: datetime.datetime) -> PopoloPerson: + manual_fixes = {"Natalie Don-Innes": "Natalie Don", "Ash Regan": "Ash Denham"} + + # take a last name, first name, convert to first name last name and return the person object + last, first = [x.strip() for x in name.split(",")] + correct_name = f"{first} {last}".strip() + + if correct_name.startswith("Dr "): + correct_name = correct_name[3:] + + alt_name = None + if correct_name in manual_fixes: + alt_name = manual_fixes[correct_name] + + for name in [correct_name, alt_name]: + if name: + result = pop.persons.from_name( + name, chamber_id=Chamber.SCOTLAND, date=date.date() + ) + if result: + break + if result is None: + raise ValueError(f"Could not find {correct_name} or {alt_name} on {date}") + return result + + unmatched = [] + + current_entries = [e for e in entries if e.is_current] + date = datetime.datetime.now() + + map = {} + + for e in current_entries: + try: + person = get_reversed_result(e.parliamentary_name, date) + map[person.id] = e.person_id + except ValueError: + unmatched.append(e.parliamentary_name) + + unmatched = list(set(unmatched)) + unmatched.sort() + + if unmatched: + raise ValueError(f"Unmatched names: {unmatched}") + + added_count = 0 + for person_id, scot_id in map.items(): + person = pop.persons[person_id] + + if person.add_identifer( + scheme=IdentifierScheme.SCOTPARL, identifier=str(scot_id), if_missing=True + ): + added_count += 1 + + rich.print(f"Added [green]{added_count}[/green] Scottish Parliament IDs") + + pop.to_path(Path("members", "people.json")) + + +if __name__ == "__main__": + get_scotapi_data()