diff --git a/members/people.json b/members/people.json index 5187f52f..8c259908 100644 --- a/members/people.json +++ b/members/people.json @@ -698856,6 +698856,10 @@ { "identifier": "Q333811", "scheme": "wikidata" + }, + { + "identifier": "2098", + "scheme": "scotparl_id" } ], "other_names": [ @@ -703946,6 +703950,10 @@ { "identifier": "Q480184", "scheme": "wikidata" + }, + { + "identifier": "16185", + "scheme": "scotparl_id" } ], "other_names": [ @@ -708057,6 +708065,10 @@ { "identifier": "1590", "scheme": "datadotparl_id" + }, + { + "identifier": "16202", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732048,6 +732060,10 @@ { "identifier": "Q559634", "scheme": "wikidata" + }, + { + "identifier": "2641", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732081,6 +732097,10 @@ { "identifier": "Q544729", "scheme": "wikidata" + }, + { + "identifier": "1783", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732113,6 +732133,10 @@ { "identifier": "Q744632", "scheme": "wikidata" + }, + { + "identifier": "2633", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732205,6 +732229,10 @@ { "identifier": "Q544089", "scheme": "wikidata" + }, + { + "identifier": "1866", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732285,6 +732313,10 @@ { "identifier": "Q1738042", "scheme": "wikidata" + }, + { + "identifier": "2103", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732382,6 +732414,10 @@ { "identifier": "Q1231522", "scheme": "wikidata" + }, + { + "identifier": "2678", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732398,6 +732434,10 @@ { "identifier": "Q524532", "scheme": "wikidata" + }, + { + "identifier": "3907", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732414,6 +732454,10 @@ { "identifier": "Q524077", "scheme": "wikidata" + }, + { + "identifier": "1735", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732546,6 +732590,10 @@ { "identifier": "Q887886", "scheme": "wikidata" + }, + { + "identifier": "3771", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732594,6 +732642,10 @@ { "identifier": "Q559022", "scheme": "wikidata" + }, + { + "identifier": "1994", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732765,6 +732817,10 @@ { "identifier": "Q1612012", "scheme": "wikidata" + }, + { + "identifier": "3901", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732817,6 +732873,10 @@ { "identifier": "Q1953630", "scheme": "wikidata" + }, + { + "identifier": "2394", + "scheme": "scotparl_id" } ], "other_names": [ @@ -732865,6 +732925,10 @@ { "identifier": "Q944741", "scheme": "wikidata" + }, + { + "identifier": "2110", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733004,6 +733068,10 @@ { "identifier": "Q467108", "scheme": "wikidata" + }, + { + "identifier": "1756", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733020,6 +733088,10 @@ { "identifier": "Q769138", "scheme": "wikidata" + }, + { + "identifier": "1860", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733104,6 +733176,10 @@ { "identifier": "Q2057654", "scheme": "wikidata" + }, + { + "identifier": "2892", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733152,6 +733228,10 @@ { "identifier": "Q1681399", "scheme": "wikidata" + }, + { + "identifier": "3758", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733200,6 +733280,10 @@ { "identifier": "Q1418512", "scheme": "wikidata" + }, + { + "identifier": "1773", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733404,6 +733488,10 @@ { "identifier": "Q862234", "scheme": "wikidata" + }, + { + "identifier": "3129", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733496,6 +733584,10 @@ { "identifier": "Q1490268", "scheme": "wikidata" + }, + { + "identifier": "2180", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733757,6 +733849,10 @@ { "identifier": "Q121780", "scheme": "wikidata" + }, + { + "identifier": "2133", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733805,6 +733901,10 @@ { "identifier": "Q1691804", "scheme": "wikidata" + }, + { + "identifier": "3896", + "scheme": "scotparl_id" } ], "other_names": [ @@ -733991,6 +734091,10 @@ { "identifier": "Q1083222", "scheme": "wikidata" + }, + { + "identifier": "3759", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734055,6 +734159,10 @@ { "identifier": "Q2357916", "scheme": "wikidata" + }, + { + "identifier": "3763", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734087,6 +734195,10 @@ { "identifier": "Q2063795", "scheme": "wikidata" + }, + { + "identifier": "1857", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734525,6 +734637,10 @@ { "identifier": "Q444675", "scheme": "wikidata" + }, + { + "identifier": "1870", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734577,6 +734693,10 @@ { "identifier": "Q1900397", "scheme": "wikidata" + }, + { + "identifier": "2127", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734706,6 +734826,10 @@ { "identifier": "Q644208", "scheme": "wikidata" + }, + { + "identifier": "4014", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734774,6 +734898,10 @@ { "identifier": "Q2279359", "scheme": "wikidata" + }, + { + "identifier": "3750", + "scheme": "scotparl_id" } ], "other_names": [ @@ -734878,6 +735006,10 @@ { "identifier": "Q467112", "scheme": "wikidata" + }, + { + "identifier": "1848", + "scheme": "scotparl_id" } ], "other_names": [ @@ -924925,6 +925057,10 @@ { "identifier": "Q478812", "scheme": "wikidata" + }, + { + "identifier": "5586", + "scheme": "scotparl_id" } ], "other_names": [ @@ -932869,6 +933005,10 @@ { "identifier": "Q1282862", "scheme": "wikidata" + }, + { + "identifier": "2615", + "scheme": "scotparl_id" } ], "other_names": [ @@ -932885,6 +933025,10 @@ { "identifier": "Q540328", "scheme": "wikidata" + }, + { + "identifier": "4940", + "scheme": "scotparl_id" } ], "other_names": [ @@ -932901,6 +933045,10 @@ { "identifier": "Q1108343", "scheme": "wikidata" + }, + { + "identifier": "3751", + "scheme": "scotparl_id" } ], "other_names": [ @@ -932933,6 +933081,10 @@ { "identifier": "Q1557330", "scheme": "wikidata" + }, + { + "identifier": "5060", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933013,6 +933165,10 @@ { "identifier": "Q1349075", "scheme": "wikidata" + }, + { + "identifier": "5107", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933029,6 +933185,10 @@ { "identifier": "Q509808", "scheme": "wikidata" + }, + { + "identifier": "2826", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933077,6 +933237,10 @@ { "identifier": "Q564093", "scheme": "wikidata" + }, + { + "identifier": "1742", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933141,6 +933305,10 @@ { "identifier": "Q1900077", "scheme": "wikidata" + }, + { + "identifier": "5042", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933177,6 +933345,10 @@ { "identifier": "Q2647232", "scheme": "wikidata" + }, + { + "identifier": "4934", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933241,6 +933413,10 @@ { "identifier": "Q1538053", "scheme": "wikidata" + }, + { + "identifier": "5074", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933329,6 +933505,10 @@ { "identifier": "Q1700987", "scheme": "wikidata" + }, + { + "identifier": "5110", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933489,6 +933669,10 @@ { "identifier": "Q2581473", "scheme": "wikidata" + }, + { + "identifier": "5009", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933537,6 +933721,10 @@ { "identifier": "Q1740263", "scheme": "wikidata" + }, + { + "identifier": "5106", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933553,6 +933741,10 @@ { "identifier": "Q1176878", "scheme": "wikidata" + }, + { + "identifier": "5075", + "scheme": "scotparl_id" } ], "other_names": [ @@ -933617,6 +933809,10 @@ { "identifier": "Q174924", "scheme": "wikidata" + }, + { + "identifier": "4941", + "scheme": "scotparl_id" } ], "other_names": [ @@ -935820,6 +936016,10 @@ { "identifier": "Q16191157", "scheme": "wikidata" + }, + { + "identifier": "5119", + "scheme": "scotparl_id" } ], "other_names": [ @@ -937716,6 +937916,10 @@ { "identifier": "Q19882694", "scheme": "wikidata" + }, + { + "identifier": "16180", + "scheme": "scotparl_id" } ], "other_names": [ @@ -939388,6 +939592,10 @@ { "identifier": "Q20027903", "scheme": "wikidata" + }, + { + "identifier": "16178", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943178,6 +943386,10 @@ { "identifier": "Q24039804", "scheme": "wikidata" + }, + { + "identifier": "5868", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943194,6 +943406,10 @@ { "identifier": "Q24052677", "scheme": "wikidata" + }, + { + "identifier": "5877", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943214,6 +943430,10 @@ { "identifier": "Q24052672", "scheme": "wikidata" + }, + { + "identifier": "4987", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943230,6 +943450,10 @@ { "identifier": "Q24034422", "scheme": "wikidata" + }, + { + "identifier": "5665", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943262,6 +943486,10 @@ { "identifier": "Q24034357", "scheme": "wikidata" + }, + { + "identifier": "5782", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943298,6 +943526,10 @@ { "identifier": "Q24045406", "scheme": "wikidata" + }, + { + "identifier": "5815", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943330,6 +943562,10 @@ { "identifier": "Q24052667", "scheme": "wikidata" + }, + { + "identifier": "5605", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943346,6 +943582,10 @@ { "identifier": "Q24014894", "scheme": "wikidata" + }, + { + "identifier": "5587", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943369,6 +943609,10 @@ { "identifier": "Q24039479", "scheme": "wikidata" + }, + { + "identifier": "5621", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943401,6 +943645,10 @@ { "identifier": "Q24026044", "scheme": "wikidata" + }, + { + "identifier": "5613", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943417,6 +943665,10 @@ { "identifier": "Q24039803", "scheme": "wikidata" + }, + { + "identifier": "3983", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943433,6 +943685,10 @@ { "identifier": "Q24039791", "scheme": "wikidata" + }, + { + "identifier": "5698", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943449,6 +943705,10 @@ { "identifier": "Q24034374", "scheme": "wikidata" + }, + { + "identifier": "5757", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943465,6 +943725,10 @@ { "identifier": "Q24034267", "scheme": "wikidata" + }, + { + "identifier": "5769", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943481,6 +943745,10 @@ { "identifier": "Q24034416", "scheme": "wikidata" + }, + { + "identifier": "5771", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943513,6 +943781,10 @@ { "identifier": "Q24025938", "scheme": "wikidata" + }, + { + "identifier": "5618", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943529,6 +943801,10 @@ { "identifier": "Q24052669", "scheme": "wikidata" + }, + { + "identifier": "5604", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943545,6 +943821,10 @@ { "identifier": "Q24052676", "scheme": "wikidata" + }, + { + "identifier": "5651", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943561,6 +943841,10 @@ { "identifier": "Q24039899", "scheme": "wikidata" + }, + { + "identifier": "5580", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943577,6 +943861,10 @@ { "identifier": "Q24039896", "scheme": "wikidata" + }, + { + "identifier": "5579", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943629,6 +943917,10 @@ { "identifier": "Q24052668", "scheme": "wikidata" + }, + { + "identifier": "5596", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943645,6 +943937,10 @@ { "identifier": "Q24039795", "scheme": "wikidata" + }, + { + "identifier": "5622", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943661,6 +943957,10 @@ { "identifier": "Q24052665", "scheme": "wikidata" + }, + { + "identifier": "5608", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943677,6 +943977,10 @@ { "identifier": "Q24034376", "scheme": "wikidata" + }, + { + "identifier": "5598", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943693,6 +943997,10 @@ { "identifier": "Q24014282", "scheme": "wikidata" + }, + { + "identifier": "5578", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943713,6 +944021,10 @@ { "identifier": "Q24052670", "scheme": "wikidata" + }, + { + "identifier": "5612", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943733,6 +944045,10 @@ { "identifier": "Q24039768", "scheme": "wikidata" + }, + { + "identifier": "4982", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943749,6 +944065,10 @@ { "identifier": "Q24034308", "scheme": "wikidata" + }, + { + "identifier": "5709", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943777,6 +944097,10 @@ { "identifier": "Q24039769", "scheme": "wikidata" + }, + { + "identifier": "4981", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943818,6 +944142,10 @@ { "identifier": "Q24039900", "scheme": "wikidata" + }, + { + "identifier": "3994", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943834,6 +944162,10 @@ { "identifier": "Q24036539", "scheme": "wikidata" + }, + { + "identifier": "5638", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943854,6 +944186,10 @@ { "identifier": "Q24052680", "scheme": "wikidata" + }, + { + "identifier": "5866", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943898,6 +944234,10 @@ { "identifier": "Q24034387", "scheme": "wikidata" + }, + { + "identifier": "5669", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943930,6 +944270,10 @@ { "identifier": "Q24052671", "scheme": "wikidata" + }, + { + "identifier": "5788", + "scheme": "scotparl_id" } ], "other_names": [ @@ -943946,6 +944290,10 @@ { "identifier": "Q514743", "scheme": "wikidata" + }, + { + "identifier": "5793", + "scheme": "scotparl_id" } ], "other_names": [ @@ -945964,6 +946312,10 @@ { "identifier": "Q30163629", "scheme": "wikidata" + }, + { + "identifier": "16198", + "scheme": "scotparl_id" } ], "other_names": [ @@ -946248,6 +946600,10 @@ { "identifier": "Q30167357", "scheme": "wikidata" + }, + { + "identifier": "16213", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947395,6 +947751,10 @@ { "identifier": "Q30164795", "scheme": "wikidata" + }, + { + "identifier": "16193", + "scheme": "scotparl_id" } ], "other_names": [ @@ -947776,6 +948136,10 @@ { "identifier": "Q30260625", "scheme": "wikidata" + }, + { + "identifier": "5800", + "scheme": "scotparl_id" } ], "other_names": [ @@ -949057,6 +949421,12 @@ }, { "id": "uk.org.publicwhip/person/25775", + "identifiers": [ + { + "identifier": "15631", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Wishart", @@ -953906,6 +954276,12 @@ }, { "id": "uk.org.publicwhip/person/25985", + "identifiers": [ + { + "identifier": "16177", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Adam", @@ -953916,6 +954292,12 @@ }, { "id": "uk.org.publicwhip/person/25986", + "identifiers": [ + { + "identifier": "16183", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Brown", @@ -953926,6 +954308,12 @@ }, { "id": "uk.org.publicwhip/person/25987", + "identifiers": [ + { + "identifier": "16196", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Burgess", @@ -953936,6 +954324,12 @@ }, { "id": "uk.org.publicwhip/person/25988", + "identifiers": [ + { + "identifier": "16188", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Callaghan", @@ -953946,6 +954340,12 @@ }, { "id": "uk.org.publicwhip/person/25989", + "identifiers": [ + { + "identifier": "16207", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Chapman", @@ -953956,6 +954356,12 @@ }, { "id": "uk.org.publicwhip/person/25990", + "identifiers": [ + { + "identifier": "16216", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Choudhury", @@ -953966,6 +954372,12 @@ }, { "id": "uk.org.publicwhip/person/25991", + "identifiers": [ + { + "identifier": "16181", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Don", @@ -953976,6 +954388,12 @@ }, { "id": "uk.org.publicwhip/person/25992", + "identifiers": [ + { + "identifier": "16212", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Dowey", @@ -953986,6 +954404,12 @@ }, { "id": "uk.org.publicwhip/person/25993", + "identifiers": [ + { + "identifier": "16175", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Dunbar", @@ -953996,6 +954420,12 @@ }, { "id": "uk.org.publicwhip/person/25994", + "identifiers": [ + { + "identifier": "16199", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Duncan-Glancy", @@ -954006,6 +954436,12 @@ }, { "id": "uk.org.publicwhip/person/25995", + "identifiers": [ + { + "identifier": "16187", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Fairlie", @@ -954016,6 +954452,12 @@ }, { "id": "uk.org.publicwhip/person/25996", + "identifiers": [ + { + "identifier": "16201", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Findlay", @@ -954026,6 +954468,12 @@ }, { "id": "uk.org.publicwhip/person/25997", + "identifiers": [ + { + "identifier": "16194", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Gallacher", @@ -954036,6 +954484,12 @@ }, { "id": "uk.org.publicwhip/person/25998", + "identifiers": [ + { + "identifier": "16204", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Gosal", @@ -954046,6 +954500,12 @@ }, { "id": "uk.org.publicwhip/person/25999", + "identifiers": [ + { + "identifier": "16200", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Gulhane", @@ -954056,6 +954516,12 @@ }, { "id": "uk.org.publicwhip/person/26000", + "identifiers": [ + { + "identifier": "16210", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Hoy", @@ -954066,6 +954532,12 @@ }, { "id": "uk.org.publicwhip/person/26001", + "identifiers": [ + { + "identifier": "16206", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Lumsden", @@ -954076,6 +954548,12 @@ }, { "id": "uk.org.publicwhip/person/26002", + "identifiers": [ + { + "identifier": "16195", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Mackay", @@ -954086,6 +954564,12 @@ }, { "id": "uk.org.publicwhip/person/26003", + "identifiers": [ + { + "identifier": "16205", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Marra", @@ -954096,6 +954580,12 @@ }, { "id": "uk.org.publicwhip/person/26004", + "identifiers": [ + { + "identifier": "16190", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "McAllan", @@ -954106,6 +954596,12 @@ }, { "id": "uk.org.publicwhip/person/26005", + "identifiers": [ + { + "identifier": "16179", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "McLennan", @@ -954116,6 +954612,12 @@ }, { "id": "uk.org.publicwhip/person/26006", + "identifiers": [ + { + "identifier": "16176", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "McNair", @@ -954126,6 +954628,12 @@ }, { "id": "uk.org.publicwhip/person/26007", + "identifiers": [ + { + "identifier": "16184", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Minto", @@ -954136,6 +954644,12 @@ }, { "id": "uk.org.publicwhip/person/26008", + "identifiers": [ + { + "identifier": "16211", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Mochan", @@ -954146,6 +954660,12 @@ }, { "id": "uk.org.publicwhip/person/26009", + "identifiers": [ + { + "identifier": "16186", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Nicoll", @@ -954156,6 +954676,12 @@ }, { "id": "uk.org.publicwhip/person/26010", + "identifiers": [ + { + "identifier": "16203", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "O'Kane", @@ -954166,6 +954692,12 @@ }, { "id": "uk.org.publicwhip/person/26011", + "identifiers": [ + { + "identifier": "16197", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Roddick", @@ -954176,6 +954708,12 @@ }, { "id": "uk.org.publicwhip/person/26012", + "identifiers": [ + { + "identifier": "16215", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Slater", @@ -954186,6 +954724,12 @@ }, { "id": "uk.org.publicwhip/person/26013", + "identifiers": [ + { + "identifier": "16191", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Stevenson", @@ -954196,6 +954740,12 @@ }, { "id": "uk.org.publicwhip/person/26014", + "identifiers": [ + { + "identifier": "16192", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Stewart", @@ -954206,6 +954756,12 @@ }, { "id": "uk.org.publicwhip/person/26015", + "identifiers": [ + { + "identifier": "16182", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Tweed", @@ -954216,6 +954772,12 @@ }, { "id": "uk.org.publicwhip/person/26016", + "identifiers": [ + { + "identifier": "16209", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Villalba", @@ -954226,6 +954788,12 @@ }, { "id": "uk.org.publicwhip/person/26017", + "identifiers": [ + { + "identifier": "16214", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Webber", @@ -954236,6 +954804,12 @@ }, { "id": "uk.org.publicwhip/person/26018", + "identifiers": [ + { + "identifier": "16208", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "White", @@ -954246,6 +954820,12 @@ }, { "id": "uk.org.publicwhip/person/26019", + "identifiers": [ + { + "identifier": "16189", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "Whitham", @@ -955609,6 +956189,12 @@ }, { "id": "uk.org.publicwhip/person/26091", + "identifiers": [ + { + "identifier": "16970", + "scheme": "scotparl_id" + } + ], "other_names": [ { "family_name": "McCall", @@ -959605,6 +960191,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()