From 27928032fa391490081d3903f1de38f7b45937ca Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:49:07 +0400 Subject: [PATCH 1/4] Drop the unused x and y columns from the local-authority area list `policyengine_api/data/local_authorities_2021.csv` now holds only each authority's `code` and `name`. The metadata builder in `country.py` reads only `name`, so the `x` and `y` hex-map positions were never used. The column test now expects exactly `code` and `name`, and the comparison with .py's packaged list compares codes and names only. The two tests that checked the positions are removed. A new test compares the UK metadata's region options with a recording taken before this change: 1 national entry, 4 countries, 650 constituencies and 361 local authorities, with their names, labels, types and order. It passed before this change and passes after it. Co-Authored-By: Claude Opus 5.5 --- .../data/local_authorities_2021.csv | 724 ++++++------ tests/data/uk_economy_region_options.json | 1018 +++++++++++++++++ tests/unit/test_country.py | 84 +- 3 files changed, 1418 insertions(+), 408 deletions(-) create mode 100644 tests/data/uk_economy_region_options.json diff --git a/policyengine_api/data/local_authorities_2021.csv b/policyengine_api/data/local_authorities_2021.csv index 2cd23eac8..52c4a32be 100644 --- a/policyengine_api/data/local_authorities_2021.csv +++ b/policyengine_api/data/local_authorities_2021.csv @@ -1,362 +1,362 @@ -code,x,y,name -E06000001,8.0,19.0,Hartlepool -E06000002,9.0,18.0,Middlesbrough -E06000003,9.0,19.0,Redcar and Cleveland -E06000004,8.0,18.0,Stockton-on-Tees -E06000005,7.0,18.0,Darlington -E06000006,1.0,11.0,Halton -E06000007,2.0,11.0,Warrington -E06000008,4.0,15.0,Blackburn with Darwen -E06000009,2.0,15.0,Blackpool -E06000010,10.0,15.0,"Kingston upon Hull, City of" -E06000011,11.0,16.0,East Riding of Yorkshire -E06000012,11.0,14.0,North East Lincolnshire -E06000013,10.0,14.0,North Lincolnshire -E06000014,9.0,17.0,York -E06000015,6.0,11.0,Derby -E06000016,8.0,8.0,Leicester -E06000017,10.0,9.0,Rutland -E06000018,8.0,10.0,Nottingham -E06000019,0.0,8.0,"Herefordshire, County of" -E06000020,2.0,9.0,Telford and Wrekin -E06000021,3.0,10.0,Stoke-on-Trent -E06000022,1.0,3.0,Bath and North East Somerset -E06000023,0.0,3.0,"Bristol, City of" -E06000024,0.0,2.0,North Somerset -E06000025,1.0,4.0,South Gloucestershire -E06000026,-4.0,-2.0,Plymouth -E06000027,-3.0,-2.0,Torbay -E06000030,2.0,4.0,Swindon -E06000031,11.0,9.0,Peterborough -E06000032,10.0,7.0,Luton -E06000033,16.0,6.0,Southend-on-Sea -E06000034,15.0,4.0,Thurrock -E06000035,15.0,1.0,Medway -E06000036,4.0,2.0,Bracknell Forest -E06000037,2.0,2.0,West Berkshire -E06000038,2.0,3.0,Reading -E06000039,6.0,4.0,Slough -E06000040,4.0,3.0,Windsor and Maidenhead -E06000041,3.0,3.0,Wokingham -E06000042,6.0,5.0,Milton Keynes -E06000043,9.0,-2.0,Brighton and Hove -E06000044,4.0,-1.0,Portsmouth -E06000045,2.0,0.0,Southampton -E06000046,1.0,-2.0,Isle of Wight -E06000047,6.0,18.0,County Durham -E06000049,4.0,11.0,Cheshire East -E06000050,3.0,11.0,Cheshire West and Chester -E06000051,1.0,9.0,Shropshire -E06000052,-5.0,-2.0,Cornwall -E06000053,-7.0,-3.0,Isles of Scilly -E06000054,1.0,2.0,Wiltshire -E06000055,9.0,7.0,Bedford -E06000056,9.0,6.0,Central Bedfordshire -E06000057,5.0,20.0,Northumberland -E06000058,0.0,0.0,"Bournemouth, Christchurch and Poole" -E06000059,-1.0,0.0,Dorset -E06000060,5.0,5.0,Buckinghamshire -E06000061,9.0,9.0,North Northamptonshire -E06000062,7.0,6.0,West Northamptonshire -E06000063,4.0,18.0,Cumberland -E06000064,4.0,17.0,Westmorland and Furness -E06000065,8.0,17.0,North Yorkshire -E06000066,0.0,1.0,Somerset -E07000008,12.0,8.0,Cambridge -E07000009,12.0,9.0,East Cambridgeshire -E07000010,13.0,10.0,Fenland -E07000011,10.0,8.0,Huntingdonshire -E07000012,11.0,8.0,South Cambridgeshire -E07000032,7.0,11.0,Amber Valley -E07000033,10.0,12.0,Bolsover -E07000034,9.0,12.0,Chesterfield -E07000035,7.0,12.0,Derbyshire Dales -E07000036,7.0,9.0,Erewash -E07000037,7.0,13.0,High Peak -E07000038,8.0,12.0,North East Derbyshire -E07000039,6.0,10.0,South Derbyshire -E07000040,-2.0,-1.0,East Devon -E07000041,-3.0,-1.0,Exeter -E07000042,-2.0,0.0,Mid Devon -E07000043,-3.0,1.0,North Devon -E07000044,-4.0,-3.0,South Hams -E07000045,-2.0,-2.0,Teignbridge -E07000046,-4.0,-1.0,Torridge -E07000047,-3.0,0.0,West Devon -E07000061,10.0,-2.0,Eastbourne -E07000062,13.0,-2.0,Hastings -E07000063,10.0,-1.0,Lewes -E07000064,12.0,-2.0,Rother -E07000065,11.0,-2.0,Wealden -E07000066,14.0,5.0,Basildon -E07000067,14.0,7.0,Braintree -E07000068,13.0,5.0,Brentwood -E07000069,15.0,5.0,Castle Point -E07000070,14.0,6.0,Chelmsford -E07000071,15.0,8.0,Colchester -E07000072,12.0,5.0,Epping Forest -E07000073,13.0,6.0,Harlow -E07000074,15.0,7.0,Maldon -E07000075,15.0,6.0,Rochford -E07000076,16.0,8.0,Tendring -E07000077,13.0,7.0,Uttlesford -E07000078,1.0,5.0,Cheltenham -E07000079,2.0,5.0,Cotswold -E07000080,-1.0,6.0,Forest of Dean -E07000081,0.0,6.0,Gloucester -E07000082,0.0,5.0,Stroud -E07000083,1.0,6.0,Tewkesbury -E07000084,2.0,1.0,Basingstoke and Deane -E07000085,4.0,0.0,East Hampshire -E07000086,3.0,0.0,Eastleigh -E07000087,2.0,-1.0,Fareham -E07000088,3.0,-1.0,Gosport -E07000089,3.0,2.0,Hart -E07000090,5.0,0.0,Havant -E07000091,1.0,0.0,New Forest -E07000092,4.0,1.0,Rushmoor -E07000093,1.0,1.0,Test Valley -E07000094,3.0,1.0,Winchester -E07000095,12.0,6.0,Broxbourne -E07000096,8.0,6.0,Dacorum -E07000098,9.0,5.0,Hertsmere -E07000099,11.0,7.0,North Hertfordshire -E07000102,7.0,5.0,Three Rivers -E07000103,8.0,5.0,Watford -E07000105,12.0,-1.0,Ashford -E07000106,15.0,0.0,Canterbury -E07000107,13.0,1.0,Dartford -E07000108,14.0,-1.0,Dover -E07000109,14.0,1.0,Gravesham -E07000110,14.0,0.0,Maidstone -E07000111,12.0,0.0,Sevenoaks -E07000112,13.0,-1.0,Folkestone and Hythe -E07000113,16.0,0.0,Swale -E07000114,15.0,-1.0,Thanet -E07000115,13.0,0.0,Tonbridge and Malling -E07000116,11.0,-1.0,Tunbridge Wells -E07000117,6.0,15.0,Burnley -E07000118,3.0,14.0,Chorley -E07000119,4.0,16.0,Fylde -E07000120,5.0,15.0,Hyndburn -E07000121,3.0,17.0,Lancaster -E07000122,6.0,16.0,Pendle -E07000123,5.0,16.0,Preston -E07000124,5.0,17.0,Ribble Valley -E07000125,6.0,14.0,Rossendale -E07000126,3.0,15.0,South Ribble -E07000127,2.0,13.0,West Lancashire -E07000128,3.0,16.0,Wyre -E07000129,7.0,7.0,Blaby -E07000130,8.0,9.0,Charnwood -E07000131,8.0,7.0,Harborough -E07000132,7.0,8.0,Hinckley and Bosworth -E07000133,11.0,10.0,Melton -E07000134,6.0,9.0,North West Leicestershire -E07000135,9.0,8.0,Oadby and Wigston -E07000136,12.0,12.0,Boston -E07000137,12.0,13.0,East Lindsey -E07000138,11.0,12.0,Lincoln -E07000139,11.0,11.0,North Kesteven -E07000140,12.0,11.0,South Holland -E07000141,12.0,10.0,South Kesteven -E07000142,11.0,13.0,West Lindsey -E07000143,14.0,10.0,Breckland -E07000144,15.0,12.0,Broadland -E07000145,15.0,11.0,Great Yarmouth -E07000146,13.0,11.0,King's Lynn and West Norfolk -E07000147,14.0,12.0,North Norfolk -E07000148,14.0,11.0,Norwich -E07000149,15.0,10.0,South Norfolk -E07000170,8.0,11.0,Ashfield -E07000171,10.0,13.0,Bassetlaw -E07000172,7.0,10.0,Broxtowe -E07000173,9.0,10.0,Gedling -E07000174,9.0,11.0,Mansfield -E07000175,10.0,11.0,Newark and Sherwood -E07000176,10.0,10.0,Rushcliffe -E07000177,4.0,5.0,Cherwell -E07000178,4.0,4.0,Oxford -E07000179,5.0,4.0,South Oxfordshire -E07000180,3.0,4.0,Vale of White Horse -E07000181,3.0,5.0,West Oxfordshire -E07000192,3.0,9.0,Cannock Chase -E07000193,5.0,11.0,East Staffordshire -E07000194,4.0,9.0,Lichfield -E07000195,2.0,10.0,Newcastle-under-Lyme -E07000196,2.0,8.0,South Staffordshire -E07000197,4.0,10.0,Stafford -E07000198,5.0,10.0,Staffordshire Moorlands -E07000199,5.0,9.0,Tamworth -E07000200,14.0,8.0,Babergh -E07000202,15.0,9.0,Ipswich -E07000203,14.0,9.0,Mid Suffolk -E07000207,7.0,2.0,Elmbridge -E07000208,8.0,0.0,Epsom and Ewell -E07000209,5.0,1.0,Guildford -E07000210,6.0,1.0,Mole Valley -E07000211,7.0,0.0,Reigate and Banstead -E07000212,5.0,3.0,Runnymede -E07000213,6.0,3.0,Spelthorne -E07000214,5.0,2.0,Surrey Heath -E07000215,9.0,-1.0,Tandridge -E07000216,6.0,0.0,Waverley -E07000217,6.0,2.0,Woking -E07000218,6.0,8.0,North Warwickshire -E07000219,6.0,7.0,Nuneaton and Bedworth -E07000220,6.0,6.0,Rugby -E07000221,3.0,6.0,Stratford-on-Avon -E07000222,4.0,6.0,Warwick -E07000223,8.0,-2.0,Adur -E07000224,6.0,-2.0,Arun -E07000225,5.0,-1.0,Chichester -E07000226,8.0,-1.0,Crawley -E07000227,6.0,-1.0,Horsham -E07000228,7.0,-1.0,Mid Sussex -E07000229,7.0,-2.0,Worthing -E07000234,2.0,7.0,Bromsgrove -E07000235,-1.0,7.0,Malvern Hills -E07000236,4.0,7.0,Redditch -E07000237,0.0,7.0,Worcester -E07000238,2.0,6.0,Wychavon -E07000239,1.0,8.0,Wyre Forest -E07000240,10.0,6.0,St Albans -E07000241,11.0,6.0,Welwyn Hatfield -E07000242,13.0,8.0,East Hertfordshire -E07000243,12.0,7.0,Stevenage -E07000244,16.0,10.0,East Suffolk -E07000245,13.0,9.0,West Suffolk -E08000001,4.0,14.0,Bolton -E08000002,5.0,14.0,Bury -E08000003,5.0,12.0,Manchester -E08000004,5.0,13.0,Oldham -E08000005,7.0,14.0,Rochdale -E08000006,4.0,13.0,Salford -E08000007,6.0,12.0,Stockport -E08000008,6.0,13.0,Tameside -E08000009,4.0,12.0,Trafford -E08000010,3.0,13.0,Wigan -E08000011,2.0,12.0,Knowsley -E08000012,1.0,13.0,Liverpool -E08000013,3.0,12.0,St. Helens -E08000014,2.0,14.0,Sefton -E08000015,1.0,12.0,Wirral -E08000016,8.0,14.0,Barnsley -E08000017,9.0,14.0,Doncaster -E08000018,9.0,13.0,Rotherham -E08000019,8.0,13.0,Sheffield -E08000021,5.0,19.0,Newcastle upon Tyne -E08000022,6.0,20.0,North Tyneside -E08000023,7.0,20.0,South Tyneside -E08000024,7.0,19.0,Sunderland -E08000025,5.0,8.0,Birmingham -E08000026,5.0,6.0,Coventry -E08000027,1.0,7.0,Dudley -E08000028,3.0,7.0,Sandwell -E08000029,5.0,7.0,Solihull -E08000030,4.0,8.0,Walsall -E08000031,3.0,8.0,Wolverhampton -E08000032,7.0,16.0,Bradford -E08000033,7.0,15.0,Calderdale -E08000034,8.0,15.0,Kirklees -E08000035,8.0,16.0,Leeds -E08000036,9.0,15.0,Wakefield -E08000037,6.0,19.0,Gateshead -E09000001,11.0,2.0,City of London -E09000002,13.0,3.0,Barking and Dagenham -E09000003,10.0,5.0,Barnet -E09000004,12.0,1.0,Bexley -E09000005,10.0,4.0,Brent -E09000006,11.0,0.0,Bromley -E09000007,11.0,4.0,Camden -E09000008,10.0,0.0,Croydon -E09000009,9.0,4.0,Ealing -E09000010,11.0,5.0,Enfield -E09000011,11.0,1.0,Greenwich -E09000012,12.0,3.0,Hackney -E09000013,8.0,3.0,Hammersmith and Fulham -E09000014,12.0,4.0,Haringey -E09000015,8.0,4.0,Harrow -E09000016,14.0,3.0,Havering -E09000017,7.0,4.0,Hillingdon -E09000018,7.0,3.0,Hounslow -E09000019,11.0,3.0,Islington -E09000020,9.0,3.0,Kensington and Chelsea -E09000021,7.0,1.0,Kingston upon Thames -E09000022,10.0,2.0,Lambeth -E09000023,10.0,1.0,Lewisham -E09000024,8.0,1.0,Merton -E09000025,13.0,2.0,Newham -E09000026,14.0,4.0,Redbridge -E09000027,8.0,2.0,Richmond upon Thames -E09000028,9.0,1.0,Southwark -E09000029,9.0,0.0,Sutton -E09000030,12.0,2.0,Tower Hamlets -E09000031,13.0,4.0,Waltham Forest -E09000032,9.0,2.0,Wandsworth -E09000033,10.0,3.0,Westminster -N09000001,-4.0,16.0,Antrim and Newtownabbey -N09000002,-5.0,16.0,"Armagh City, Banbridge and Craigavon" -N09000003,-4.0,17.0,Belfast -N09000004,-5.0,18.0,Causeway Coast and Glens -N09000005,-6.0,17.0,Derry City and Strabane -N09000006,-6.0,16.0,Fermanagh and Omagh -N09000007,-5.0,15.0,Lisburn and Castlereagh -N09000008,-4.0,18.0,Mid and East Antrim -N09000009,-5.0,17.0,Mid Ulster -N09000010,-4.0,15.0,"Newry, Mourne and Down" -N09000011,-3.0,16.0,Ards and North Down -S12000005,2.0,24.0,Clackmannanshire -S12000006,4.0,20.0,Dumfries and Galloway -S12000008,3.0,20.0,East Ayrshire -S12000010,5.0,22.0,East Lothian -S12000011,2.0,20.0,East Renfrewshire -S12000013,-1.0,27.0,Na h-Eileanan Siar -S12000014,2.0,23.0,Falkirk -S12000017,1.0,26.0,Highland -S12000018,0.0,21.0,Inverclyde -S12000019,3.0,21.0,Midlothian -S12000020,2.0,26.0,Moray -S12000021,1.0,20.0,North Ayrshire -S12000023,4.0,28.0,Orkney Islands -S12000026,4.0,21.0,Scottish Borders -S12000027,5.0,30.0,Shetland Islands -S12000028,1.0,19.0,South Ayrshire -S12000029,2.0,21.0,South Lanarkshire -S12000030,1.0,24.0,Stirling -S12000033,4.0,26.0,Aberdeen City -S12000034,3.0,26.0,Aberdeenshire -S12000035,0.0,24.0,Argyll and Bute -S12000036,4.0,22.0,City of Edinburgh -S12000038,1.0,22.0,Renfrewshire -S12000039,0.0,23.0,West Dunbartonshire -S12000040,3.0,22.0,West Lothian -S12000041,2.0,25.0,Angus -S12000042,3.0,25.0,Dundee City -S12000045,1.0,23.0,East Dunbartonshire -S12000047,3.0,24.0,Fife -S12000048,1.0,25.0,Perth and Kinross -S12000049,1.0,21.0,Glasgow City -S12000050,2.0,22.0,North Lanarkshire -W06000001,-2.0,12.0,Isle of Anglesey -W06000002,-2.0,10.0,Gwynedd -W06000003,-1.0,10.0,Conwy -W06000004,0.0,10.0,Denbighshire -W06000005,0.0,11.0,Flintshire -W06000006,1.0,10.0,Wrexham -W06000008,-2.0,9.0,Ceredigion -W06000009,-5.0,6.0,Pembrokeshire -W06000010,-4.0,6.0,Carmarthenshire -W06000011,-4.0,5.0,Swansea -W06000012,-3.0,5.0,Neath Port Talbot -W06000013,-3.0,6.0,Bridgend -W06000014,-2.0,4.0,Vale of Glamorgan -W06000015,-2.0,5.0,Cardiff -W06000016,-3.0,7.0,Rhondda Cynon Taf -W06000018,-2.0,6.0,Caerphilly -W06000019,0.0,9.0,Blaenau Gwent -W06000020,-2.0,7.0,Torfaen -W06000021,-1.0,8.0,Monmouthshire -W06000022,-1.0,5.0,Newport -W06000023,-1.0,9.0,Powys -W06000024,-2.0,8.0,Merthyr Tydfil +code,name +E06000001,Hartlepool +E06000002,Middlesbrough +E06000003,Redcar and Cleveland +E06000004,Stockton-on-Tees +E06000005,Darlington +E06000006,Halton +E06000007,Warrington +E06000008,Blackburn with Darwen +E06000009,Blackpool +E06000010,"Kingston upon Hull, City of" +E06000011,East Riding of Yorkshire +E06000012,North East Lincolnshire +E06000013,North Lincolnshire +E06000014,York +E06000015,Derby +E06000016,Leicester +E06000017,Rutland +E06000018,Nottingham +E06000019,"Herefordshire, County of" +E06000020,Telford and Wrekin +E06000021,Stoke-on-Trent +E06000022,Bath and North East Somerset +E06000023,"Bristol, City of" +E06000024,North Somerset +E06000025,South Gloucestershire +E06000026,Plymouth +E06000027,Torbay +E06000030,Swindon +E06000031,Peterborough +E06000032,Luton +E06000033,Southend-on-Sea +E06000034,Thurrock +E06000035,Medway +E06000036,Bracknell Forest +E06000037,West Berkshire +E06000038,Reading +E06000039,Slough +E06000040,Windsor and Maidenhead +E06000041,Wokingham +E06000042,Milton Keynes +E06000043,Brighton and Hove +E06000044,Portsmouth +E06000045,Southampton +E06000046,Isle of Wight +E06000047,County Durham +E06000049,Cheshire East +E06000050,Cheshire West and Chester +E06000051,Shropshire +E06000052,Cornwall +E06000053,Isles of Scilly +E06000054,Wiltshire +E06000055,Bedford +E06000056,Central Bedfordshire +E06000057,Northumberland +E06000058,"Bournemouth, Christchurch and Poole" +E06000059,Dorset +E06000060,Buckinghamshire +E06000061,North Northamptonshire +E06000062,West Northamptonshire +E06000063,Cumberland +E06000064,Westmorland and Furness +E06000065,North Yorkshire +E06000066,Somerset +E07000008,Cambridge +E07000009,East Cambridgeshire +E07000010,Fenland +E07000011,Huntingdonshire +E07000012,South Cambridgeshire +E07000032,Amber Valley +E07000033,Bolsover +E07000034,Chesterfield +E07000035,Derbyshire Dales +E07000036,Erewash +E07000037,High Peak +E07000038,North East Derbyshire +E07000039,South Derbyshire +E07000040,East Devon +E07000041,Exeter +E07000042,Mid Devon +E07000043,North Devon +E07000044,South Hams +E07000045,Teignbridge +E07000046,Torridge +E07000047,West Devon +E07000061,Eastbourne +E07000062,Hastings +E07000063,Lewes +E07000064,Rother +E07000065,Wealden +E07000066,Basildon +E07000067,Braintree +E07000068,Brentwood +E07000069,Castle Point +E07000070,Chelmsford +E07000071,Colchester +E07000072,Epping Forest +E07000073,Harlow +E07000074,Maldon +E07000075,Rochford +E07000076,Tendring +E07000077,Uttlesford +E07000078,Cheltenham +E07000079,Cotswold +E07000080,Forest of Dean +E07000081,Gloucester +E07000082,Stroud +E07000083,Tewkesbury +E07000084,Basingstoke and Deane +E07000085,East Hampshire +E07000086,Eastleigh +E07000087,Fareham +E07000088,Gosport +E07000089,Hart +E07000090,Havant +E07000091,New Forest +E07000092,Rushmoor +E07000093,Test Valley +E07000094,Winchester +E07000095,Broxbourne +E07000096,Dacorum +E07000098,Hertsmere +E07000099,North Hertfordshire +E07000102,Three Rivers +E07000103,Watford +E07000105,Ashford +E07000106,Canterbury +E07000107,Dartford +E07000108,Dover +E07000109,Gravesham +E07000110,Maidstone +E07000111,Sevenoaks +E07000112,Folkestone and Hythe +E07000113,Swale +E07000114,Thanet +E07000115,Tonbridge and Malling +E07000116,Tunbridge Wells +E07000117,Burnley +E07000118,Chorley +E07000119,Fylde +E07000120,Hyndburn +E07000121,Lancaster +E07000122,Pendle +E07000123,Preston +E07000124,Ribble Valley +E07000125,Rossendale +E07000126,South Ribble +E07000127,West Lancashire +E07000128,Wyre +E07000129,Blaby +E07000130,Charnwood +E07000131,Harborough +E07000132,Hinckley and Bosworth +E07000133,Melton +E07000134,North West Leicestershire +E07000135,Oadby and Wigston +E07000136,Boston +E07000137,East Lindsey +E07000138,Lincoln +E07000139,North Kesteven +E07000140,South Holland +E07000141,South Kesteven +E07000142,West Lindsey +E07000143,Breckland +E07000144,Broadland +E07000145,Great Yarmouth +E07000146,King's Lynn and West Norfolk +E07000147,North Norfolk +E07000148,Norwich +E07000149,South Norfolk +E07000170,Ashfield +E07000171,Bassetlaw +E07000172,Broxtowe +E07000173,Gedling +E07000174,Mansfield +E07000175,Newark and Sherwood +E07000176,Rushcliffe +E07000177,Cherwell +E07000178,Oxford +E07000179,South Oxfordshire +E07000180,Vale of White Horse +E07000181,West Oxfordshire +E07000192,Cannock Chase +E07000193,East Staffordshire +E07000194,Lichfield +E07000195,Newcastle-under-Lyme +E07000196,South Staffordshire +E07000197,Stafford +E07000198,Staffordshire Moorlands +E07000199,Tamworth +E07000200,Babergh +E07000202,Ipswich +E07000203,Mid Suffolk +E07000207,Elmbridge +E07000208,Epsom and Ewell +E07000209,Guildford +E07000210,Mole Valley +E07000211,Reigate and Banstead +E07000212,Runnymede +E07000213,Spelthorne +E07000214,Surrey Heath +E07000215,Tandridge +E07000216,Waverley +E07000217,Woking +E07000218,North Warwickshire +E07000219,Nuneaton and Bedworth +E07000220,Rugby +E07000221,Stratford-on-Avon +E07000222,Warwick +E07000223,Adur +E07000224,Arun +E07000225,Chichester +E07000226,Crawley +E07000227,Horsham +E07000228,Mid Sussex +E07000229,Worthing +E07000234,Bromsgrove +E07000235,Malvern Hills +E07000236,Redditch +E07000237,Worcester +E07000238,Wychavon +E07000239,Wyre Forest +E07000240,St Albans +E07000241,Welwyn Hatfield +E07000242,East Hertfordshire +E07000243,Stevenage +E07000244,East Suffolk +E07000245,West Suffolk +E08000001,Bolton +E08000002,Bury +E08000003,Manchester +E08000004,Oldham +E08000005,Rochdale +E08000006,Salford +E08000007,Stockport +E08000008,Tameside +E08000009,Trafford +E08000010,Wigan +E08000011,Knowsley +E08000012,Liverpool +E08000013,St. Helens +E08000014,Sefton +E08000015,Wirral +E08000016,Barnsley +E08000017,Doncaster +E08000018,Rotherham +E08000019,Sheffield +E08000021,Newcastle upon Tyne +E08000022,North Tyneside +E08000023,South Tyneside +E08000024,Sunderland +E08000025,Birmingham +E08000026,Coventry +E08000027,Dudley +E08000028,Sandwell +E08000029,Solihull +E08000030,Walsall +E08000031,Wolverhampton +E08000032,Bradford +E08000033,Calderdale +E08000034,Kirklees +E08000035,Leeds +E08000036,Wakefield +E08000037,Gateshead +E09000001,City of London +E09000002,Barking and Dagenham +E09000003,Barnet +E09000004,Bexley +E09000005,Brent +E09000006,Bromley +E09000007,Camden +E09000008,Croydon +E09000009,Ealing +E09000010,Enfield +E09000011,Greenwich +E09000012,Hackney +E09000013,Hammersmith and Fulham +E09000014,Haringey +E09000015,Harrow +E09000016,Havering +E09000017,Hillingdon +E09000018,Hounslow +E09000019,Islington +E09000020,Kensington and Chelsea +E09000021,Kingston upon Thames +E09000022,Lambeth +E09000023,Lewisham +E09000024,Merton +E09000025,Newham +E09000026,Redbridge +E09000027,Richmond upon Thames +E09000028,Southwark +E09000029,Sutton +E09000030,Tower Hamlets +E09000031,Waltham Forest +E09000032,Wandsworth +E09000033,Westminster +N09000001,Antrim and Newtownabbey +N09000002,"Armagh City, Banbridge and Craigavon" +N09000003,Belfast +N09000004,Causeway Coast and Glens +N09000005,Derry City and Strabane +N09000006,Fermanagh and Omagh +N09000007,Lisburn and Castlereagh +N09000008,Mid and East Antrim +N09000009,Mid Ulster +N09000010,"Newry, Mourne and Down" +N09000011,Ards and North Down +S12000005,Clackmannanshire +S12000006,Dumfries and Galloway +S12000008,East Ayrshire +S12000010,East Lothian +S12000011,East Renfrewshire +S12000013,Na h-Eileanan Siar +S12000014,Falkirk +S12000017,Highland +S12000018,Inverclyde +S12000019,Midlothian +S12000020,Moray +S12000021,North Ayrshire +S12000023,Orkney Islands +S12000026,Scottish Borders +S12000027,Shetland Islands +S12000028,South Ayrshire +S12000029,South Lanarkshire +S12000030,Stirling +S12000033,Aberdeen City +S12000034,Aberdeenshire +S12000035,Argyll and Bute +S12000036,City of Edinburgh +S12000038,Renfrewshire +S12000039,West Dunbartonshire +S12000040,West Lothian +S12000041,Angus +S12000042,Dundee City +S12000045,East Dunbartonshire +S12000047,Fife +S12000048,Perth and Kinross +S12000049,Glasgow City +S12000050,North Lanarkshire +W06000001,Isle of Anglesey +W06000002,Gwynedd +W06000003,Conwy +W06000004,Denbighshire +W06000005,Flintshire +W06000006,Wrexham +W06000008,Ceredigion +W06000009,Pembrokeshire +W06000010,Carmarthenshire +W06000011,Swansea +W06000012,Neath Port Talbot +W06000013,Bridgend +W06000014,Vale of Glamorgan +W06000015,Cardiff +W06000016,Rhondda Cynon Taf +W06000018,Caerphilly +W06000019,Blaenau Gwent +W06000020,Torfaen +W06000021,Monmouthshire +W06000022,Newport +W06000023,Powys +W06000024,Merthyr Tydfil diff --git a/tests/data/uk_economy_region_options.json b/tests/data/uk_economy_region_options.json new file mode 100644 index 000000000..3c7e05f03 --- /dev/null +++ b/tests/data/uk_economy_region_options.json @@ -0,0 +1,1018 @@ +[ + {"name": "uk", "label": "the UK", "type": "national"}, + {"name": "country/england", "label": "England", "type": "country"}, + {"name": "country/scotland", "label": "Scotland", "type": "country"}, + {"name": "country/wales", "label": "Wales", "type": "country"}, + {"name": "country/ni", "label": "Northern Ireland", "type": "country"}, + {"name": "constituency/Aberafan Maesteg", "label": "Aberafan Maesteg", "type": "constituency"}, + {"name": "constituency/Aberdeen North", "label": "Aberdeen North", "type": "constituency"}, + {"name": "constituency/Aberdeen South", "label": "Aberdeen South", "type": "constituency"}, + {"name": "constituency/Aberdeenshire North and Moray East", "label": "Aberdeenshire North and Moray East", "type": "constituency"}, + {"name": "constituency/Airdrie and Shotts", "label": "Airdrie and Shotts", "type": "constituency"}, + {"name": "constituency/Aldershot", "label": "Aldershot", "type": "constituency"}, + {"name": "constituency/Aldridge-Brownhills", "label": "Aldridge-Brownhills", "type": "constituency"}, + {"name": "constituency/Alloa and Grangemouth", "label": "Alloa and Grangemouth", "type": "constituency"}, + {"name": "constituency/Altrincham and Sale West", "label": "Altrincham and Sale West", "type": "constituency"}, + {"name": "constituency/Alyn and Deeside", "label": "Alyn and Deeside", "type": "constituency"}, + {"name": "constituency/Amber Valley", "label": "Amber Valley", "type": "constituency"}, + {"name": "constituency/Angus and Perthshire Glens", "label": "Angus and Perthshire Glens", "type": "constituency"}, + {"name": "constituency/Arbroath and Broughty Ferry", "label": "Arbroath and Broughty Ferry", "type": "constituency"}, + {"name": "constituency/Argyll, Bute and South Lochaber", "label": "Argyll, Bute and South Lochaber", "type": "constituency"}, + {"name": "constituency/Arundel and South Downs", "label": "Arundel and South Downs", "type": "constituency"}, + {"name": "constituency/Ashfield", "label": "Ashfield", "type": "constituency"}, + {"name": "constituency/Ashford", "label": "Ashford", "type": "constituency"}, + {"name": "constituency/Ashton-under-Lyne", "label": "Ashton-under-Lyne", "type": "constituency"}, + {"name": "constituency/Aylesbury", "label": "Aylesbury", "type": "constituency"}, + {"name": "constituency/Ayr, Carrick and Cumnock", "label": "Ayr, Carrick and Cumnock", "type": "constituency"}, + {"name": "constituency/Banbury", "label": "Banbury", "type": "constituency"}, + {"name": "constituency/Bangor Aberconwy", "label": "Bangor Aberconwy", "type": "constituency"}, + {"name": "constituency/Barking", "label": "Barking", "type": "constituency"}, + {"name": "constituency/Barnsley North", "label": "Barnsley North", "type": "constituency"}, + {"name": "constituency/Barnsley South", "label": "Barnsley South", "type": "constituency"}, + {"name": "constituency/Barrow and Furness", "label": "Barrow and Furness", "type": "constituency"}, + {"name": "constituency/Basildon and Billericay", "label": "Basildon and Billericay", "type": "constituency"}, + {"name": "constituency/Basingstoke", "label": "Basingstoke", "type": "constituency"}, + {"name": "constituency/Bassetlaw", "label": "Bassetlaw", "type": "constituency"}, + {"name": "constituency/Bath", "label": "Bath", "type": "constituency"}, + {"name": "constituency/Bathgate and Linlithgow", "label": "Bathgate and Linlithgow", "type": "constituency"}, + {"name": "constituency/Battersea", "label": "Battersea", "type": "constituency"}, + {"name": "constituency/Beaconsfield", "label": "Beaconsfield", "type": "constituency"}, + {"name": "constituency/Beckenham and Penge", "label": "Beckenham and Penge", "type": "constituency"}, + {"name": "constituency/Bedford", "label": "Bedford", "type": "constituency"}, + {"name": "constituency/Belfast East", "label": "Belfast East", "type": "constituency"}, + {"name": "constituency/Belfast North", "label": "Belfast North", "type": "constituency"}, + {"name": "constituency/Belfast South and Mid Down", "label": "Belfast South and Mid Down", "type": "constituency"}, + {"name": "constituency/Belfast West", "label": "Belfast West", "type": "constituency"}, + {"name": "constituency/Bermondsey and Old Southwark", "label": "Bermondsey and Old Southwark", "type": "constituency"}, + {"name": "constituency/Berwickshire, Roxburgh and Selkirk", "label": "Berwickshire, Roxburgh and Selkirk", "type": "constituency"}, + {"name": "constituency/Bethnal Green and Stepney", "label": "Bethnal Green and Stepney", "type": "constituency"}, + {"name": "constituency/Beverley and Holderness", "label": "Beverley and Holderness", "type": "constituency"}, + {"name": "constituency/Bexhill and Battle", "label": "Bexhill and Battle", "type": "constituency"}, + {"name": "constituency/Bexleyheath and Crayford", "label": "Bexleyheath and Crayford", "type": "constituency"}, + {"name": "constituency/Bicester and Woodstock", "label": "Bicester and Woodstock", "type": "constituency"}, + {"name": "constituency/Birkenhead", "label": "Birkenhead", "type": "constituency"}, + {"name": "constituency/Birmingham Edgbaston", "label": "Birmingham Edgbaston", "type": "constituency"}, + {"name": "constituency/Birmingham Erdington", "label": "Birmingham Erdington", "type": "constituency"}, + {"name": "constituency/Birmingham Hall Green and Moseley", "label": "Birmingham Hall Green and Moseley", "type": "constituency"}, + {"name": "constituency/Birmingham Hodge Hill and Solihull North", "label": "Birmingham Hodge Hill and Solihull North", "type": "constituency"}, + {"name": "constituency/Birmingham Ladywood", "label": "Birmingham Ladywood", "type": "constituency"}, + {"name": "constituency/Birmingham Northfield", "label": "Birmingham Northfield", "type": "constituency"}, + {"name": "constituency/Birmingham Perry Barr", "label": "Birmingham Perry Barr", "type": "constituency"}, + {"name": "constituency/Birmingham Selly Oak", "label": "Birmingham Selly Oak", "type": "constituency"}, + {"name": "constituency/Birmingham Yardley", "label": "Birmingham Yardley", "type": "constituency"}, + {"name": "constituency/Bishop Auckland", "label": "Bishop Auckland", "type": "constituency"}, + {"name": "constituency/Blackburn", "label": "Blackburn", "type": "constituency"}, + {"name": "constituency/Blackley and Middleton South", "label": "Blackley and Middleton South", "type": "constituency"}, + {"name": "constituency/Blackpool North and Fleetwood", "label": "Blackpool North and Fleetwood", "type": "constituency"}, + {"name": "constituency/Blackpool South", "label": "Blackpool South", "type": "constituency"}, + {"name": "constituency/Blaenau Gwent and Rhymney", "label": "Blaenau Gwent and Rhymney", "type": "constituency"}, + {"name": "constituency/Blaydon and Consett", "label": "Blaydon and Consett", "type": "constituency"}, + {"name": "constituency/Blyth and Ashington", "label": "Blyth and Ashington", "type": "constituency"}, + {"name": "constituency/Bognor Regis and Littlehampton", "label": "Bognor Regis and Littlehampton", "type": "constituency"}, + {"name": "constituency/Bolsover", "label": "Bolsover", "type": "constituency"}, + {"name": "constituency/Bolton North East", "label": "Bolton North East", "type": "constituency"}, + {"name": "constituency/Bolton South and Walkden", "label": "Bolton South and Walkden", "type": "constituency"}, + {"name": "constituency/Bolton West", "label": "Bolton West", "type": "constituency"}, + {"name": "constituency/Bootle", "label": "Bootle", "type": "constituency"}, + {"name": "constituency/Boston and Skegness", "label": "Boston and Skegness", "type": "constituency"}, + {"name": "constituency/Bournemouth East", "label": "Bournemouth East", "type": "constituency"}, + {"name": "constituency/Bournemouth West", "label": "Bournemouth West", "type": "constituency"}, + {"name": "constituency/Bracknell", "label": "Bracknell", "type": "constituency"}, + {"name": "constituency/Bradford East", "label": "Bradford East", "type": "constituency"}, + {"name": "constituency/Bradford South", "label": "Bradford South", "type": "constituency"}, + {"name": "constituency/Bradford West", "label": "Bradford West", "type": "constituency"}, + {"name": "constituency/Braintree", "label": "Braintree", "type": "constituency"}, + {"name": "constituency/Brecon, Radnor and Cwm Tawe", "label": "Brecon, Radnor and Cwm Tawe", "type": "constituency"}, + {"name": "constituency/Brent East", "label": "Brent East", "type": "constituency"}, + {"name": "constituency/Brent West", "label": "Brent West", "type": "constituency"}, + {"name": "constituency/Brentford and Isleworth", "label": "Brentford and Isleworth", "type": "constituency"}, + {"name": "constituency/Brentwood and Ongar", "label": "Brentwood and Ongar", "type": "constituency"}, + {"name": "constituency/Bridgend", "label": "Bridgend", "type": "constituency"}, + {"name": "constituency/Bridgwater", "label": "Bridgwater", "type": "constituency"}, + {"name": "constituency/Bridlington and The Wolds", "label": "Bridlington and The Wolds", "type": "constituency"}, + {"name": "constituency/Brigg and Immingham", "label": "Brigg and Immingham", "type": "constituency"}, + {"name": "constituency/Brighton Kemptown and Peacehaven", "label": "Brighton Kemptown and Peacehaven", "type": "constituency"}, + {"name": "constituency/Brighton Pavilion", "label": "Brighton Pavilion", "type": "constituency"}, + {"name": "constituency/Bristol Central", "label": "Bristol Central", "type": "constituency"}, + {"name": "constituency/Bristol East", "label": "Bristol East", "type": "constituency"}, + {"name": "constituency/Bristol North East", "label": "Bristol North East", "type": "constituency"}, + {"name": "constituency/Bristol North West", "label": "Bristol North West", "type": "constituency"}, + {"name": "constituency/Bristol South", "label": "Bristol South", "type": "constituency"}, + {"name": "constituency/Broadland and Fakenham", "label": "Broadland and Fakenham", "type": "constituency"}, + {"name": "constituency/Bromley and Biggin Hill", "label": "Bromley and Biggin Hill", "type": "constituency"}, + {"name": "constituency/Bromsgrove", "label": "Bromsgrove", "type": "constituency"}, + {"name": "constituency/Broxbourne", "label": "Broxbourne", "type": "constituency"}, + {"name": "constituency/Broxtowe", "label": "Broxtowe", "type": "constituency"}, + {"name": "constituency/Buckingham and Bletchley", "label": "Buckingham and Bletchley", "type": "constituency"}, + {"name": "constituency/Burnley", "label": "Burnley", "type": "constituency"}, + {"name": "constituency/Burton and Uttoxeter", "label": "Burton and Uttoxeter", "type": "constituency"}, + {"name": "constituency/Bury North", "label": "Bury North", "type": "constituency"}, + {"name": "constituency/Bury South", "label": "Bury South", "type": "constituency"}, + {"name": "constituency/Bury St Edmunds and Stowmarket", "label": "Bury St Edmunds and Stowmarket", "type": "constituency"}, + {"name": "constituency/Caerfyrddin", "label": "Caerfyrddin", "type": "constituency"}, + {"name": "constituency/Caerphilly", "label": "Caerphilly", "type": "constituency"}, + {"name": "constituency/Caithness, Sutherland and Easter Ross", "label": "Caithness, Sutherland and Easter Ross", "type": "constituency"}, + {"name": "constituency/Calder Valley", "label": "Calder Valley", "type": "constituency"}, + {"name": "constituency/Camborne and Redruth", "label": "Camborne and Redruth", "type": "constituency"}, + {"name": "constituency/Cambridge", "label": "Cambridge", "type": "constituency"}, + {"name": "constituency/Cannock Chase", "label": "Cannock Chase", "type": "constituency"}, + {"name": "constituency/Canterbury", "label": "Canterbury", "type": "constituency"}, + {"name": "constituency/Cardiff East", "label": "Cardiff East", "type": "constituency"}, + {"name": "constituency/Cardiff North", "label": "Cardiff North", "type": "constituency"}, + {"name": "constituency/Cardiff South and Penarth", "label": "Cardiff South and Penarth", "type": "constituency"}, + {"name": "constituency/Cardiff West", "label": "Cardiff West", "type": "constituency"}, + {"name": "constituency/Carlisle", "label": "Carlisle", "type": "constituency"}, + {"name": "constituency/Carshalton and Wallington", "label": "Carshalton and Wallington", "type": "constituency"}, + {"name": "constituency/Castle Point", "label": "Castle Point", "type": "constituency"}, + {"name": "constituency/Central Ayrshire", "label": "Central Ayrshire", "type": "constituency"}, + {"name": "constituency/Central Devon", "label": "Central Devon", "type": "constituency"}, + {"name": "constituency/Central Suffolk and North Ipswich", "label": "Central Suffolk and North Ipswich", "type": "constituency"}, + {"name": "constituency/Ceredigion Preseli", "label": "Ceredigion Preseli", "type": "constituency"}, + {"name": "constituency/Chatham and Aylesford", "label": "Chatham and Aylesford", "type": "constituency"}, + {"name": "constituency/Cheadle", "label": "Cheadle", "type": "constituency"}, + {"name": "constituency/Chelmsford", "label": "Chelmsford", "type": "constituency"}, + {"name": "constituency/Chelsea and Fulham", "label": "Chelsea and Fulham", "type": "constituency"}, + {"name": "constituency/Cheltenham", "label": "Cheltenham", "type": "constituency"}, + {"name": "constituency/Chesham and Amersham", "label": "Chesham and Amersham", "type": "constituency"}, + {"name": "constituency/Chester North and Neston", "label": "Chester North and Neston", "type": "constituency"}, + {"name": "constituency/Chester South and Eddisbury", "label": "Chester South and Eddisbury", "type": "constituency"}, + {"name": "constituency/Chesterfield", "label": "Chesterfield", "type": "constituency"}, + {"name": "constituency/Chichester", "label": "Chichester", "type": "constituency"}, + {"name": "constituency/Chingford and Woodford Green", "label": "Chingford and Woodford Green", "type": "constituency"}, + {"name": "constituency/Chippenham", "label": "Chippenham", "type": "constituency"}, + {"name": "constituency/Chipping Barnet", "label": "Chipping Barnet", "type": "constituency"}, + {"name": "constituency/Chorley", "label": "Chorley", "type": "constituency"}, + {"name": "constituency/Christchurch", "label": "Christchurch", "type": "constituency"}, + {"name": "constituency/Cities of London and Westminster", "label": "Cities of London and Westminster", "type": "constituency"}, + {"name": "constituency/City of Durham", "label": "City of Durham", "type": "constituency"}, + {"name": "constituency/Clacton", "label": "Clacton", "type": "constituency"}, + {"name": "constituency/Clapham and Brixton Hill", "label": "Clapham and Brixton Hill", "type": "constituency"}, + {"name": "constituency/Clwyd East", "label": "Clwyd East", "type": "constituency"}, + {"name": "constituency/Clwyd North", "label": "Clwyd North", "type": "constituency"}, + {"name": "constituency/Coatbridge and Bellshill", "label": "Coatbridge and Bellshill", "type": "constituency"}, + {"name": "constituency/Colchester", "label": "Colchester", "type": "constituency"}, + {"name": "constituency/Colne Valley", "label": "Colne Valley", "type": "constituency"}, + {"name": "constituency/Congleton", "label": "Congleton", "type": "constituency"}, + {"name": "constituency/Corby and East Northamptonshire", "label": "Corby and East Northamptonshire", "type": "constituency"}, + {"name": "constituency/Coventry East", "label": "Coventry East", "type": "constituency"}, + {"name": "constituency/Coventry North West", "label": "Coventry North West", "type": "constituency"}, + {"name": "constituency/Coventry South", "label": "Coventry South", "type": "constituency"}, + {"name": "constituency/Cowdenbeath and Kirkcaldy", "label": "Cowdenbeath and Kirkcaldy", "type": "constituency"}, + {"name": "constituency/Cramlington and Killingworth", "label": "Cramlington and Killingworth", "type": "constituency"}, + {"name": "constituency/Crawley", "label": "Crawley", "type": "constituency"}, + {"name": "constituency/Crewe and Nantwich", "label": "Crewe and Nantwich", "type": "constituency"}, + {"name": "constituency/Croydon East", "label": "Croydon East", "type": "constituency"}, + {"name": "constituency/Croydon South", "label": "Croydon South", "type": "constituency"}, + {"name": "constituency/Croydon West", "label": "Croydon West", "type": "constituency"}, + {"name": "constituency/Cumbernauld and Kirkintilloch", "label": "Cumbernauld and Kirkintilloch", "type": "constituency"}, + {"name": "constituency/Dagenham and Rainham", "label": "Dagenham and Rainham", "type": "constituency"}, + {"name": "constituency/Darlington", "label": "Darlington", "type": "constituency"}, + {"name": "constituency/Dartford", "label": "Dartford", "type": "constituency"}, + {"name": "constituency/Daventry", "label": "Daventry", "type": "constituency"}, + {"name": "constituency/Derby North", "label": "Derby North", "type": "constituency"}, + {"name": "constituency/Derby South", "label": "Derby South", "type": "constituency"}, + {"name": "constituency/Derbyshire Dales", "label": "Derbyshire Dales", "type": "constituency"}, + {"name": "constituency/Dewsbury and Batley", "label": "Dewsbury and Batley", "type": "constituency"}, + {"name": "constituency/Didcot and Wantage", "label": "Didcot and Wantage", "type": "constituency"}, + {"name": "constituency/Doncaster Central", "label": "Doncaster Central", "type": "constituency"}, + {"name": "constituency/Doncaster East and the Isle of Axholme", "label": "Doncaster East and the Isle of Axholme", "type": "constituency"}, + {"name": "constituency/Doncaster North", "label": "Doncaster North", "type": "constituency"}, + {"name": "constituency/Dorking and Horley", "label": "Dorking and Horley", "type": "constituency"}, + {"name": "constituency/Dover and Deal", "label": "Dover and Deal", "type": "constituency"}, + {"name": "constituency/Droitwich and Evesham", "label": "Droitwich and Evesham", "type": "constituency"}, + {"name": "constituency/Dudley", "label": "Dudley", "type": "constituency"}, + {"name": "constituency/Dulwich and West Norwood", "label": "Dulwich and West Norwood", "type": "constituency"}, + {"name": "constituency/Dumfries and Galloway", "label": "Dumfries and Galloway", "type": "constituency"}, + {"name": "constituency/Dumfriesshire, Clydesdale and Tweeddale", "label": "Dumfriesshire, Clydesdale and Tweeddale", "type": "constituency"}, + {"name": "constituency/Dundee Central", "label": "Dundee Central", "type": "constituency"}, + {"name": "constituency/Dunfermline and Dollar", "label": "Dunfermline and Dollar", "type": "constituency"}, + {"name": "constituency/Dunstable and Leighton Buzzard", "label": "Dunstable and Leighton Buzzard", "type": "constituency"}, + {"name": "constituency/Dwyfor Meirionnydd", "label": "Dwyfor Meirionnydd", "type": "constituency"}, + {"name": "constituency/Ealing Central and Acton", "label": "Ealing Central and Acton", "type": "constituency"}, + {"name": "constituency/Ealing North", "label": "Ealing North", "type": "constituency"}, + {"name": "constituency/Ealing Southall", "label": "Ealing Southall", "type": "constituency"}, + {"name": "constituency/Earley and Woodley", "label": "Earley and Woodley", "type": "constituency"}, + {"name": "constituency/Easington", "label": "Easington", "type": "constituency"}, + {"name": "constituency/East Antrim", "label": "East Antrim", "type": "constituency"}, + {"name": "constituency/East Grinstead and Uckfield", "label": "East Grinstead and Uckfield", "type": "constituency"}, + {"name": "constituency/East Ham", "label": "East Ham", "type": "constituency"}, + {"name": "constituency/East Hampshire", "label": "East Hampshire", "type": "constituency"}, + {"name": "constituency/East Kilbride and Strathaven", "label": "East Kilbride and Strathaven", "type": "constituency"}, + {"name": "constituency/East Londonderry", "label": "East Londonderry", "type": "constituency"}, + {"name": "constituency/East Renfrewshire", "label": "East Renfrewshire", "type": "constituency"}, + {"name": "constituency/East Surrey", "label": "East Surrey", "type": "constituency"}, + {"name": "constituency/East Thanet", "label": "East Thanet", "type": "constituency"}, + {"name": "constituency/East Wiltshire", "label": "East Wiltshire", "type": "constituency"}, + {"name": "constituency/East Worthing and Shoreham", "label": "East Worthing and Shoreham", "type": "constituency"}, + {"name": "constituency/Eastbourne", "label": "Eastbourne", "type": "constituency"}, + {"name": "constituency/Eastleigh", "label": "Eastleigh", "type": "constituency"}, + {"name": "constituency/Edinburgh East and Musselburgh", "label": "Edinburgh East and Musselburgh", "type": "constituency"}, + {"name": "constituency/Edinburgh North and Leith", "label": "Edinburgh North and Leith", "type": "constituency"}, + {"name": "constituency/Edinburgh South", "label": "Edinburgh South", "type": "constituency"}, + {"name": "constituency/Edinburgh South West", "label": "Edinburgh South West", "type": "constituency"}, + {"name": "constituency/Edinburgh West", "label": "Edinburgh West", "type": "constituency"}, + {"name": "constituency/Edmonton and Winchmore Hill", "label": "Edmonton and Winchmore Hill", "type": "constituency"}, + {"name": "constituency/Ellesmere Port and Bromborough", "label": "Ellesmere Port and Bromborough", "type": "constituency"}, + {"name": "constituency/Eltham and Chislehurst", "label": "Eltham and Chislehurst", "type": "constituency"}, + {"name": "constituency/Ely and East Cambridgeshire", "label": "Ely and East Cambridgeshire", "type": "constituency"}, + {"name": "constituency/Enfield North", "label": "Enfield North", "type": "constituency"}, + {"name": "constituency/Epping Forest", "label": "Epping Forest", "type": "constituency"}, + {"name": "constituency/Epsom and Ewell", "label": "Epsom and Ewell", "type": "constituency"}, + {"name": "constituency/Erewash", "label": "Erewash", "type": "constituency"}, + {"name": "constituency/Erith and Thamesmead", "label": "Erith and Thamesmead", "type": "constituency"}, + {"name": "constituency/Esher and Walton", "label": "Esher and Walton", "type": "constituency"}, + {"name": "constituency/Exeter", "label": "Exeter", "type": "constituency"}, + {"name": "constituency/Exmouth and Exeter East", "label": "Exmouth and Exeter East", "type": "constituency"}, + {"name": "constituency/Falkirk", "label": "Falkirk", "type": "constituency"}, + {"name": "constituency/Fareham and Waterlooville", "label": "Fareham and Waterlooville", "type": "constituency"}, + {"name": "constituency/Farnham and Bordon", "label": "Farnham and Bordon", "type": "constituency"}, + {"name": "constituency/Faversham and Mid Kent", "label": "Faversham and Mid Kent", "type": "constituency"}, + {"name": "constituency/Feltham and Heston", "label": "Feltham and Heston", "type": "constituency"}, + {"name": "constituency/Fermanagh and South Tyrone", "label": "Fermanagh and South Tyrone", "type": "constituency"}, + {"name": "constituency/Filton and Bradley Stoke", "label": "Filton and Bradley Stoke", "type": "constituency"}, + {"name": "constituency/Finchley and Golders Green", "label": "Finchley and Golders Green", "type": "constituency"}, + {"name": "constituency/Folkestone and Hythe", "label": "Folkestone and Hythe", "type": "constituency"}, + {"name": "constituency/Forest of Dean", "label": "Forest of Dean", "type": "constituency"}, + {"name": "constituency/Foyle", "label": "Foyle", "type": "constituency"}, + {"name": "constituency/Frome and East Somerset", "label": "Frome and East Somerset", "type": "constituency"}, + {"name": "constituency/Fylde", "label": "Fylde", "type": "constituency"}, + {"name": "constituency/Gainsborough", "label": "Gainsborough", "type": "constituency"}, + {"name": "constituency/Gateshead Central and Whickham", "label": "Gateshead Central and Whickham", "type": "constituency"}, + {"name": "constituency/Gedling", "label": "Gedling", "type": "constituency"}, + {"name": "constituency/Gillingham and Rainham", "label": "Gillingham and Rainham", "type": "constituency"}, + {"name": "constituency/Glasgow East", "label": "Glasgow East", "type": "constituency"}, + {"name": "constituency/Glasgow North", "label": "Glasgow North", "type": "constituency"}, + {"name": "constituency/Glasgow North East", "label": "Glasgow North East", "type": "constituency"}, + {"name": "constituency/Glasgow South", "label": "Glasgow South", "type": "constituency"}, + {"name": "constituency/Glasgow South West", "label": "Glasgow South West", "type": "constituency"}, + {"name": "constituency/Glasgow West", "label": "Glasgow West", "type": "constituency"}, + {"name": "constituency/Glastonbury and Somerton", "label": "Glastonbury and Somerton", "type": "constituency"}, + {"name": "constituency/Glenrothes and Mid Fife", "label": "Glenrothes and Mid Fife", "type": "constituency"}, + {"name": "constituency/Gloucester", "label": "Gloucester", "type": "constituency"}, + {"name": "constituency/Godalming and Ash", "label": "Godalming and Ash", "type": "constituency"}, + {"name": "constituency/Goole and Pocklington", "label": "Goole and Pocklington", "type": "constituency"}, + {"name": "constituency/Gordon and Buchan", "label": "Gordon and Buchan", "type": "constituency"}, + {"name": "constituency/Gorton and Denton", "label": "Gorton and Denton", "type": "constituency"}, + {"name": "constituency/Gosport", "label": "Gosport", "type": "constituency"}, + {"name": "constituency/Gower", "label": "Gower", "type": "constituency"}, + {"name": "constituency/Grantham and Bourne", "label": "Grantham and Bourne", "type": "constituency"}, + {"name": "constituency/Gravesham", "label": "Gravesham", "type": "constituency"}, + {"name": "constituency/Great Grimsby and Cleethorpes", "label": "Great Grimsby and Cleethorpes", "type": "constituency"}, + {"name": "constituency/Great Yarmouth", "label": "Great Yarmouth", "type": "constituency"}, + {"name": "constituency/Greenwich and Woolwich", "label": "Greenwich and Woolwich", "type": "constituency"}, + {"name": "constituency/Guildford", "label": "Guildford", "type": "constituency"}, + {"name": "constituency/Hackney North and Stoke Newington", "label": "Hackney North and Stoke Newington", "type": "constituency"}, + {"name": "constituency/Hackney South and Shoreditch", "label": "Hackney South and Shoreditch", "type": "constituency"}, + {"name": "constituency/Halesowen", "label": "Halesowen", "type": "constituency"}, + {"name": "constituency/Halifax", "label": "Halifax", "type": "constituency"}, + {"name": "constituency/Hamble Valley", "label": "Hamble Valley", "type": "constituency"}, + {"name": "constituency/Hamilton and Clyde Valley", "label": "Hamilton and Clyde Valley", "type": "constituency"}, + {"name": "constituency/Hammersmith and Chiswick", "label": "Hammersmith and Chiswick", "type": "constituency"}, + {"name": "constituency/Hampstead and Highgate", "label": "Hampstead and Highgate", "type": "constituency"}, + {"name": "constituency/Harborough, Oadby and Wigston", "label": "Harborough, Oadby and Wigston", "type": "constituency"}, + {"name": "constituency/Harlow", "label": "Harlow", "type": "constituency"}, + {"name": "constituency/Harpenden and Berkhamsted", "label": "Harpenden and Berkhamsted", "type": "constituency"}, + {"name": "constituency/Harrogate and Knaresborough", "label": "Harrogate and Knaresborough", "type": "constituency"}, + {"name": "constituency/Harrow East", "label": "Harrow East", "type": "constituency"}, + {"name": "constituency/Harrow West", "label": "Harrow West", "type": "constituency"}, + {"name": "constituency/Hartlepool", "label": "Hartlepool", "type": "constituency"}, + {"name": "constituency/Harwich and North Essex", "label": "Harwich and North Essex", "type": "constituency"}, + {"name": "constituency/Hastings and Rye", "label": "Hastings and Rye", "type": "constituency"}, + {"name": "constituency/Havant", "label": "Havant", "type": "constituency"}, + {"name": "constituency/Hayes and Harlington", "label": "Hayes and Harlington", "type": "constituency"}, + {"name": "constituency/Hazel Grove", "label": "Hazel Grove", "type": "constituency"}, + {"name": "constituency/Hemel Hempstead", "label": "Hemel Hempstead", "type": "constituency"}, + {"name": "constituency/Hendon", "label": "Hendon", "type": "constituency"}, + {"name": "constituency/Henley and Thame", "label": "Henley and Thame", "type": "constituency"}, + {"name": "constituency/Hereford and South Herefordshire", "label": "Hereford and South Herefordshire", "type": "constituency"}, + {"name": "constituency/Herne Bay and Sandwich", "label": "Herne Bay and Sandwich", "type": "constituency"}, + {"name": "constituency/Hertford and Stortford", "label": "Hertford and Stortford", "type": "constituency"}, + {"name": "constituency/Hertsmere", "label": "Hertsmere", "type": "constituency"}, + {"name": "constituency/Hexham", "label": "Hexham", "type": "constituency"}, + {"name": "constituency/Heywood and Middleton North", "label": "Heywood and Middleton North", "type": "constituency"}, + {"name": "constituency/High Peak", "label": "High Peak", "type": "constituency"}, + {"name": "constituency/Hinckley and Bosworth", "label": "Hinckley and Bosworth", "type": "constituency"}, + {"name": "constituency/Hitchin", "label": "Hitchin", "type": "constituency"}, + {"name": "constituency/Holborn and St Pancras", "label": "Holborn and St Pancras", "type": "constituency"}, + {"name": "constituency/Honiton and Sidmouth", "label": "Honiton and Sidmouth", "type": "constituency"}, + {"name": "constituency/Hornchurch and Upminster", "label": "Hornchurch and Upminster", "type": "constituency"}, + {"name": "constituency/Hornsey and Friern Barnet", "label": "Hornsey and Friern Barnet", "type": "constituency"}, + {"name": "constituency/Horsham", "label": "Horsham", "type": "constituency"}, + {"name": "constituency/Houghton and Sunderland South", "label": "Houghton and Sunderland South", "type": "constituency"}, + {"name": "constituency/Hove and Portslade", "label": "Hove and Portslade", "type": "constituency"}, + {"name": "constituency/Huddersfield", "label": "Huddersfield", "type": "constituency"}, + {"name": "constituency/Huntingdon", "label": "Huntingdon", "type": "constituency"}, + {"name": "constituency/Hyndburn", "label": "Hyndburn", "type": "constituency"}, + {"name": "constituency/Ilford North", "label": "Ilford North", "type": "constituency"}, + {"name": "constituency/Ilford South", "label": "Ilford South", "type": "constituency"}, + {"name": "constituency/Inverclyde and Renfrewshire West", "label": "Inverclyde and Renfrewshire West", "type": "constituency"}, + {"name": "constituency/Inverness, Skye and West Ross-shire", "label": "Inverness, Skye and West Ross-shire", "type": "constituency"}, + {"name": "constituency/Ipswich", "label": "Ipswich", "type": "constituency"}, + {"name": "constituency/Isle of Wight East", "label": "Isle of Wight East", "type": "constituency"}, + {"name": "constituency/Isle of Wight West", "label": "Isle of Wight West", "type": "constituency"}, + {"name": "constituency/Islington North", "label": "Islington North", "type": "constituency"}, + {"name": "constituency/Islington South and Finsbury", "label": "Islington South and Finsbury", "type": "constituency"}, + {"name": "constituency/Jarrow and Gateshead East", "label": "Jarrow and Gateshead East", "type": "constituency"}, + {"name": "constituency/Keighley and Ilkley", "label": "Keighley and Ilkley", "type": "constituency"}, + {"name": "constituency/Kenilworth and Southam", "label": "Kenilworth and Southam", "type": "constituency"}, + {"name": "constituency/Kensington and Bayswater", "label": "Kensington and Bayswater", "type": "constituency"}, + {"name": "constituency/Kettering", "label": "Kettering", "type": "constituency"}, + {"name": "constituency/Kilmarnock and Loudoun", "label": "Kilmarnock and Loudoun", "type": "constituency"}, + {"name": "constituency/Kingston and Surbiton", "label": "Kingston and Surbiton", "type": "constituency"}, + {"name": "constituency/Kingston upon Hull East", "label": "Kingston upon Hull East", "type": "constituency"}, + {"name": "constituency/Kingston upon Hull North and Cottingham", "label": "Kingston upon Hull North and Cottingham", "type": "constituency"}, + {"name": "constituency/Kingston upon Hull West and Haltemprice", "label": "Kingston upon Hull West and Haltemprice", "type": "constituency"}, + {"name": "constituency/Kingswinford and South Staffordshire", "label": "Kingswinford and South Staffordshire", "type": "constituency"}, + {"name": "constituency/Knowsley", "label": "Knowsley", "type": "constituency"}, + {"name": "constituency/Lagan Valley", "label": "Lagan Valley", "type": "constituency"}, + {"name": "constituency/Lancaster and Wyre", "label": "Lancaster and Wyre", "type": "constituency"}, + {"name": "constituency/Leeds Central and Headingley", "label": "Leeds Central and Headingley", "type": "constituency"}, + {"name": "constituency/Leeds East", "label": "Leeds East", "type": "constituency"}, + {"name": "constituency/Leeds North East", "label": "Leeds North East", "type": "constituency"}, + {"name": "constituency/Leeds North West", "label": "Leeds North West", "type": "constituency"}, + {"name": "constituency/Leeds South", "label": "Leeds South", "type": "constituency"}, + {"name": "constituency/Leeds South West and Morley", "label": "Leeds South West and Morley", "type": "constituency"}, + {"name": "constituency/Leeds West and Pudsey", "label": "Leeds West and Pudsey", "type": "constituency"}, + {"name": "constituency/Leicester East", "label": "Leicester East", "type": "constituency"}, + {"name": "constituency/Leicester South", "label": "Leicester South", "type": "constituency"}, + {"name": "constituency/Leicester West", "label": "Leicester West", "type": "constituency"}, + {"name": "constituency/Leigh and Atherton", "label": "Leigh and Atherton", "type": "constituency"}, + {"name": "constituency/Lewes", "label": "Lewes", "type": "constituency"}, + {"name": "constituency/Lewisham East", "label": "Lewisham East", "type": "constituency"}, + {"name": "constituency/Lewisham North", "label": "Lewisham North", "type": "constituency"}, + {"name": "constituency/Lewisham West and East Dulwich", "label": "Lewisham West and East Dulwich", "type": "constituency"}, + {"name": "constituency/Leyton and Wanstead", "label": "Leyton and Wanstead", "type": "constituency"}, + {"name": "constituency/Lichfield", "label": "Lichfield", "type": "constituency"}, + {"name": "constituency/Lincoln", "label": "Lincoln", "type": "constituency"}, + {"name": "constituency/Liverpool Garston", "label": "Liverpool Garston", "type": "constituency"}, + {"name": "constituency/Liverpool Riverside", "label": "Liverpool Riverside", "type": "constituency"}, + {"name": "constituency/Liverpool Walton", "label": "Liverpool Walton", "type": "constituency"}, + {"name": "constituency/Liverpool Wavertree", "label": "Liverpool Wavertree", "type": "constituency"}, + {"name": "constituency/Liverpool West Derby", "label": "Liverpool West Derby", "type": "constituency"}, + {"name": "constituency/Livingston", "label": "Livingston", "type": "constituency"}, + {"name": "constituency/Llanelli", "label": "Llanelli", "type": "constituency"}, + {"name": "constituency/Lothian East", "label": "Lothian East", "type": "constituency"}, + {"name": "constituency/Loughborough", "label": "Loughborough", "type": "constituency"}, + {"name": "constituency/Louth and Horncastle", "label": "Louth and Horncastle", "type": "constituency"}, + {"name": "constituency/Lowestoft", "label": "Lowestoft", "type": "constituency"}, + {"name": "constituency/Luton North", "label": "Luton North", "type": "constituency"}, + {"name": "constituency/Luton South and South Bedfordshire", "label": "Luton South and South Bedfordshire", "type": "constituency"}, + {"name": "constituency/Macclesfield", "label": "Macclesfield", "type": "constituency"}, + {"name": "constituency/Maidenhead", "label": "Maidenhead", "type": "constituency"}, + {"name": "constituency/Maidstone and Malling", "label": "Maidstone and Malling", "type": "constituency"}, + {"name": "constituency/Makerfield", "label": "Makerfield", "type": "constituency"}, + {"name": "constituency/Maldon", "label": "Maldon", "type": "constituency"}, + {"name": "constituency/Manchester Central", "label": "Manchester Central", "type": "constituency"}, + {"name": "constituency/Manchester Rusholme", "label": "Manchester Rusholme", "type": "constituency"}, + {"name": "constituency/Manchester Withington", "label": "Manchester Withington", "type": "constituency"}, + {"name": "constituency/Mansfield", "label": "Mansfield", "type": "constituency"}, + {"name": "constituency/Melksham and Devizes", "label": "Melksham and Devizes", "type": "constituency"}, + {"name": "constituency/Melton and Syston", "label": "Melton and Syston", "type": "constituency"}, + {"name": "constituency/Meriden and Solihull East", "label": "Meriden and Solihull East", "type": "constituency"}, + {"name": "constituency/Merthyr Tydfil and Aberdare", "label": "Merthyr Tydfil and Aberdare", "type": "constituency"}, + {"name": "constituency/Mid Bedfordshire", "label": "Mid Bedfordshire", "type": "constituency"}, + {"name": "constituency/Mid Buckinghamshire", "label": "Mid Buckinghamshire", "type": "constituency"}, + {"name": "constituency/Mid Cheshire", "label": "Mid Cheshire", "type": "constituency"}, + {"name": "constituency/Mid Derbyshire", "label": "Mid Derbyshire", "type": "constituency"}, + {"name": "constituency/Mid Dorset and North Poole", "label": "Mid Dorset and North Poole", "type": "constituency"}, + {"name": "constituency/Mid Dunbartonshire", "label": "Mid Dunbartonshire", "type": "constituency"}, + {"name": "constituency/Mid Leicestershire", "label": "Mid Leicestershire", "type": "constituency"}, + {"name": "constituency/Mid Norfolk", "label": "Mid Norfolk", "type": "constituency"}, + {"name": "constituency/Mid Sussex", "label": "Mid Sussex", "type": "constituency"}, + {"name": "constituency/Mid Ulster", "label": "Mid Ulster", "type": "constituency"}, + {"name": "constituency/Mid and South Pembrokeshire", "label": "Mid and South Pembrokeshire", "type": "constituency"}, + {"name": "constituency/Middlesbrough South and East Cleveland", "label": "Middlesbrough South and East Cleveland", "type": "constituency"}, + {"name": "constituency/Middlesbrough and Thornaby East", "label": "Middlesbrough and Thornaby East", "type": "constituency"}, + {"name": "constituency/Midlothian", "label": "Midlothian", "type": "constituency"}, + {"name": "constituency/Milton Keynes Central", "label": "Milton Keynes Central", "type": "constituency"}, + {"name": "constituency/Milton Keynes North", "label": "Milton Keynes North", "type": "constituency"}, + {"name": "constituency/Mitcham and Morden", "label": "Mitcham and Morden", "type": "constituency"}, + {"name": "constituency/Monmouthshire", "label": "Monmouthshire", "type": "constituency"}, + {"name": "constituency/Montgomeryshire and Glyndwr", "label": "Montgomeryshire and Glyndwr", "type": "constituency"}, + {"name": "constituency/Moray West, Nairn and Strathspey", "label": "Moray West, Nairn and Strathspey", "type": "constituency"}, + {"name": "constituency/Morecambe and Lunesdale", "label": "Morecambe and Lunesdale", "type": "constituency"}, + {"name": "constituency/Motherwell, Wishaw and Carluke", "label": "Motherwell, Wishaw and Carluke", "type": "constituency"}, + {"name": "constituency/Na h-Eileanan an Iar", "label": "Na h-Eileanan an Iar", "type": "constituency"}, + {"name": "constituency/Neath and Swansea East", "label": "Neath and Swansea East", "type": "constituency"}, + {"name": "constituency/New Forest East", "label": "New Forest East", "type": "constituency"}, + {"name": "constituency/New Forest West", "label": "New Forest West", "type": "constituency"}, + {"name": "constituency/Newark", "label": "Newark", "type": "constituency"}, + {"name": "constituency/Newbury", "label": "Newbury", "type": "constituency"}, + {"name": "constituency/Newcastle upon Tyne Central and West", "label": "Newcastle upon Tyne Central and West", "type": "constituency"}, + {"name": "constituency/Newcastle upon Tyne East and Wallsend", "label": "Newcastle upon Tyne East and Wallsend", "type": "constituency"}, + {"name": "constituency/Newcastle upon Tyne North", "label": "Newcastle upon Tyne North", "type": "constituency"}, + {"name": "constituency/Newcastle-under-Lyme", "label": "Newcastle-under-Lyme", "type": "constituency"}, + {"name": "constituency/Newport East", "label": "Newport East", "type": "constituency"}, + {"name": "constituency/Newport West and Islwyn", "label": "Newport West and Islwyn", "type": "constituency"}, + {"name": "constituency/Newry and Armagh", "label": "Newry and Armagh", "type": "constituency"}, + {"name": "constituency/Newton Abbot", "label": "Newton Abbot", "type": "constituency"}, + {"name": "constituency/Newton Aycliffe and Spennymoor", "label": "Newton Aycliffe and Spennymoor", "type": "constituency"}, + {"name": "constituency/Normanton and Hemsworth", "label": "Normanton and Hemsworth", "type": "constituency"}, + {"name": "constituency/North Antrim", "label": "North Antrim", "type": "constituency"}, + {"name": "constituency/North Ayrshire and Arran", "label": "North Ayrshire and Arran", "type": "constituency"}, + {"name": "constituency/North Bedfordshire", "label": "North Bedfordshire", "type": "constituency"}, + {"name": "constituency/North Cornwall", "label": "North Cornwall", "type": "constituency"}, + {"name": "constituency/North Cotswolds", "label": "North Cotswolds", "type": "constituency"}, + {"name": "constituency/North Devon", "label": "North Devon", "type": "constituency"}, + {"name": "constituency/North Dorset", "label": "North Dorset", "type": "constituency"}, + {"name": "constituency/North Down", "label": "North Down", "type": "constituency"}, + {"name": "constituency/North Durham", "label": "North Durham", "type": "constituency"}, + {"name": "constituency/North East Cambridgeshire", "label": "North East Cambridgeshire", "type": "constituency"}, + {"name": "constituency/North East Derbyshire", "label": "North East Derbyshire", "type": "constituency"}, + {"name": "constituency/North East Fife", "label": "North East Fife", "type": "constituency"}, + {"name": "constituency/North East Hampshire", "label": "North East Hampshire", "type": "constituency"}, + {"name": "constituency/North East Hertfordshire", "label": "North East Hertfordshire", "type": "constituency"}, + {"name": "constituency/North East Somerset and Hanham", "label": "North East Somerset and Hanham", "type": "constituency"}, + {"name": "constituency/North Herefordshire", "label": "North Herefordshire", "type": "constituency"}, + {"name": "constituency/North Norfolk", "label": "North Norfolk", "type": "constituency"}, + {"name": "constituency/North Northumberland", "label": "North Northumberland", "type": "constituency"}, + {"name": "constituency/North Shropshire", "label": "North Shropshire", "type": "constituency"}, + {"name": "constituency/North Somerset", "label": "North Somerset", "type": "constituency"}, + {"name": "constituency/North Warwickshire and Bedworth", "label": "North Warwickshire and Bedworth", "type": "constituency"}, + {"name": "constituency/North West Cambridgeshire", "label": "North West Cambridgeshire", "type": "constituency"}, + {"name": "constituency/North West Essex", "label": "North West Essex", "type": "constituency"}, + {"name": "constituency/North West Hampshire", "label": "North West Hampshire", "type": "constituency"}, + {"name": "constituency/North West Leicestershire", "label": "North West Leicestershire", "type": "constituency"}, + {"name": "constituency/North West Norfolk", "label": "North West Norfolk", "type": "constituency"}, + {"name": "constituency/Northampton North", "label": "Northampton North", "type": "constituency"}, + {"name": "constituency/Northampton South", "label": "Northampton South", "type": "constituency"}, + {"name": "constituency/Norwich North", "label": "Norwich North", "type": "constituency"}, + {"name": "constituency/Norwich South", "label": "Norwich South", "type": "constituency"}, + {"name": "constituency/Nottingham East", "label": "Nottingham East", "type": "constituency"}, + {"name": "constituency/Nottingham North and Kimberley", "label": "Nottingham North and Kimberley", "type": "constituency"}, + {"name": "constituency/Nottingham South", "label": "Nottingham South", "type": "constituency"}, + {"name": "constituency/Nuneaton", "label": "Nuneaton", "type": "constituency"}, + {"name": "constituency/Old Bexley and Sidcup", "label": "Old Bexley and Sidcup", "type": "constituency"}, + {"name": "constituency/Oldham East and Saddleworth", "label": "Oldham East and Saddleworth", "type": "constituency"}, + {"name": "constituency/Oldham West, Chadderton and Royton", "label": "Oldham West, Chadderton and Royton", "type": "constituency"}, + {"name": "constituency/Orkney and Shetland", "label": "Orkney and Shetland", "type": "constituency"}, + {"name": "constituency/Orpington", "label": "Orpington", "type": "constituency"}, + {"name": "constituency/Ossett and Denby Dale", "label": "Ossett and Denby Dale", "type": "constituency"}, + {"name": "constituency/Oxford East", "label": "Oxford East", "type": "constituency"}, + {"name": "constituency/Oxford West and Abingdon", "label": "Oxford West and Abingdon", "type": "constituency"}, + {"name": "constituency/Paisley and Renfrewshire North", "label": "Paisley and Renfrewshire North", "type": "constituency"}, + {"name": "constituency/Paisley and Renfrewshire South", "label": "Paisley and Renfrewshire South", "type": "constituency"}, + {"name": "constituency/Peckham", "label": "Peckham", "type": "constituency"}, + {"name": "constituency/Pendle and Clitheroe", "label": "Pendle and Clitheroe", "type": "constituency"}, + {"name": "constituency/Penistone and Stocksbridge", "label": "Penistone and Stocksbridge", "type": "constituency"}, + {"name": "constituency/Penrith and Solway", "label": "Penrith and Solway", "type": "constituency"}, + {"name": "constituency/Perth and Kinross-shire", "label": "Perth and Kinross-shire", "type": "constituency"}, + {"name": "constituency/Peterborough", "label": "Peterborough", "type": "constituency"}, + {"name": "constituency/Plymouth Moor View", "label": "Plymouth Moor View", "type": "constituency"}, + {"name": "constituency/Plymouth Sutton and Devonport", "label": "Plymouth Sutton and Devonport", "type": "constituency"}, + {"name": "constituency/Pontefract, Castleford and Knottingley", "label": "Pontefract, Castleford and Knottingley", "type": "constituency"}, + {"name": "constituency/Pontypridd", "label": "Pontypridd", "type": "constituency"}, + {"name": "constituency/Poole", "label": "Poole", "type": "constituency"}, + {"name": "constituency/Poplar and Limehouse", "label": "Poplar and Limehouse", "type": "constituency"}, + {"name": "constituency/Portsmouth North", "label": "Portsmouth North", "type": "constituency"}, + {"name": "constituency/Portsmouth South", "label": "Portsmouth South", "type": "constituency"}, + {"name": "constituency/Preston", "label": "Preston", "type": "constituency"}, + {"name": "constituency/Putney", "label": "Putney", "type": "constituency"}, + {"name": "constituency/Queen's Park and Maida Vale", "label": "Queen's Park and Maida Vale", "type": "constituency"}, + {"name": "constituency/Rawmarsh and Conisbrough", "label": "Rawmarsh and Conisbrough", "type": "constituency"}, + {"name": "constituency/Rayleigh and Wickford", "label": "Rayleigh and Wickford", "type": "constituency"}, + {"name": "constituency/Reading Central", "label": "Reading Central", "type": "constituency"}, + {"name": "constituency/Reading West and Mid Berkshire", "label": "Reading West and Mid Berkshire", "type": "constituency"}, + {"name": "constituency/Redcar", "label": "Redcar", "type": "constituency"}, + {"name": "constituency/Redditch", "label": "Redditch", "type": "constituency"}, + {"name": "constituency/Reigate", "label": "Reigate", "type": "constituency"}, + {"name": "constituency/Rhondda and Ogmore", "label": "Rhondda and Ogmore", "type": "constituency"}, + {"name": "constituency/Ribble Valley", "label": "Ribble Valley", "type": "constituency"}, + {"name": "constituency/Richmond Park", "label": "Richmond Park", "type": "constituency"}, + {"name": "constituency/Richmond and Northallerton", "label": "Richmond and Northallerton", "type": "constituency"}, + {"name": "constituency/Rochdale", "label": "Rochdale", "type": "constituency"}, + {"name": "constituency/Rochester and Strood", "label": "Rochester and Strood", "type": "constituency"}, + {"name": "constituency/Romford", "label": "Romford", "type": "constituency"}, + {"name": "constituency/Romsey and Southampton North", "label": "Romsey and Southampton North", "type": "constituency"}, + {"name": "constituency/Rossendale and Darwen", "label": "Rossendale and Darwen", "type": "constituency"}, + {"name": "constituency/Rother Valley", "label": "Rother Valley", "type": "constituency"}, + {"name": "constituency/Rotherham", "label": "Rotherham", "type": "constituency"}, + {"name": "constituency/Rugby", "label": "Rugby", "type": "constituency"}, + {"name": "constituency/Ruislip, Northwood and Pinner", "label": "Ruislip, Northwood and Pinner", "type": "constituency"}, + {"name": "constituency/Runcorn and Helsby", "label": "Runcorn and Helsby", "type": "constituency"}, + {"name": "constituency/Runnymede and Weybridge", "label": "Runnymede and Weybridge", "type": "constituency"}, + {"name": "constituency/Rushcliffe", "label": "Rushcliffe", "type": "constituency"}, + {"name": "constituency/Rutherglen", "label": "Rutherglen", "type": "constituency"}, + {"name": "constituency/Rutland and Stamford", "label": "Rutland and Stamford", "type": "constituency"}, + {"name": "constituency/Salford", "label": "Salford", "type": "constituency"}, + {"name": "constituency/Salisbury", "label": "Salisbury", "type": "constituency"}, + {"name": "constituency/Scarborough and Whitby", "label": "Scarborough and Whitby", "type": "constituency"}, + {"name": "constituency/Scunthorpe", "label": "Scunthorpe", "type": "constituency"}, + {"name": "constituency/Sefton Central", "label": "Sefton Central", "type": "constituency"}, + {"name": "constituency/Selby", "label": "Selby", "type": "constituency"}, + {"name": "constituency/Sevenoaks", "label": "Sevenoaks", "type": "constituency"}, + {"name": "constituency/Sheffield Brightside and Hillsborough", "label": "Sheffield Brightside and Hillsborough", "type": "constituency"}, + {"name": "constituency/Sheffield Central", "label": "Sheffield Central", "type": "constituency"}, + {"name": "constituency/Sheffield Hallam", "label": "Sheffield Hallam", "type": "constituency"}, + {"name": "constituency/Sheffield Heeley", "label": "Sheffield Heeley", "type": "constituency"}, + {"name": "constituency/Sheffield South East", "label": "Sheffield South East", "type": "constituency"}, + {"name": "constituency/Sherwood Forest", "label": "Sherwood Forest", "type": "constituency"}, + {"name": "constituency/Shipley", "label": "Shipley", "type": "constituency"}, + {"name": "constituency/Shrewsbury", "label": "Shrewsbury", "type": "constituency"}, + {"name": "constituency/Sittingbourne and Sheppey", "label": "Sittingbourne and Sheppey", "type": "constituency"}, + {"name": "constituency/Skipton and Ripon", "label": "Skipton and Ripon", "type": "constituency"}, + {"name": "constituency/Sleaford and North Hykeham", "label": "Sleaford and North Hykeham", "type": "constituency"}, + {"name": "constituency/Slough", "label": "Slough", "type": "constituency"}, + {"name": "constituency/Smethwick", "label": "Smethwick", "type": "constituency"}, + {"name": "constituency/Solihull West and Shirley", "label": "Solihull West and Shirley", "type": "constituency"}, + {"name": "constituency/South Antrim", "label": "South Antrim", "type": "constituency"}, + {"name": "constituency/South Basildon and East Thurrock", "label": "South Basildon and East Thurrock", "type": "constituency"}, + {"name": "constituency/South Cambridgeshire", "label": "South Cambridgeshire", "type": "constituency"}, + {"name": "constituency/South Cotswolds", "label": "South Cotswolds", "type": "constituency"}, + {"name": "constituency/South Derbyshire", "label": "South Derbyshire", "type": "constituency"}, + {"name": "constituency/South Devon", "label": "South Devon", "type": "constituency"}, + {"name": "constituency/South Dorset", "label": "South Dorset", "type": "constituency"}, + {"name": "constituency/South Down", "label": "South Down", "type": "constituency"}, + {"name": "constituency/South East Cornwall", "label": "South East Cornwall", "type": "constituency"}, + {"name": "constituency/South Holland and The Deepings", "label": "South Holland and The Deepings", "type": "constituency"}, + {"name": "constituency/South Leicestershire", "label": "South Leicestershire", "type": "constituency"}, + {"name": "constituency/South Norfolk", "label": "South Norfolk", "type": "constituency"}, + {"name": "constituency/South Northamptonshire", "label": "South Northamptonshire", "type": "constituency"}, + {"name": "constituency/South Ribble", "label": "South Ribble", "type": "constituency"}, + {"name": "constituency/South Shields", "label": "South Shields", "type": "constituency"}, + {"name": "constituency/South Shropshire", "label": "South Shropshire", "type": "constituency"}, + {"name": "constituency/South Suffolk", "label": "South Suffolk", "type": "constituency"}, + {"name": "constituency/South West Devon", "label": "South West Devon", "type": "constituency"}, + {"name": "constituency/South West Hertfordshire", "label": "South West Hertfordshire", "type": "constituency"}, + {"name": "constituency/South West Norfolk", "label": "South West Norfolk", "type": "constituency"}, + {"name": "constituency/South West Wiltshire", "label": "South West Wiltshire", "type": "constituency"}, + {"name": "constituency/Southampton Itchen", "label": "Southampton Itchen", "type": "constituency"}, + {"name": "constituency/Southampton Test", "label": "Southampton Test", "type": "constituency"}, + {"name": "constituency/Southend East and Rochford", "label": "Southend East and Rochford", "type": "constituency"}, + {"name": "constituency/Southend West and Leigh", "label": "Southend West and Leigh", "type": "constituency"}, + {"name": "constituency/Southgate and Wood Green", "label": "Southgate and Wood Green", "type": "constituency"}, + {"name": "constituency/Southport", "label": "Southport", "type": "constituency"}, + {"name": "constituency/Spelthorne", "label": "Spelthorne", "type": "constituency"}, + {"name": "constituency/Spen Valley", "label": "Spen Valley", "type": "constituency"}, + {"name": "constituency/St Albans", "label": "St Albans", "type": "constituency"}, + {"name": "constituency/St Austell and Newquay", "label": "St Austell and Newquay", "type": "constituency"}, + {"name": "constituency/St Helens North", "label": "St Helens North", "type": "constituency"}, + {"name": "constituency/St Helens South and Whiston", "label": "St Helens South and Whiston", "type": "constituency"}, + {"name": "constituency/St Ives", "label": "St Ives", "type": "constituency"}, + {"name": "constituency/St Neots and Mid Cambridgeshire", "label": "St Neots and Mid Cambridgeshire", "type": "constituency"}, + {"name": "constituency/Stafford", "label": "Stafford", "type": "constituency"}, + {"name": "constituency/Staffordshire Moorlands", "label": "Staffordshire Moorlands", "type": "constituency"}, + {"name": "constituency/Stalybridge and Hyde", "label": "Stalybridge and Hyde", "type": "constituency"}, + {"name": "constituency/Stevenage", "label": "Stevenage", "type": "constituency"}, + {"name": "constituency/Stirling and Strathallan", "label": "Stirling and Strathallan", "type": "constituency"}, + {"name": "constituency/Stockport", "label": "Stockport", "type": "constituency"}, + {"name": "constituency/Stockton North", "label": "Stockton North", "type": "constituency"}, + {"name": "constituency/Stockton West", "label": "Stockton West", "type": "constituency"}, + {"name": "constituency/Stoke-on-Trent Central", "label": "Stoke-on-Trent Central", "type": "constituency"}, + {"name": "constituency/Stoke-on-Trent North", "label": "Stoke-on-Trent North", "type": "constituency"}, + {"name": "constituency/Stoke-on-Trent South", "label": "Stoke-on-Trent South", "type": "constituency"}, + {"name": "constituency/Stone, Great Wyrley and Penkridge", "label": "Stone, Great Wyrley and Penkridge", "type": "constituency"}, + {"name": "constituency/Stourbridge", "label": "Stourbridge", "type": "constituency"}, + {"name": "constituency/Strangford", "label": "Strangford", "type": "constituency"}, + {"name": "constituency/Stratford and Bow", "label": "Stratford and Bow", "type": "constituency"}, + {"name": "constituency/Stratford-on-Avon", "label": "Stratford-on-Avon", "type": "constituency"}, + {"name": "constituency/Streatham and Croydon North", "label": "Streatham and Croydon North", "type": "constituency"}, + {"name": "constituency/Stretford and Urmston", "label": "Stretford and Urmston", "type": "constituency"}, + {"name": "constituency/Stroud", "label": "Stroud", "type": "constituency"}, + {"name": "constituency/Suffolk Coastal", "label": "Suffolk Coastal", "type": "constituency"}, + {"name": "constituency/Sunderland Central", "label": "Sunderland Central", "type": "constituency"}, + {"name": "constituency/Surrey Heath", "label": "Surrey Heath", "type": "constituency"}, + {"name": "constituency/Sussex Weald", "label": "Sussex Weald", "type": "constituency"}, + {"name": "constituency/Sutton Coldfield", "label": "Sutton Coldfield", "type": "constituency"}, + {"name": "constituency/Sutton and Cheam", "label": "Sutton and Cheam", "type": "constituency"}, + {"name": "constituency/Swansea West", "label": "Swansea West", "type": "constituency"}, + {"name": "constituency/Swindon North", "label": "Swindon North", "type": "constituency"}, + {"name": "constituency/Swindon South", "label": "Swindon South", "type": "constituency"}, + {"name": "constituency/Tamworth", "label": "Tamworth", "type": "constituency"}, + {"name": "constituency/Tatton", "label": "Tatton", "type": "constituency"}, + {"name": "constituency/Taunton and Wellington", "label": "Taunton and Wellington", "type": "constituency"}, + {"name": "constituency/Telford", "label": "Telford", "type": "constituency"}, + {"name": "constituency/Tewkesbury", "label": "Tewkesbury", "type": "constituency"}, + {"name": "constituency/The Wrekin", "label": "The Wrekin", "type": "constituency"}, + {"name": "constituency/Thirsk and Malton", "label": "Thirsk and Malton", "type": "constituency"}, + {"name": "constituency/Thornbury and Yate", "label": "Thornbury and Yate", "type": "constituency"}, + {"name": "constituency/Thurrock", "label": "Thurrock", "type": "constituency"}, + {"name": "constituency/Tipton and Wednesbury", "label": "Tipton and Wednesbury", "type": "constituency"}, + {"name": "constituency/Tiverton and Minehead", "label": "Tiverton and Minehead", "type": "constituency"}, + {"name": "constituency/Tonbridge", "label": "Tonbridge", "type": "constituency"}, + {"name": "constituency/Tooting", "label": "Tooting", "type": "constituency"}, + {"name": "constituency/Torbay", "label": "Torbay", "type": "constituency"}, + {"name": "constituency/Torfaen", "label": "Torfaen", "type": "constituency"}, + {"name": "constituency/Torridge and Tavistock", "label": "Torridge and Tavistock", "type": "constituency"}, + {"name": "constituency/Tottenham", "label": "Tottenham", "type": "constituency"}, + {"name": "constituency/Truro and Falmouth", "label": "Truro and Falmouth", "type": "constituency"}, + {"name": "constituency/Tunbridge Wells", "label": "Tunbridge Wells", "type": "constituency"}, + {"name": "constituency/Twickenham", "label": "Twickenham", "type": "constituency"}, + {"name": "constituency/Tynemouth", "label": "Tynemouth", "type": "constituency"}, + {"name": "constituency/Upper Bann", "label": "Upper Bann", "type": "constituency"}, + {"name": "constituency/Uxbridge and South Ruislip", "label": "Uxbridge and South Ruislip", "type": "constituency"}, + {"name": "constituency/Vale of Glamorgan", "label": "Vale of Glamorgan", "type": "constituency"}, + {"name": "constituency/Vauxhall and Camberwell Green", "label": "Vauxhall and Camberwell Green", "type": "constituency"}, + {"name": "constituency/Wakefield and Rothwell", "label": "Wakefield and Rothwell", "type": "constituency"}, + {"name": "constituency/Wallasey", "label": "Wallasey", "type": "constituency"}, + {"name": "constituency/Walsall and Bloxwich", "label": "Walsall and Bloxwich", "type": "constituency"}, + {"name": "constituency/Walthamstow", "label": "Walthamstow", "type": "constituency"}, + {"name": "constituency/Warrington North", "label": "Warrington North", "type": "constituency"}, + {"name": "constituency/Warrington South", "label": "Warrington South", "type": "constituency"}, + {"name": "constituency/Warwick and Leamington", "label": "Warwick and Leamington", "type": "constituency"}, + {"name": "constituency/Washington and Gateshead South", "label": "Washington and Gateshead South", "type": "constituency"}, + {"name": "constituency/Watford", "label": "Watford", "type": "constituency"}, + {"name": "constituency/Waveney Valley", "label": "Waveney Valley", "type": "constituency"}, + {"name": "constituency/Weald of Kent", "label": "Weald of Kent", "type": "constituency"}, + {"name": "constituency/Wellingborough and Rushden", "label": "Wellingborough and Rushden", "type": "constituency"}, + {"name": "constituency/Wells and Mendip Hills", "label": "Wells and Mendip Hills", "type": "constituency"}, + {"name": "constituency/Welwyn Hatfield", "label": "Welwyn Hatfield", "type": "constituency"}, + {"name": "constituency/West Aberdeenshire and Kincardine", "label": "West Aberdeenshire and Kincardine", "type": "constituency"}, + {"name": "constituency/West Bromwich", "label": "West Bromwich", "type": "constituency"}, + {"name": "constituency/West Dorset", "label": "West Dorset", "type": "constituency"}, + {"name": "constituency/West Dunbartonshire", "label": "West Dunbartonshire", "type": "constituency"}, + {"name": "constituency/West Ham and Beckton", "label": "West Ham and Beckton", "type": "constituency"}, + {"name": "constituency/West Lancashire", "label": "West Lancashire", "type": "constituency"}, + {"name": "constituency/West Suffolk", "label": "West Suffolk", "type": "constituency"}, + {"name": "constituency/West Tyrone", "label": "West Tyrone", "type": "constituency"}, + {"name": "constituency/West Worcestershire", "label": "West Worcestershire", "type": "constituency"}, + {"name": "constituency/Westmorland and Lonsdale", "label": "Westmorland and Lonsdale", "type": "constituency"}, + {"name": "constituency/Weston-super-Mare", "label": "Weston-super-Mare", "type": "constituency"}, + {"name": "constituency/Wetherby and Easingwold", "label": "Wetherby and Easingwold", "type": "constituency"}, + {"name": "constituency/Whitehaven and Workington", "label": "Whitehaven and Workington", "type": "constituency"}, + {"name": "constituency/Widnes and Halewood", "label": "Widnes and Halewood", "type": "constituency"}, + {"name": "constituency/Wigan", "label": "Wigan", "type": "constituency"}, + {"name": "constituency/Wimbledon", "label": "Wimbledon", "type": "constituency"}, + {"name": "constituency/Winchester", "label": "Winchester", "type": "constituency"}, + {"name": "constituency/Windsor", "label": "Windsor", "type": "constituency"}, + {"name": "constituency/Wirral West", "label": "Wirral West", "type": "constituency"}, + {"name": "constituency/Witham", "label": "Witham", "type": "constituency"}, + {"name": "constituency/Witney", "label": "Witney", "type": "constituency"}, + {"name": "constituency/Woking", "label": "Woking", "type": "constituency"}, + {"name": "constituency/Wokingham", "label": "Wokingham", "type": "constituency"}, + {"name": "constituency/Wolverhampton North East", "label": "Wolverhampton North East", "type": "constituency"}, + {"name": "constituency/Wolverhampton South East", "label": "Wolverhampton South East", "type": "constituency"}, + {"name": "constituency/Wolverhampton West", "label": "Wolverhampton West", "type": "constituency"}, + {"name": "constituency/Worcester", "label": "Worcester", "type": "constituency"}, + {"name": "constituency/Worsley and Eccles", "label": "Worsley and Eccles", "type": "constituency"}, + {"name": "constituency/Worthing West", "label": "Worthing West", "type": "constituency"}, + {"name": "constituency/Wrexham", "label": "Wrexham", "type": "constituency"}, + {"name": "constituency/Wycombe", "label": "Wycombe", "type": "constituency"}, + {"name": "constituency/Wyre Forest", "label": "Wyre Forest", "type": "constituency"}, + {"name": "constituency/Wythenshawe and Sale East", "label": "Wythenshawe and Sale East", "type": "constituency"}, + {"name": "constituency/Yeovil", "label": "Yeovil", "type": "constituency"}, + {"name": "constituency/Ynys Môn", "label": "Ynys Môn", "type": "constituency"}, + {"name": "constituency/York Central", "label": "York Central", "type": "constituency"}, + {"name": "constituency/York Outer", "label": "York Outer", "type": "constituency"}, + {"name": "local_authority/Aberdeen City", "label": "Aberdeen City", "type": "local_authority"}, + {"name": "local_authority/Aberdeenshire", "label": "Aberdeenshire", "type": "local_authority"}, + {"name": "local_authority/Adur", "label": "Adur", "type": "local_authority"}, + {"name": "local_authority/Amber Valley", "label": "Amber Valley", "type": "local_authority"}, + {"name": "local_authority/Angus", "label": "Angus", "type": "local_authority"}, + {"name": "local_authority/Antrim and Newtownabbey", "label": "Antrim and Newtownabbey", "type": "local_authority"}, + {"name": "local_authority/Ards and North Down", "label": "Ards and North Down", "type": "local_authority"}, + {"name": "local_authority/Argyll and Bute", "label": "Argyll and Bute", "type": "local_authority"}, + {"name": "local_authority/Armagh City, Banbridge and Craigavon", "label": "Armagh City, Banbridge and Craigavon", "type": "local_authority"}, + {"name": "local_authority/Arun", "label": "Arun", "type": "local_authority"}, + {"name": "local_authority/Ashfield", "label": "Ashfield", "type": "local_authority"}, + {"name": "local_authority/Ashford", "label": "Ashford", "type": "local_authority"}, + {"name": "local_authority/Babergh", "label": "Babergh", "type": "local_authority"}, + {"name": "local_authority/Barking and Dagenham", "label": "Barking and Dagenham", "type": "local_authority"}, + {"name": "local_authority/Barnet", "label": "Barnet", "type": "local_authority"}, + {"name": "local_authority/Barnsley", "label": "Barnsley", "type": "local_authority"}, + {"name": "local_authority/Basildon", "label": "Basildon", "type": "local_authority"}, + {"name": "local_authority/Basingstoke and Deane", "label": "Basingstoke and Deane", "type": "local_authority"}, + {"name": "local_authority/Bassetlaw", "label": "Bassetlaw", "type": "local_authority"}, + {"name": "local_authority/Bath and North East Somerset", "label": "Bath and North East Somerset", "type": "local_authority"}, + {"name": "local_authority/Bedford", "label": "Bedford", "type": "local_authority"}, + {"name": "local_authority/Belfast", "label": "Belfast", "type": "local_authority"}, + {"name": "local_authority/Bexley", "label": "Bexley", "type": "local_authority"}, + {"name": "local_authority/Birmingham", "label": "Birmingham", "type": "local_authority"}, + {"name": "local_authority/Blaby", "label": "Blaby", "type": "local_authority"}, + {"name": "local_authority/Blackburn with Darwen", "label": "Blackburn with Darwen", "type": "local_authority"}, + {"name": "local_authority/Blackpool", "label": "Blackpool", "type": "local_authority"}, + {"name": "local_authority/Blaenau Gwent", "label": "Blaenau Gwent", "type": "local_authority"}, + {"name": "local_authority/Bolsover", "label": "Bolsover", "type": "local_authority"}, + {"name": "local_authority/Bolton", "label": "Bolton", "type": "local_authority"}, + {"name": "local_authority/Boston", "label": "Boston", "type": "local_authority"}, + {"name": "local_authority/Bournemouth, Christchurch and Poole", "label": "Bournemouth, Christchurch and Poole", "type": "local_authority"}, + {"name": "local_authority/Bracknell Forest", "label": "Bracknell Forest", "type": "local_authority"}, + {"name": "local_authority/Bradford", "label": "Bradford", "type": "local_authority"}, + {"name": "local_authority/Braintree", "label": "Braintree", "type": "local_authority"}, + {"name": "local_authority/Breckland", "label": "Breckland", "type": "local_authority"}, + {"name": "local_authority/Brent", "label": "Brent", "type": "local_authority"}, + {"name": "local_authority/Brentwood", "label": "Brentwood", "type": "local_authority"}, + {"name": "local_authority/Bridgend", "label": "Bridgend", "type": "local_authority"}, + {"name": "local_authority/Brighton and Hove", "label": "Brighton and Hove", "type": "local_authority"}, + {"name": "local_authority/Bristol, City of", "label": "Bristol, City of", "type": "local_authority"}, + {"name": "local_authority/Broadland", "label": "Broadland", "type": "local_authority"}, + {"name": "local_authority/Bromley", "label": "Bromley", "type": "local_authority"}, + {"name": "local_authority/Bromsgrove", "label": "Bromsgrove", "type": "local_authority"}, + {"name": "local_authority/Broxbourne", "label": "Broxbourne", "type": "local_authority"}, + {"name": "local_authority/Broxtowe", "label": "Broxtowe", "type": "local_authority"}, + {"name": "local_authority/Buckinghamshire", "label": "Buckinghamshire", "type": "local_authority"}, + {"name": "local_authority/Burnley", "label": "Burnley", "type": "local_authority"}, + {"name": "local_authority/Bury", "label": "Bury", "type": "local_authority"}, + {"name": "local_authority/Caerphilly", "label": "Caerphilly", "type": "local_authority"}, + {"name": "local_authority/Calderdale", "label": "Calderdale", "type": "local_authority"}, + {"name": "local_authority/Cambridge", "label": "Cambridge", "type": "local_authority"}, + {"name": "local_authority/Camden", "label": "Camden", "type": "local_authority"}, + {"name": "local_authority/Cannock Chase", "label": "Cannock Chase", "type": "local_authority"}, + {"name": "local_authority/Canterbury", "label": "Canterbury", "type": "local_authority"}, + {"name": "local_authority/Cardiff", "label": "Cardiff", "type": "local_authority"}, + {"name": "local_authority/Carmarthenshire", "label": "Carmarthenshire", "type": "local_authority"}, + {"name": "local_authority/Castle Point", "label": "Castle Point", "type": "local_authority"}, + {"name": "local_authority/Causeway Coast and Glens", "label": "Causeway Coast and Glens", "type": "local_authority"}, + {"name": "local_authority/Central Bedfordshire", "label": "Central Bedfordshire", "type": "local_authority"}, + {"name": "local_authority/Ceredigion", "label": "Ceredigion", "type": "local_authority"}, + {"name": "local_authority/Charnwood", "label": "Charnwood", "type": "local_authority"}, + {"name": "local_authority/Chelmsford", "label": "Chelmsford", "type": "local_authority"}, + {"name": "local_authority/Cheltenham", "label": "Cheltenham", "type": "local_authority"}, + {"name": "local_authority/Cherwell", "label": "Cherwell", "type": "local_authority"}, + {"name": "local_authority/Cheshire East", "label": "Cheshire East", "type": "local_authority"}, + {"name": "local_authority/Cheshire West and Chester", "label": "Cheshire West and Chester", "type": "local_authority"}, + {"name": "local_authority/Chesterfield", "label": "Chesterfield", "type": "local_authority"}, + {"name": "local_authority/Chichester", "label": "Chichester", "type": "local_authority"}, + {"name": "local_authority/Chorley", "label": "Chorley", "type": "local_authority"}, + {"name": "local_authority/City of Edinburgh", "label": "City of Edinburgh", "type": "local_authority"}, + {"name": "local_authority/City of London", "label": "City of London", "type": "local_authority"}, + {"name": "local_authority/Clackmannanshire", "label": "Clackmannanshire", "type": "local_authority"}, + {"name": "local_authority/Colchester", "label": "Colchester", "type": "local_authority"}, + {"name": "local_authority/Conwy", "label": "Conwy", "type": "local_authority"}, + {"name": "local_authority/Cornwall", "label": "Cornwall", "type": "local_authority"}, + {"name": "local_authority/Cotswold", "label": "Cotswold", "type": "local_authority"}, + {"name": "local_authority/County Durham", "label": "County Durham", "type": "local_authority"}, + {"name": "local_authority/Coventry", "label": "Coventry", "type": "local_authority"}, + {"name": "local_authority/Crawley", "label": "Crawley", "type": "local_authority"}, + {"name": "local_authority/Croydon", "label": "Croydon", "type": "local_authority"}, + {"name": "local_authority/Cumberland", "label": "Cumberland", "type": "local_authority"}, + {"name": "local_authority/Dacorum", "label": "Dacorum", "type": "local_authority"}, + {"name": "local_authority/Darlington", "label": "Darlington", "type": "local_authority"}, + {"name": "local_authority/Dartford", "label": "Dartford", "type": "local_authority"}, + {"name": "local_authority/Denbighshire", "label": "Denbighshire", "type": "local_authority"}, + {"name": "local_authority/Derby", "label": "Derby", "type": "local_authority"}, + {"name": "local_authority/Derbyshire Dales", "label": "Derbyshire Dales", "type": "local_authority"}, + {"name": "local_authority/Derry City and Strabane", "label": "Derry City and Strabane", "type": "local_authority"}, + {"name": "local_authority/Doncaster", "label": "Doncaster", "type": "local_authority"}, + {"name": "local_authority/Dorset", "label": "Dorset", "type": "local_authority"}, + {"name": "local_authority/Dover", "label": "Dover", "type": "local_authority"}, + {"name": "local_authority/Dudley", "label": "Dudley", "type": "local_authority"}, + {"name": "local_authority/Dumfries and Galloway", "label": "Dumfries and Galloway", "type": "local_authority"}, + {"name": "local_authority/Dundee City", "label": "Dundee City", "type": "local_authority"}, + {"name": "local_authority/Ealing", "label": "Ealing", "type": "local_authority"}, + {"name": "local_authority/East Ayrshire", "label": "East Ayrshire", "type": "local_authority"}, + {"name": "local_authority/East Cambridgeshire", "label": "East Cambridgeshire", "type": "local_authority"}, + {"name": "local_authority/East Devon", "label": "East Devon", "type": "local_authority"}, + {"name": "local_authority/East Dunbartonshire", "label": "East Dunbartonshire", "type": "local_authority"}, + {"name": "local_authority/East Hampshire", "label": "East Hampshire", "type": "local_authority"}, + {"name": "local_authority/East Hertfordshire", "label": "East Hertfordshire", "type": "local_authority"}, + {"name": "local_authority/East Lindsey", "label": "East Lindsey", "type": "local_authority"}, + {"name": "local_authority/East Lothian", "label": "East Lothian", "type": "local_authority"}, + {"name": "local_authority/East Renfrewshire", "label": "East Renfrewshire", "type": "local_authority"}, + {"name": "local_authority/East Riding of Yorkshire", "label": "East Riding of Yorkshire", "type": "local_authority"}, + {"name": "local_authority/East Staffordshire", "label": "East Staffordshire", "type": "local_authority"}, + {"name": "local_authority/East Suffolk", "label": "East Suffolk", "type": "local_authority"}, + {"name": "local_authority/Eastbourne", "label": "Eastbourne", "type": "local_authority"}, + {"name": "local_authority/Eastleigh", "label": "Eastleigh", "type": "local_authority"}, + {"name": "local_authority/Elmbridge", "label": "Elmbridge", "type": "local_authority"}, + {"name": "local_authority/Enfield", "label": "Enfield", "type": "local_authority"}, + {"name": "local_authority/Epping Forest", "label": "Epping Forest", "type": "local_authority"}, + {"name": "local_authority/Epsom and Ewell", "label": "Epsom and Ewell", "type": "local_authority"}, + {"name": "local_authority/Erewash", "label": "Erewash", "type": "local_authority"}, + {"name": "local_authority/Exeter", "label": "Exeter", "type": "local_authority"}, + {"name": "local_authority/Falkirk", "label": "Falkirk", "type": "local_authority"}, + {"name": "local_authority/Fareham", "label": "Fareham", "type": "local_authority"}, + {"name": "local_authority/Fenland", "label": "Fenland", "type": "local_authority"}, + {"name": "local_authority/Fermanagh and Omagh", "label": "Fermanagh and Omagh", "type": "local_authority"}, + {"name": "local_authority/Fife", "label": "Fife", "type": "local_authority"}, + {"name": "local_authority/Flintshire", "label": "Flintshire", "type": "local_authority"}, + {"name": "local_authority/Folkestone and Hythe", "label": "Folkestone and Hythe", "type": "local_authority"}, + {"name": "local_authority/Forest of Dean", "label": "Forest of Dean", "type": "local_authority"}, + {"name": "local_authority/Fylde", "label": "Fylde", "type": "local_authority"}, + {"name": "local_authority/Gateshead", "label": "Gateshead", "type": "local_authority"}, + {"name": "local_authority/Gedling", "label": "Gedling", "type": "local_authority"}, + {"name": "local_authority/Glasgow City", "label": "Glasgow City", "type": "local_authority"}, + {"name": "local_authority/Gloucester", "label": "Gloucester", "type": "local_authority"}, + {"name": "local_authority/Gosport", "label": "Gosport", "type": "local_authority"}, + {"name": "local_authority/Gravesham", "label": "Gravesham", "type": "local_authority"}, + {"name": "local_authority/Great Yarmouth", "label": "Great Yarmouth", "type": "local_authority"}, + {"name": "local_authority/Greenwich", "label": "Greenwich", "type": "local_authority"}, + {"name": "local_authority/Guildford", "label": "Guildford", "type": "local_authority"}, + {"name": "local_authority/Gwynedd", "label": "Gwynedd", "type": "local_authority"}, + {"name": "local_authority/Hackney", "label": "Hackney", "type": "local_authority"}, + {"name": "local_authority/Halton", "label": "Halton", "type": "local_authority"}, + {"name": "local_authority/Hammersmith and Fulham", "label": "Hammersmith and Fulham", "type": "local_authority"}, + {"name": "local_authority/Harborough", "label": "Harborough", "type": "local_authority"}, + {"name": "local_authority/Haringey", "label": "Haringey", "type": "local_authority"}, + {"name": "local_authority/Harlow", "label": "Harlow", "type": "local_authority"}, + {"name": "local_authority/Harrow", "label": "Harrow", "type": "local_authority"}, + {"name": "local_authority/Hart", "label": "Hart", "type": "local_authority"}, + {"name": "local_authority/Hartlepool", "label": "Hartlepool", "type": "local_authority"}, + {"name": "local_authority/Hastings", "label": "Hastings", "type": "local_authority"}, + {"name": "local_authority/Havant", "label": "Havant", "type": "local_authority"}, + {"name": "local_authority/Havering", "label": "Havering", "type": "local_authority"}, + {"name": "local_authority/Herefordshire, County of", "label": "Herefordshire, County of", "type": "local_authority"}, + {"name": "local_authority/Hertsmere", "label": "Hertsmere", "type": "local_authority"}, + {"name": "local_authority/High Peak", "label": "High Peak", "type": "local_authority"}, + {"name": "local_authority/Highland", "label": "Highland", "type": "local_authority"}, + {"name": "local_authority/Hillingdon", "label": "Hillingdon", "type": "local_authority"}, + {"name": "local_authority/Hinckley and Bosworth", "label": "Hinckley and Bosworth", "type": "local_authority"}, + {"name": "local_authority/Horsham", "label": "Horsham", "type": "local_authority"}, + {"name": "local_authority/Hounslow", "label": "Hounslow", "type": "local_authority"}, + {"name": "local_authority/Huntingdonshire", "label": "Huntingdonshire", "type": "local_authority"}, + {"name": "local_authority/Hyndburn", "label": "Hyndburn", "type": "local_authority"}, + {"name": "local_authority/Inverclyde", "label": "Inverclyde", "type": "local_authority"}, + {"name": "local_authority/Ipswich", "label": "Ipswich", "type": "local_authority"}, + {"name": "local_authority/Isle of Anglesey", "label": "Isle of Anglesey", "type": "local_authority"}, + {"name": "local_authority/Isle of Wight", "label": "Isle of Wight", "type": "local_authority"}, + {"name": "local_authority/Isles of Scilly", "label": "Isles of Scilly", "type": "local_authority"}, + {"name": "local_authority/Islington", "label": "Islington", "type": "local_authority"}, + {"name": "local_authority/Kensington and Chelsea", "label": "Kensington and Chelsea", "type": "local_authority"}, + {"name": "local_authority/King's Lynn and West Norfolk", "label": "King's Lynn and West Norfolk", "type": "local_authority"}, + {"name": "local_authority/Kingston upon Hull, City of", "label": "Kingston upon Hull, City of", "type": "local_authority"}, + {"name": "local_authority/Kingston upon Thames", "label": "Kingston upon Thames", "type": "local_authority"}, + {"name": "local_authority/Kirklees", "label": "Kirklees", "type": "local_authority"}, + {"name": "local_authority/Knowsley", "label": "Knowsley", "type": "local_authority"}, + {"name": "local_authority/Lambeth", "label": "Lambeth", "type": "local_authority"}, + {"name": "local_authority/Lancaster", "label": "Lancaster", "type": "local_authority"}, + {"name": "local_authority/Leeds", "label": "Leeds", "type": "local_authority"}, + {"name": "local_authority/Leicester", "label": "Leicester", "type": "local_authority"}, + {"name": "local_authority/Lewes", "label": "Lewes", "type": "local_authority"}, + {"name": "local_authority/Lewisham", "label": "Lewisham", "type": "local_authority"}, + {"name": "local_authority/Lichfield", "label": "Lichfield", "type": "local_authority"}, + {"name": "local_authority/Lincoln", "label": "Lincoln", "type": "local_authority"}, + {"name": "local_authority/Lisburn and Castlereagh", "label": "Lisburn and Castlereagh", "type": "local_authority"}, + {"name": "local_authority/Liverpool", "label": "Liverpool", "type": "local_authority"}, + {"name": "local_authority/Luton", "label": "Luton", "type": "local_authority"}, + {"name": "local_authority/Maidstone", "label": "Maidstone", "type": "local_authority"}, + {"name": "local_authority/Maldon", "label": "Maldon", "type": "local_authority"}, + {"name": "local_authority/Malvern Hills", "label": "Malvern Hills", "type": "local_authority"}, + {"name": "local_authority/Manchester", "label": "Manchester", "type": "local_authority"}, + {"name": "local_authority/Mansfield", "label": "Mansfield", "type": "local_authority"}, + {"name": "local_authority/Medway", "label": "Medway", "type": "local_authority"}, + {"name": "local_authority/Melton", "label": "Melton", "type": "local_authority"}, + {"name": "local_authority/Merthyr Tydfil", "label": "Merthyr Tydfil", "type": "local_authority"}, + {"name": "local_authority/Merton", "label": "Merton", "type": "local_authority"}, + {"name": "local_authority/Mid Devon", "label": "Mid Devon", "type": "local_authority"}, + {"name": "local_authority/Mid Suffolk", "label": "Mid Suffolk", "type": "local_authority"}, + {"name": "local_authority/Mid Sussex", "label": "Mid Sussex", "type": "local_authority"}, + {"name": "local_authority/Mid Ulster", "label": "Mid Ulster", "type": "local_authority"}, + {"name": "local_authority/Mid and East Antrim", "label": "Mid and East Antrim", "type": "local_authority"}, + {"name": "local_authority/Middlesbrough", "label": "Middlesbrough", "type": "local_authority"}, + {"name": "local_authority/Midlothian", "label": "Midlothian", "type": "local_authority"}, + {"name": "local_authority/Milton Keynes", "label": "Milton Keynes", "type": "local_authority"}, + {"name": "local_authority/Mole Valley", "label": "Mole Valley", "type": "local_authority"}, + {"name": "local_authority/Monmouthshire", "label": "Monmouthshire", "type": "local_authority"}, + {"name": "local_authority/Moray", "label": "Moray", "type": "local_authority"}, + {"name": "local_authority/Na h-Eileanan Siar", "label": "Na h-Eileanan Siar", "type": "local_authority"}, + {"name": "local_authority/Neath Port Talbot", "label": "Neath Port Talbot", "type": "local_authority"}, + {"name": "local_authority/New Forest", "label": "New Forest", "type": "local_authority"}, + {"name": "local_authority/Newark and Sherwood", "label": "Newark and Sherwood", "type": "local_authority"}, + {"name": "local_authority/Newcastle upon Tyne", "label": "Newcastle upon Tyne", "type": "local_authority"}, + {"name": "local_authority/Newcastle-under-Lyme", "label": "Newcastle-under-Lyme", "type": "local_authority"}, + {"name": "local_authority/Newham", "label": "Newham", "type": "local_authority"}, + {"name": "local_authority/Newport", "label": "Newport", "type": "local_authority"}, + {"name": "local_authority/Newry, Mourne and Down", "label": "Newry, Mourne and Down", "type": "local_authority"}, + {"name": "local_authority/North Ayrshire", "label": "North Ayrshire", "type": "local_authority"}, + {"name": "local_authority/North Devon", "label": "North Devon", "type": "local_authority"}, + {"name": "local_authority/North East Derbyshire", "label": "North East Derbyshire", "type": "local_authority"}, + {"name": "local_authority/North East Lincolnshire", "label": "North East Lincolnshire", "type": "local_authority"}, + {"name": "local_authority/North Hertfordshire", "label": "North Hertfordshire", "type": "local_authority"}, + {"name": "local_authority/North Kesteven", "label": "North Kesteven", "type": "local_authority"}, + {"name": "local_authority/North Lanarkshire", "label": "North Lanarkshire", "type": "local_authority"}, + {"name": "local_authority/North Lincolnshire", "label": "North Lincolnshire", "type": "local_authority"}, + {"name": "local_authority/North Norfolk", "label": "North Norfolk", "type": "local_authority"}, + {"name": "local_authority/North Northamptonshire", "label": "North Northamptonshire", "type": "local_authority"}, + {"name": "local_authority/North Somerset", "label": "North Somerset", "type": "local_authority"}, + {"name": "local_authority/North Tyneside", "label": "North Tyneside", "type": "local_authority"}, + {"name": "local_authority/North Warwickshire", "label": "North Warwickshire", "type": "local_authority"}, + {"name": "local_authority/North West Leicestershire", "label": "North West Leicestershire", "type": "local_authority"}, + {"name": "local_authority/North Yorkshire", "label": "North Yorkshire", "type": "local_authority"}, + {"name": "local_authority/Northumberland", "label": "Northumberland", "type": "local_authority"}, + {"name": "local_authority/Norwich", "label": "Norwich", "type": "local_authority"}, + {"name": "local_authority/Nottingham", "label": "Nottingham", "type": "local_authority"}, + {"name": "local_authority/Nuneaton and Bedworth", "label": "Nuneaton and Bedworth", "type": "local_authority"}, + {"name": "local_authority/Oadby and Wigston", "label": "Oadby and Wigston", "type": "local_authority"}, + {"name": "local_authority/Oldham", "label": "Oldham", "type": "local_authority"}, + {"name": "local_authority/Orkney Islands", "label": "Orkney Islands", "type": "local_authority"}, + {"name": "local_authority/Oxford", "label": "Oxford", "type": "local_authority"}, + {"name": "local_authority/Pembrokeshire", "label": "Pembrokeshire", "type": "local_authority"}, + {"name": "local_authority/Pendle", "label": "Pendle", "type": "local_authority"}, + {"name": "local_authority/Perth and Kinross", "label": "Perth and Kinross", "type": "local_authority"}, + {"name": "local_authority/Peterborough", "label": "Peterborough", "type": "local_authority"}, + {"name": "local_authority/Plymouth", "label": "Plymouth", "type": "local_authority"}, + {"name": "local_authority/Portsmouth", "label": "Portsmouth", "type": "local_authority"}, + {"name": "local_authority/Powys", "label": "Powys", "type": "local_authority"}, + {"name": "local_authority/Preston", "label": "Preston", "type": "local_authority"}, + {"name": "local_authority/Reading", "label": "Reading", "type": "local_authority"}, + {"name": "local_authority/Redbridge", "label": "Redbridge", "type": "local_authority"}, + {"name": "local_authority/Redcar and Cleveland", "label": "Redcar and Cleveland", "type": "local_authority"}, + {"name": "local_authority/Redditch", "label": "Redditch", "type": "local_authority"}, + {"name": "local_authority/Reigate and Banstead", "label": "Reigate and Banstead", "type": "local_authority"}, + {"name": "local_authority/Renfrewshire", "label": "Renfrewshire", "type": "local_authority"}, + {"name": "local_authority/Rhondda Cynon Taf", "label": "Rhondda Cynon Taf", "type": "local_authority"}, + {"name": "local_authority/Ribble Valley", "label": "Ribble Valley", "type": "local_authority"}, + {"name": "local_authority/Richmond upon Thames", "label": "Richmond upon Thames", "type": "local_authority"}, + {"name": "local_authority/Rochdale", "label": "Rochdale", "type": "local_authority"}, + {"name": "local_authority/Rochford", "label": "Rochford", "type": "local_authority"}, + {"name": "local_authority/Rossendale", "label": "Rossendale", "type": "local_authority"}, + {"name": "local_authority/Rother", "label": "Rother", "type": "local_authority"}, + {"name": "local_authority/Rotherham", "label": "Rotherham", "type": "local_authority"}, + {"name": "local_authority/Rugby", "label": "Rugby", "type": "local_authority"}, + {"name": "local_authority/Runnymede", "label": "Runnymede", "type": "local_authority"}, + {"name": "local_authority/Rushcliffe", "label": "Rushcliffe", "type": "local_authority"}, + {"name": "local_authority/Rushmoor", "label": "Rushmoor", "type": "local_authority"}, + {"name": "local_authority/Rutland", "label": "Rutland", "type": "local_authority"}, + {"name": "local_authority/Salford", "label": "Salford", "type": "local_authority"}, + {"name": "local_authority/Sandwell", "label": "Sandwell", "type": "local_authority"}, + {"name": "local_authority/Scottish Borders", "label": "Scottish Borders", "type": "local_authority"}, + {"name": "local_authority/Sefton", "label": "Sefton", "type": "local_authority"}, + {"name": "local_authority/Sevenoaks", "label": "Sevenoaks", "type": "local_authority"}, + {"name": "local_authority/Sheffield", "label": "Sheffield", "type": "local_authority"}, + {"name": "local_authority/Shetland Islands", "label": "Shetland Islands", "type": "local_authority"}, + {"name": "local_authority/Shropshire", "label": "Shropshire", "type": "local_authority"}, + {"name": "local_authority/Slough", "label": "Slough", "type": "local_authority"}, + {"name": "local_authority/Solihull", "label": "Solihull", "type": "local_authority"}, + {"name": "local_authority/Somerset", "label": "Somerset", "type": "local_authority"}, + {"name": "local_authority/South Ayrshire", "label": "South Ayrshire", "type": "local_authority"}, + {"name": "local_authority/South Cambridgeshire", "label": "South Cambridgeshire", "type": "local_authority"}, + {"name": "local_authority/South Derbyshire", "label": "South Derbyshire", "type": "local_authority"}, + {"name": "local_authority/South Gloucestershire", "label": "South Gloucestershire", "type": "local_authority"}, + {"name": "local_authority/South Hams", "label": "South Hams", "type": "local_authority"}, + {"name": "local_authority/South Holland", "label": "South Holland", "type": "local_authority"}, + {"name": "local_authority/South Kesteven", "label": "South Kesteven", "type": "local_authority"}, + {"name": "local_authority/South Lanarkshire", "label": "South Lanarkshire", "type": "local_authority"}, + {"name": "local_authority/South Norfolk", "label": "South Norfolk", "type": "local_authority"}, + {"name": "local_authority/South Oxfordshire", "label": "South Oxfordshire", "type": "local_authority"}, + {"name": "local_authority/South Ribble", "label": "South Ribble", "type": "local_authority"}, + {"name": "local_authority/South Staffordshire", "label": "South Staffordshire", "type": "local_authority"}, + {"name": "local_authority/South Tyneside", "label": "South Tyneside", "type": "local_authority"}, + {"name": "local_authority/Southampton", "label": "Southampton", "type": "local_authority"}, + {"name": "local_authority/Southend-on-Sea", "label": "Southend-on-Sea", "type": "local_authority"}, + {"name": "local_authority/Southwark", "label": "Southwark", "type": "local_authority"}, + {"name": "local_authority/Spelthorne", "label": "Spelthorne", "type": "local_authority"}, + {"name": "local_authority/St Albans", "label": "St Albans", "type": "local_authority"}, + {"name": "local_authority/St. Helens", "label": "St. Helens", "type": "local_authority"}, + {"name": "local_authority/Stafford", "label": "Stafford", "type": "local_authority"}, + {"name": "local_authority/Staffordshire Moorlands", "label": "Staffordshire Moorlands", "type": "local_authority"}, + {"name": "local_authority/Stevenage", "label": "Stevenage", "type": "local_authority"}, + {"name": "local_authority/Stirling", "label": "Stirling", "type": "local_authority"}, + {"name": "local_authority/Stockport", "label": "Stockport", "type": "local_authority"}, + {"name": "local_authority/Stockton-on-Tees", "label": "Stockton-on-Tees", "type": "local_authority"}, + {"name": "local_authority/Stoke-on-Trent", "label": "Stoke-on-Trent", "type": "local_authority"}, + {"name": "local_authority/Stratford-on-Avon", "label": "Stratford-on-Avon", "type": "local_authority"}, + {"name": "local_authority/Stroud", "label": "Stroud", "type": "local_authority"}, + {"name": "local_authority/Sunderland", "label": "Sunderland", "type": "local_authority"}, + {"name": "local_authority/Surrey Heath", "label": "Surrey Heath", "type": "local_authority"}, + {"name": "local_authority/Sutton", "label": "Sutton", "type": "local_authority"}, + {"name": "local_authority/Swale", "label": "Swale", "type": "local_authority"}, + {"name": "local_authority/Swansea", "label": "Swansea", "type": "local_authority"}, + {"name": "local_authority/Swindon", "label": "Swindon", "type": "local_authority"}, + {"name": "local_authority/Tameside", "label": "Tameside", "type": "local_authority"}, + {"name": "local_authority/Tamworth", "label": "Tamworth", "type": "local_authority"}, + {"name": "local_authority/Tandridge", "label": "Tandridge", "type": "local_authority"}, + {"name": "local_authority/Teignbridge", "label": "Teignbridge", "type": "local_authority"}, + {"name": "local_authority/Telford and Wrekin", "label": "Telford and Wrekin", "type": "local_authority"}, + {"name": "local_authority/Tendring", "label": "Tendring", "type": "local_authority"}, + {"name": "local_authority/Test Valley", "label": "Test Valley", "type": "local_authority"}, + {"name": "local_authority/Tewkesbury", "label": "Tewkesbury", "type": "local_authority"}, + {"name": "local_authority/Thanet", "label": "Thanet", "type": "local_authority"}, + {"name": "local_authority/Three Rivers", "label": "Three Rivers", "type": "local_authority"}, + {"name": "local_authority/Thurrock", "label": "Thurrock", "type": "local_authority"}, + {"name": "local_authority/Tonbridge and Malling", "label": "Tonbridge and Malling", "type": "local_authority"}, + {"name": "local_authority/Torbay", "label": "Torbay", "type": "local_authority"}, + {"name": "local_authority/Torfaen", "label": "Torfaen", "type": "local_authority"}, + {"name": "local_authority/Torridge", "label": "Torridge", "type": "local_authority"}, + {"name": "local_authority/Tower Hamlets", "label": "Tower Hamlets", "type": "local_authority"}, + {"name": "local_authority/Trafford", "label": "Trafford", "type": "local_authority"}, + {"name": "local_authority/Tunbridge Wells", "label": "Tunbridge Wells", "type": "local_authority"}, + {"name": "local_authority/Uttlesford", "label": "Uttlesford", "type": "local_authority"}, + {"name": "local_authority/Vale of Glamorgan", "label": "Vale of Glamorgan", "type": "local_authority"}, + {"name": "local_authority/Vale of White Horse", "label": "Vale of White Horse", "type": "local_authority"}, + {"name": "local_authority/Wakefield", "label": "Wakefield", "type": "local_authority"}, + {"name": "local_authority/Walsall", "label": "Walsall", "type": "local_authority"}, + {"name": "local_authority/Waltham Forest", "label": "Waltham Forest", "type": "local_authority"}, + {"name": "local_authority/Wandsworth", "label": "Wandsworth", "type": "local_authority"}, + {"name": "local_authority/Warrington", "label": "Warrington", "type": "local_authority"}, + {"name": "local_authority/Warwick", "label": "Warwick", "type": "local_authority"}, + {"name": "local_authority/Watford", "label": "Watford", "type": "local_authority"}, + {"name": "local_authority/Waverley", "label": "Waverley", "type": "local_authority"}, + {"name": "local_authority/Wealden", "label": "Wealden", "type": "local_authority"}, + {"name": "local_authority/Welwyn Hatfield", "label": "Welwyn Hatfield", "type": "local_authority"}, + {"name": "local_authority/West Berkshire", "label": "West Berkshire", "type": "local_authority"}, + {"name": "local_authority/West Devon", "label": "West Devon", "type": "local_authority"}, + {"name": "local_authority/West Dunbartonshire", "label": "West Dunbartonshire", "type": "local_authority"}, + {"name": "local_authority/West Lancashire", "label": "West Lancashire", "type": "local_authority"}, + {"name": "local_authority/West Lindsey", "label": "West Lindsey", "type": "local_authority"}, + {"name": "local_authority/West Lothian", "label": "West Lothian", "type": "local_authority"}, + {"name": "local_authority/West Northamptonshire", "label": "West Northamptonshire", "type": "local_authority"}, + {"name": "local_authority/West Oxfordshire", "label": "West Oxfordshire", "type": "local_authority"}, + {"name": "local_authority/West Suffolk", "label": "West Suffolk", "type": "local_authority"}, + {"name": "local_authority/Westminster", "label": "Westminster", "type": "local_authority"}, + {"name": "local_authority/Westmorland and Furness", "label": "Westmorland and Furness", "type": "local_authority"}, + {"name": "local_authority/Wigan", "label": "Wigan", "type": "local_authority"}, + {"name": "local_authority/Wiltshire", "label": "Wiltshire", "type": "local_authority"}, + {"name": "local_authority/Winchester", "label": "Winchester", "type": "local_authority"}, + {"name": "local_authority/Windsor and Maidenhead", "label": "Windsor and Maidenhead", "type": "local_authority"}, + {"name": "local_authority/Wirral", "label": "Wirral", "type": "local_authority"}, + {"name": "local_authority/Woking", "label": "Woking", "type": "local_authority"}, + {"name": "local_authority/Wokingham", "label": "Wokingham", "type": "local_authority"}, + {"name": "local_authority/Wolverhampton", "label": "Wolverhampton", "type": "local_authority"}, + {"name": "local_authority/Worcester", "label": "Worcester", "type": "local_authority"}, + {"name": "local_authority/Worthing", "label": "Worthing", "type": "local_authority"}, + {"name": "local_authority/Wrexham", "label": "Wrexham", "type": "local_authority"}, + {"name": "local_authority/Wychavon", "label": "Wychavon", "type": "local_authority"}, + {"name": "local_authority/Wyre", "label": "Wyre", "type": "local_authority"}, + {"name": "local_authority/Wyre Forest", "label": "Wyre Forest", "type": "local_authority"}, + {"name": "local_authority/York", "label": "York", "type": "local_authority"} +] diff --git a/tests/unit/test_country.py b/tests/unit/test_country.py index 48af0f3eb..aa5b10934 100644 --- a/tests/unit/test_country.py +++ b/tests/unit/test_country.py @@ -1,3 +1,5 @@ +import json +from collections import Counter from datetime import date, datetime from pathlib import Path from types import SimpleNamespace @@ -17,6 +19,15 @@ get_requested_computations, ) +AREA_LIST_DIRECTORY = Path(__file__).parents[2] / "policyengine_api" / "data" +RECORDED_UK_REGION_OPTIONS_PATH = ( + Path(__file__).parents[1] / "data" / "uk_economy_region_options.json" +) + + +def _names_by_code(area_list: pd.DataFrame) -> dict[str, str]: + return dict(zip(area_list["code"], area_list["name"], strict=True)) + class ExampleEnum(Enum): FIRST = "First" @@ -307,67 +318,53 @@ def test__uk_has_all_region_types(self, uk_regions): def test__uk_metadata_is_json_serializable(self, uk_country): """Verify metadata does not leak filesystem paths or other non-JSON values.""" - import json - json.dumps(uk_country.metadata) + def test__region_options_equal_the_recorded_list(self, uk_regions): + """The region options equal the recorded list, entry by entry, in order. + + The recording holds the national entry, the four countries, the 650 + constituencies and the 361 local authorities, each with its name, + label and type. A change to the packaged area lists, or to how they + are read, must leave the offered regions as recorded. + """ + recorded_regions = json.loads( + RECORDED_UK_REGION_OPTIONS_PATH.read_text(encoding="utf-8") + ) + + assert Counter(region["type"] for region in recorded_regions) == { + "national": 1, + "country": 4, + "constituency": 650, + "local_authority": 361, + } + assert uk_regions == recorded_regions + class TestLocalAuthoritiesDataFile: """Tests for the local authorities CSV data file.""" @pytest.fixture def local_authorities_df(self): - path = ( - Path(__file__).parents[2] - / "policyengine_api" - / "data" - / "local_authorities_2021.csv" - ) - return pd.read_csv(path) + return pd.read_csv(AREA_LIST_DIRECTORY / "local_authorities_2021.csv") - def test__file_has_correct_columns(self, local_authorities_df): - """Verify the CSV has the expected columns.""" - expected_columns = {"code", "name", "x", "y"} - assert expected_columns == set(local_authorities_df.columns) + def test__file_has_only_code_and_name_columns(self, local_authorities_df): + """The file holds each authority's code and name, and no hex-map position.""" + assert list(local_authorities_df.columns) == ["code", "name"] def test__file_has_361_local_authorities(self, local_authorities_df): """Verify the correct number of local authorities in file.""" assert len(local_authorities_df) == 361 def test__file_matches_the_installed_policyengine_list(self, local_authorities_df): - """Codes, names and hex positions equal .py's packaged 2023 list. + """Codes and names equal .py's packaged 2023 list. .py's list is read from the installed package, so a .py update that - changes the area frame makes this test fail until the file follows. + changes a code or a name makes this test fail until the file follows. """ policyengine_list = pd.read_csv(packaged_uk_area_list_path("local_authority")) - def by_code(frame: pd.DataFrame) -> dict[str, tuple[str, float, float]]: - return { - row.code: (row.name, float(row.x), float(row.y)) - for row in frame.itertuples(index=False) - } - - assert by_code(local_authorities_df) == by_code(policyengine_list) - - def test__april_2023_unitaries_leave_the_origin_placeholder( - self, local_authorities_df - ): - """The four unitaries created in April 2023 have their own hex positions. - - They used to share the (0, 0) placeholder. Another authority may still - sit at (0, 0) when .py's list puts it there; the comparison with .py's - list above covers every position. - """ - april_2023_unitaries = local_authorities_df[ - local_authorities_df["code"].isin( - ["E06000063", "E06000064", "E06000065", "E06000066"] - ) - ] - assert len(april_2023_unitaries) == 4 - assert not ( - (april_2023_unitaries["x"] == 0) & (april_2023_unitaries["y"] == 0) - ).any() + assert _names_by_code(local_authorities_df) == _names_by_code(policyengine_list) def test__all_codes_are_valid_ons_codes(self, local_authorities_df): """Verify all codes follow ONS local authority code patterns.""" @@ -381,11 +378,6 @@ def test__all_names_are_non_empty(self, local_authorities_df): for name in local_authorities_df["name"]: assert len(str(name)) > 0 - def test__coordinates_are_numeric(self, local_authorities_df): - """Verify x and y coordinates are numeric.""" - assert local_authorities_df["x"].dtype in ["float64", "int64"] - assert local_authorities_df["y"].dtype in ["float64", "int64"] - def test__english_local_authorities_have_e_prefix(self, local_authorities_df): """Verify English local authorities have E prefix codes.""" english_las = local_authorities_df[ From 41d5d9e9ebab857f663510dd30d30044d7f13eab Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:50:58 +0400 Subject: [PATCH 2/4] Drop the unused x and y columns from the constituency area list `policyengine_api/data/constituencies_2024.csv` now holds only each constituency's `code` and `name`. The metadata builder in `country.py` reads only `name`, so the `x` and `y` hex-map positions were never used. New tests check the file: its columns are exactly `code` and `name`, it has 650 rows, and its codes and names equal .py's packaged 2024 constituency list. Only the column test failed before this change. The recorded region-options test from the previous commit still passes. Co-Authored-By: Claude Opus 5.5 --- changelog.d/area-lists-without-xy.removed.md | 1 + policyengine_api/data/constituencies_2024.csv | 1302 ++++++++--------- tests/unit/test_country.py | 25 + 3 files changed, 677 insertions(+), 651 deletions(-) create mode 100644 changelog.d/area-lists-without-xy.removed.md diff --git a/changelog.d/area-lists-without-xy.removed.md b/changelog.d/area-lists-without-xy.removed.md new file mode 100644 index 000000000..c6fb0d232 --- /dev/null +++ b/changelog.d/area-lists-without-xy.removed.md @@ -0,0 +1 @@ +Removed the unused `x` and `y` hex-map position columns from the packaged UK constituency and local-authority area lists; the UK metadata's region options are unchanged. diff --git a/policyengine_api/data/constituencies_2024.csv b/policyengine_api/data/constituencies_2024.csv index bd9a1df28..04c4b34ea 100644 --- a/policyengine_api/data/constituencies_2024.csv +++ b/policyengine_api/data/constituencies_2024.csv @@ -1,651 +1,651 @@ -code,name,x,y -E14001063,Aldershot,56,-40 -E14001064,Aldridge-Brownhills,56,-30 -E14001065,Altrincham and Sale West,52,-25 -E14001066,Amber Valley,58,-27 -E14001067,Arundel and South Downs,61,-44 -E14001068,Ashfield,60,-27 -E14001069,Ashford,72,-42 -E14001070,Ashton-under-Lyne,54,-23 -E14001071,Aylesbury,60,-35 -E14001072,Banbury,58,-33 -E14001073,Barking,68,-38 -E14001074,Barnsley North,57,-23 -E14001075,Barnsley South,58,-23 -E14001076,Barrow and Furness,54,-16 -E14001077,Basildon and Billericay,67,-34 -E14001078,Basingstoke,55,-39 -E14001079,Bassetlaw,61,-26 -E14001080,Bath,51,-40 -E14001081,Battersea,62,-41 -E14001082,Beaconsfield,57,-37 -E14001083,Beckenham and Penge,65,-43 -E14001084,Bedford,63,-32 -E14001085,Bermondsey and Old Southwark,64,-40 -E14001086,Bethnal Green and Stepney,65,-39 -E14001087,Beverley and Holderness,64,-22 -E14001088,Bexhill and Battle,70,-44 -E14001089,Bexleyheath and Crayford,67,-39 -E14001090,Bicester and Woodstock,59,-34 -E14001091,Birkenhead,49,-27 -E14001092,Birmingham Edgbaston,53,-33 -E14001093,Birmingham Erdington,54,-31 -E14001094,Birmingham Hall Green and Moseley,55,-32 -E14001095,Birmingham Hodge Hill and Solihull North,55,-31 -E14001096,Birmingham Ladywood,54,-32 -E14001097,Birmingham Northfield,54,-34 -E14001098,Birmingham Perry Barr,53,-31 -E14001099,Birmingham Selly Oak,54,-33 -E14001100,Birmingham Yardley,56,-32 -E14001101,Bishop Auckland,54,-14 -E14001102,Blackburn,53,-19 -E14001103,Blackley and Middleton South,53,-23 -E14001104,Blackpool North and Fleetwood,53,-18 -E14001105,Blackpool South,52,-18 -E14001106,Blaydon and Consett,55,-14 -E14001107,Blyth and Ashington,55,-12 -E14001108,Bognor Regis and Littlehampton,63,-44 -E14001109,Bolsover,60,-26 -E14001110,Bolton North East,52,-21 -E14001111,Bolton South and Walkden,52,-22 -E14001112,Bolton West,51,-21 -E14001113,Bootle,49,-22 -E14001114,Boston and Skegness,64,-26 -E14001115,Bournemouth East,52,-43 -E14001116,Bournemouth West,52,-42 -E14001117,Bracknell,56,-39 -E14001118,Bradford East,58,-20 -E14001119,Bradford South,56,-21 -E14001120,Bradford West,57,-20 -E14001121,Braintree,67,-31 -E14001122,Brent East,61,-38 -E14001123,Brent West,60,-38 -E14001124,Brentford and Isleworth,60,-40 -E14001125,Brentwood and Ongar,66,-33 -E14001126,Bridgwater,48,-41 -E14001127,Bridlington and The Wolds,63,-20 -E14001128,Brigg and Immingham,62,-24 -E14001129,Brighton Kemptown and Peacehaven,67,-45 -E14001130,Brighton Pavilion,67,-44 -E14001131,Bristol Central,51,-38 -E14001132,Bristol East,52,-38 -E14001133,Bristol North East,51,-37 -E14001134,Bristol North West,50,-38 -E14001135,Bristol South,51,-39 -E14001136,Broadland and Fakenham,66,-27 -E14001137,Bromley and Biggin Hill,67,-42 -E14001138,Bromsgrove,52,-33 -E14001139,Broxbourne,66,-35 -E14001140,Broxtowe,59,-27 -E14001141,Buckingham and Bletchley,60,-34 -E14001142,Burnley,55,-19 -E14001143,Burton and Uttoxeter,56,-28 -E14001144,Bury North,53,-21 -E14001145,Bury South,53,-22 -E14001146,Bury St Edmunds and Stowmarket,68,-31 -E14001147,Calder Valley,56,-20 -E14001148,Camborne and Redruth,43,-45 -E14001149,Cambridge,65,-30 -E14001150,Cannock Chase,54,-29 -E14001151,Canterbury,71,-41 -E14001152,Carlisle,53,-14 -E14001153,Carshalton and Wallington,62,-43 -E14001154,Castle Point,69,-36 -E14001155,Central Devon,47,-42 -E14001156,Central Suffolk and North Ipswich,68,-29 -E14001157,Chatham and Aylesford,69,-40 -E14001158,Cheadle,55,-26 -E14001159,Chelmsford,67,-33 -E14001160,Chelsea and Fulham,61,-40 -E14001161,Cheltenham,52,-36 -E14001162,Chesham and Amersham,59,-36 -E14001163,Chester North and Neston,50,-28 -E14001164,Chester South and Eddisbury,51,-27 -E14001165,Chesterfield,59,-26 -E14001166,Chichester,60,-44 -E14001167,Chingford and Woodford Green,64,-35 -E14001168,Chippenham,52,-39 -E14001169,Chipping Barnet,62,-36 -E14001170,Chorley,53,-20 -E14001171,Christchurch,53,-42 -E14001172,Cities of London and Westminster,63,-40 -E14001173,City of Durham,55,-16 -E14001174,Clacton,69,-32 -E14001175,Clapham and Brixton Hill,62,-42 -E14001176,Colchester,68,-32 -E14001177,Colne Valley,55,-23 -E14001178,Congleton,54,-27 -E14001179,Corby and East Northamptonshire,62,-30 -E14001180,Coventry East,57,-33 -E14001181,Coventry North West,56,-33 -E14001182,Coventry South,57,-34 -E14001183,Cramlington and Killingworth,56,-12 -E14001184,Crawley,69,-44 -E14001185,Crewe and Nantwich,53,-27 -E14001186,Croydon East,65,-42 -E14001187,Croydon South,64,-43 -E14001188,Croydon West,63,-43 -E14001189,Dagenham and Rainham,67,-37 -E14001190,Darlington,55,-17 -E14001191,Dartford,68,-40 -E14001192,Daventry,60,-32 -E14001193,Derby North,58,-28 -E14001194,Derby South,57,-28 -E14001195,Derbyshire Dales,57,-26 -E14001196,Dewsbury and Batley,57,-22 -E14001197,Didcot and Wantage,54,-38 -E14001198,Doncaster Central,60,-23 -E14001199,Doncaster East and the Isle of Axholme,61,-23 -E14001200,Doncaster North,61,-22 -E14001201,Dorking and Horley,59,-43 -E14001202,Dover and Deal,72,-41 -E14001203,Droitwich and Evesham,54,-36 -E14001204,Dudley,51,-31 -E14001205,Dulwich and West Norwood,63,-42 -E14001206,Dunstable and Leighton Buzzard,62,-33 -E14001207,Ealing Central and Acton,59,-39 -E14001208,Ealing North,59,-38 -E14001209,Ealing Southall,58,-39 -E14001210,Earley and Woodley,56,-36 -E14001211,Easington,57,-16 -E14001212,East Grinstead and Uckfield,69,-43 -E14001213,East Ham,67,-38 -E14001214,East Hampshire,55,-41 -E14001215,East Surrey,67,-43 -E14001216,East Thanet,71,-39 -E14001217,East Wiltshire,53,-41 -E14001218,East Worthing and Shoreham,65,-44 -E14001219,Eastbourne,69,-45 -E14001220,Eastleigh,54,-41 -E14001221,Edmonton and Winchmore Hill,64,-36 -E14001222,Ellesmere Port and Bromborough,50,-27 -E14001223,Eltham and Chislehurst,66,-41 -E14001224,Ely and East Cambridgeshire,66,-30 -E14001225,Enfield North,62,-35 -E14001226,Epping Forest,67,-35 -E14001227,Epsom and Ewell,60,-43 -E14001228,Erewash,59,-28 -E14001229,Erith and Thamesmead,67,-40 -E14001230,Esher and Walton,58,-42 -E14001231,Exeter,48,-42 -E14001232,Exmouth and Exeter East,48,-43 -E14001233,Fareham and Waterlooville,55,-43 -E14001234,Farnham and Bordon,56,-42 -E14001235,Faversham and Mid Kent,71,-40 -E14001236,Feltham and Heston,59,-40 -E14001237,Filton and Bradley Stoke,50,-37 -E14001238,Finchley and Golders Green,61,-37 -E14001239,Folkestone and Hythe,71,-42 -E14001240,Forest of Dean,50,-35 -E14001241,Frome and East Somerset,50,-41 -E14001242,Fylde,51,-19 -E14001243,Gainsborough,61,-25 -E14001244,Gateshead Central and Whickham,56,-15 -E14001245,Gedling,61,-28 -E14001246,Gillingham and Rainham,70,-40 -E14001247,Glastonbury and Somerton,49,-41 -E14001248,Gloucester,51,-35 -E14001249,Godalming and Ash,57,-42 -E14001250,Goole and Pocklington,61,-21 -E14001251,Gorton and Denton,55,-24 -E14001252,Gosport,57,-43 -E14001253,Grantham and Bourne,63,-28 -E14001254,Gravesham,68,-39 -E14001255,Great Grimsby and Cleethorpes,63,-24 -E14001256,Great Yarmouth,67,-27 -E14001257,Greenwich and Woolwich,66,-40 -E14001258,Guildford,56,-41 -E14001259,Hackney North and Stoke Newington,64,-38 -E14001260,Hackney South and Shoreditch,64,-39 -E14001261,Halesowen,51,-33 -E14001262,Halifax,55,-21 -E14001263,Hamble Valley,56,-43 -E14001264,Hammersmith and Chiswick,60,-39 -E14001265,Hampstead and Highgate,62,-38 -E14001266,"Harborough, Oadby and Wigston",61,-31 -E14001267,Harlow,67,-32 -E14001268,Harpenden and Berkhamsted,62,-34 -E14001269,Harrogate and Knaresborough,59,-18 -E14001270,Harrow East,60,-37 -E14001271,Harrow West,59,-37 -E14001272,Hartlepool,59,-16 -E14001273,Harwich and North Essex,69,-31 -E14001274,Hastings and Rye,70,-43 -E14001275,Havant,59,-44 -E14001276,Hayes and Harlington,58,-38 -E14001277,Hazel Grove,55,-25 -E14001278,Hemel Hempstead,64,-34 -E14001279,Hendon,61,-36 -E14001280,Henley and Thame,58,-35 -E14001281,Hereford and South Herefordshire,51,-34 -E14001282,Herne Bay and Sandwich,72,-40 -E14001283,Hertford and Stortford,66,-32 -E14001284,Hertsmere,66,-34 -E14001285,Hexham,53,-13 -E14001286,Heywood and Middleton North,54,-20 -E14001287,High Peak,56,-25 -E14001288,Hinckley and Bosworth,58,-30 -E14001289,Hitchin,64,-32 -E14001290,Holborn and St Pancras,62,-39 -E14001291,Honiton and Sidmouth,49,-43 -E14001292,Hornchurch and Upminster,66,-37 -E14001293,Hornsey and Friern Barnet,63,-36 -E14001294,Horsham,62,-44 -E14001295,Houghton and Sunderland South,57,-15 -E14001296,Hove and Portslade,66,-44 -E14001297,Huddersfield,56,-22 -E14001298,Huntingdon,63,-31 -E14001299,Hyndburn,54,-19 -E14001300,Ilford North,65,-36 -E14001301,Ilford South,65,-37 -E14001302,Ipswich,68,-30 -E14001303,Isle of Wight East,54,-45 -E14001304,Isle of Wight West,53,-45 -E14001305,Islington North,63,-38 -E14001306,Islington South and Finsbury,63,-39 -E14001307,Jarrow and Gateshead East,57,-14 -E14001308,Keighley and Ilkley,56,-19 -E14001309,Kenilworth and Southam,56,-34 -E14001310,Kensington and Bayswater,61,-39 -E14001311,Kettering,61,-30 -E14001312,Kingston and Surbiton,59,-42 -E14001313,Kingston upon Hull East,63,-22 -E14001314,Kingston upon Hull North and Cottingham,62,-21 -E14001315,Kingston upon Hull West and Haltemprice,62,-22 -E14001316,Kingswinford and South Staffordshire,52,-30 -E14001317,Knowsley,50,-23 -E14001318,Lancaster and Wyre,54,-18 -E14001319,Leeds Central and Headingley,60,-20 -E14001320,Leeds East,61,-20 -E14001321,Leeds North East,59,-19 -E14001322,Leeds North West,58,-19 -E14001323,Leeds South,59,-21 -E14001324,Leeds South West and Morley,58,-21 -E14001325,Leeds West and Pudsey,59,-20 -E14001326,Leicester East,60,-30 -E14001327,Leicester South,60,-31 -E14001328,Leicester West,59,-31 -E14001329,Leigh and Atherton,51,-25 -E14001330,Lewes,68,-45 -E14001331,Lewisham East,66,-42 -E14001332,Lewisham North,65,-40 -E14001333,Lewisham West and East Dulwich,65,-41 -E14001334,Leyton and Wanstead,64,-37 -E14001335,Lichfield,56,-29 -E14001336,Lincoln,62,-25 -E14001337,Liverpool Garston,50,-25 -E14001338,Liverpool Riverside,49,-24 -E14001339,Liverpool Walton,49,-23 -E14001340,Liverpool Wavertree,49,-25 -E14001341,Liverpool West Derby,50,-24 -E14001342,Loughborough,59,-30 -E14001343,Louth and Horncastle,63,-25 -E14001344,Lowestoft,68,-28 -E14001345,Luton North,63,-33 -E14001346,Luton South and South Bedfordshire,63,-34 -E14001347,Macclesfield,56,-26 -E14001348,Maidenhead,57,-36 -E14001349,Maidstone and Malling,69,-41 -E14001350,Makerfield,51,-22 -E14001351,Maldon,69,-33 -E14001352,Manchester Central,54,-24 -E14001353,Manchester Rusholme,53,-25 -E14001354,Manchester Withington,54,-26 -E14001355,Mansfield,61,-27 -E14001356,Melksham and Devizes,52,-40 -E14001357,Melton and Syston,61,-29 -E14001358,Meriden and Solihull East,55,-33 -E14001359,Mid Bedfordshire,62,-32 -E14001360,Mid Buckinghamshire,59,-35 -E14001361,Mid Cheshire,52,-27 -E14001362,Mid Derbyshire,57,-27 -E14001363,Mid Dorset and North Poole,50,-43 -E14001364,Mid Leicestershire,58,-31 -E14001365,Mid Norfolk,65,-28 -E14001366,Mid Sussex,68,-43 -E14001367,Middlesbrough and Thornaby East,57,-17 -E14001368,Middlesbrough South and East Cleveland,59,-17 -E14001369,Milton Keynes Central,61,-34 -E14001370,Milton Keynes North,61,-33 -E14001371,Mitcham and Morden,61,-43 -E14001372,Morecambe and Lunesdale,54,-17 -E14001373,New Forest East,54,-43 -E14001374,New Forest West,53,-43 -E14001375,Newark,62,-26 -E14001376,Newbury,54,-37 -E14001377,Newcastle upon Tyne Central and West,54,-13 -E14001378,Newcastle upon Tyne East and Wallsend,56,-14 -E14001379,Newcastle upon Tyne North,55,-13 -E14001380,Newcastle-under-Lyme,52,-28 -E14001381,Newton Abbot,47,-43 -E14001382,Newton Aycliffe and Spennymoor,56,-16 -E14001383,Normanton and Hemsworth,59,-23 -E14001384,North Bedfordshire,62,-31 -E14001385,North Cornwall,45,-43 -E14001386,North Cotswolds,53,-37 -E14001387,North Devon,46,-41 -E14001388,North Dorset,51,-42 -E14001389,North Durham,54,-15 -E14001390,North East Cambridgeshire,64,-29 -E14001391,North East Derbyshire,58,-26 -E14001392,North East Hampshire,56,-38 -E14001393,North East Hertfordshire,65,-32 -E14001394,North East Somerset and Hanham,50,-39 -E14001395,North Herefordshire,52,-34 -E14001396,North Norfolk,65,-27 -E14001397,North Northumberland,54,-12 -E14001398,North Shropshire,50,-29 -E14001399,North Somerset,49,-39 -E14001400,North Warwickshire and Bedworth,57,-32 -E14001401,North West Cambridgeshire,64,-30 -E14001402,North West Essex,66,-31 -E14001403,North West Hampshire,54,-39 -E14001404,North West Leicestershire,58,-29 -E14001405,North West Norfolk,64,-28 -E14001406,Northampton North,61,-32 -E14001407,Northampton South,60,-33 -E14001408,Norwich North,66,-28 -E14001409,Norwich South,66,-29 -E14001410,Nottingham East,60,-29 -E14001411,Nottingham North and Kimberley,60,-28 -E14001412,Nottingham South,59,-29 -E14001413,Nuneaton,57,-31 -E14001414,Old Bexley and Sidcup,67,-41 -E14001415,Oldham East and Saddleworth,55,-22 -E14001416,"Oldham West, Chadderton and Royton",54,-22 -E14001417,Orpington,66,-43 -E14001418,Ossett and Denby Dale,58,-22 -E14001419,Oxford East,58,-34 -E14001420,Oxford West and Abingdon,57,-35 -E14001421,Peckham,64,-41 -E14001422,Pendle and Clitheroe,56,-18 -E14001423,Penistone and Stocksbridge,56,-23 -E14001424,Penrith and Solway,52,-15 -E14001425,Peterborough,63,-29 -E14001426,Plymouth Moor View,46,-43 -E14001427,Plymouth Sutton and Devonport,47,-44 -E14001428,"Pontefract, Castleford and Knottingley",60,-22 -E14001429,Poole,51,-43 -E14001430,Poplar and Limehouse,66,-39 -E14001431,Portsmouth North,58,-43 -E14001432,Portsmouth South,58,-44 -E14001433,Preston,52,-19 -E14001434,Putney,61,-41 -E14001435,Queen's Park and Maida Vale,62,-40 -E14001436,Rawmarsh and Conisbrough,60,-24 -E14001437,Rayleigh and Wickford,68,-34 -E14001438,Reading Central,55,-37 -E14001439,Reading West and Mid Berkshire,55,-36 -E14001440,Redcar,58,-17 -E14001441,Redditch,53,-35 -E14001442,Reigate,68,-44 -E14001443,Ribble Valley,55,-18 -E14001444,Richmond and Northallerton,57,-18 -E14001445,Richmond Park,59,-41 -E14001446,Rochdale,54,-21 -E14001447,Rochester and Strood,69,-39 -E14001448,Romford,66,-36 -E14001449,Romsey and Southampton North,54,-40 -E14001450,Rossendale and Darwen,55,-20 -E14001451,Rother Valley,60,-25 -E14001452,Rotherham,59,-24 -E14001453,Rugby,58,-32 -E14001454,"Ruislip, Northwood and Pinner",60,-36 -E14001455,Runcorn and Helsby,51,-28 -E14001456,Runnymede and Weybridge,57,-41 -E14001457,Rushcliffe,62,-28 -E14001458,Rutland and Stamford,62,-29 -E14001459,Salford,53,-24 -E14001460,Salisbury,52,-41 -E14001461,Scarborough and Whitby,61,-19 -E14001462,Scunthorpe,61,-24 -E14001463,Sefton Central,50,-20 -E14001464,Selby,60,-21 -E14001465,Sevenoaks,68,-42 -E14001466,Sheffield Brightside and Hillsborough,58,-24 -E14001467,Sheffield Central,58,-25 -E14001468,Sheffield Hallam,57,-24 -E14001469,Sheffield Heeley,57,-25 -E14001470,Sheffield South East,59,-25 -E14001471,Sherwood Forest,62,-27 -E14001472,Shipley,57,-19 -E14001473,Shrewsbury,51,-30 -E14001474,Sittingbourne and Sheppey,70,-39 -E14001475,Skipton and Ripon,58,-18 -E14001476,Sleaford and North Hykeham,63,-26 -E14001477,Slough,56,-37 -E14001478,Smethwick,53,-32 -E14001479,Solihull West and Shirley,55,-34 -E14001480,South Basildon and East Thurrock,68,-36 -E14001481,South Cambridgeshire,65,-31 -E14001482,South Cotswolds,53,-38 -E14001483,South Derbyshire,57,-29 -E14001484,South Devon,48,-45 -E14001485,South Dorset,51,-44 -E14001486,South East Cornwall,46,-44 -E14001487,South Holland and The Deepings,63,-27 -E14001488,South Leicestershire,59,-32 -E14001489,South Norfolk,67,-29 -E14001490,South Northamptonshire,59,-33 -E14001491,South Ribble,52,-20 -E14001492,South Shields,58,-14 -E14001493,South Shropshire,50,-31 -E14001494,South Suffolk,69,-30 -E14001495,South West Devon,47,-45 -E14001496,South West Hertfordshire,61,-35 -E14001497,South West Norfolk,65,-29 -E14001498,South West Wiltshire,51,-41 -E14001499,Southampton Itchen,55,-42 -E14001500,Southampton Test,54,-42 -E14001501,Southend East and Rochford,69,-34 -E14001502,Southend West and Leigh,68,-35 -E14001503,Southgate and Wood Green,63,-35 -E14001504,Southport,50,-19 -E14001505,Spelthorne,58,-40 -E14001506,Spen Valley,57,-21 -E14001507,St Albans,65,-34 -E14001508,St Austell and Newquay,45,-44 -E14001509,St Helens North,50,-21 -E14001510,St Helens South and Whiston,50,-22 -E14001511,St Ives,43,-46 -E14001512,St Neots and Mid Cambridgeshire,64,-31 -E14001513,Stafford,54,-28 -E14001514,Staffordshire Moorlands,56,-27 -E14001515,Stalybridge and Hyde,56,-24 -E14001516,Stevenage,64,-33 -E14001517,Stockport,54,-25 -E14001518,Stockton North,58,-16 -E14001519,Stockton West,56,-17 -E14001520,Stoke-on-Trent Central,55,-28 -E14001521,Stoke-on-Trent North,55,-27 -E14001522,Stoke-on-Trent South,55,-29 -E14001523,"Stone, Great Wyrley and Penkridge",53,-28 -E14001524,Stourbridge,51,-32 -E14001525,Stratford and Bow,65,-38 -E14001526,Stratford-on-Avon,54,-35 -E14001527,Streatham and Croydon North,64,-42 -E14001528,Stretford and Urmston,52,-24 -E14001529,Stroud,52,-37 -E14001530,Suffolk Coastal,69,-29 -E14001531,Sunderland Central,58,-15 -E14001532,Surrey Heath,57,-39 -E14001533,Sussex Weald,70,-42 -E14001534,Sutton and Cheam,60,-42 -E14001535,Sutton Coldfield,56,-31 -E14001536,Swindon North,53,-39 -E14001537,Swindon South,53,-40 -E14001538,Tamworth,57,-30 -E14001539,Tatton,52,-26 -E14001540,Taunton and Wellington,49,-42 -E14001541,Telford,52,-29 -E14001542,Tewkesbury,53,-36 -E14001543,The Wrekin,51,-29 -E14001544,Thirsk and Malton,60,-18 -E14001545,Thornbury and Yate,51,-36 -E14001546,Thurrock,67,-36 -E14001547,Tipton and Wednesbury,52,-31 -E14001548,Tiverton and Minehead,47,-41 -E14001549,Tonbridge,68,-41 -E14001550,Tooting,61,-42 -E14001551,Torbay,48,-44 -E14001552,Torridge and Tavistock,46,-42 -E14001553,Tottenham,62,-37 -E14001554,Truro and Falmouth,44,-45 -E14001555,Tunbridge Wells,69,-42 -E14001556,Twickenham,58,-41 -E14001557,Tynemouth,56,-13 -E14001558,Uxbridge and South Ruislip,58,-37 -E14001559,Vauxhall and Camberwell Green,63,-41 -E14001560,Wakefield and Rothwell,59,-22 -E14001561,Wallasey,48,-27 -E14001562,Walsall and Bloxwich,55,-30 -E14001563,Walthamstow,63,-37 -E14001564,Warrington North,51,-23 -E14001565,Warrington South,51,-24 -E14001566,Warwick and Leamington,55,-35 -E14001567,Washington and Gateshead South,55,-15 -E14001568,Watford,65,-35 -E14001569,Waveney Valley,67,-28 -E14001570,Weald of Kent,70,-41 -E14001571,Wellingborough and Rushden,63,-30 -E14001572,Wells and Mendip Hills,50,-40 -E14001573,Welwyn Hatfield,65,-33 -E14001574,West Bromwich,52,-32 -E14001575,West Dorset,50,-44 -E14001576,West Ham and Beckton,66,-38 -E14001577,West Lancashire,49,-21 -E14001578,West Suffolk,67,-30 -E14001579,West Worcestershire,52,-35 -E14001580,Westmorland and Lonsdale,53,-15 -E14001581,Weston-super-Mare,49,-40 -E14001582,Wetherby and Easingwold,62,-20 -E14001583,Whitehaven and Workington,53,-16 -E14001584,Widnes and Halewood,51,-26 -E14001585,Wigan,51,-20 -E14001586,Wimbledon,60,-41 -E14001587,Winchester,55,-40 -E14001588,Windsor,57,-38 -E14001589,Wirral West,49,-28 -E14001590,Witham,68,-33 -E14001591,Witney,56,-35 -E14001592,Woking,57,-40 -E14001593,Wokingham,55,-38 -E14001594,Wolverhampton North East,53,-29 -E14001595,Wolverhampton South East,54,-30 -E14001596,Wolverhampton West,53,-30 -E14001597,Worcester,53,-34 -E14001598,Worsley and Eccles,52,-23 -E14001599,Worthing West,64,-44 -E14001600,Wycombe,58,-36 -E14001601,Wyre Forest,50,-33 -E14001602,Wythenshawe and Sale East,53,-26 -E14001603,Yeovil,50,-42 -E14001604,York Central,60,-19 -E14001605,York Outer,61,-18 -N05000001,Belfast East,45,-17 -N05000002,Belfast North,45,-16 -N05000003,Belfast South and Mid Down,45,-18 -N05000004,Belfast West,44,-17 -N05000005,East Antrim,45,-15 -N05000006,East Londonderry,43,-15 -N05000007,Fermanagh and South Tyrone,42,-17 -N05000008,Foyle,42,-15 -N05000009,Lagan Valley,44,-18 -N05000010,Mid Ulster,43,-16 -N05000011,Newry and Armagh,44,-19 -N05000012,North Antrim,44,-15 -N05000013,North Down,46,-16 -N05000014,South Antrim,44,-16 -N05000015,South Down,46,-18 -N05000016,Strangford,46,-17 -N05000017,Upper Bann,43,-18 -N05000018,West Tyrone,42,-16 -S14000021,East Renfrewshire,48,-11 -S14000027,Na h-Eileanan an Iar,47,-2 -S14000045,Midlothian,52,-11 -S14000048,North Ayrshire and Arran,48,-10 -S14000051,Orkney and Shetland,51,0 -S14000060,Aberdeen North,52,-3 -S14000061,Aberdeen South,52,-4 -S14000062,Aberdeenshire North and Moray East,51,-3 -S14000063,Airdrie and Shotts,50,-11 -S14000064,Alloa and Grangemouth,50,-7 -S14000065,Angus and Perthshire Glens,50,-5 -S14000066,Arbroath and Broughty Ferry,52,-5 -S14000067,"Argyll, Bute and South Lochaber",49,-5 -S14000068,Bathgate and Linlithgow,51,-9 -S14000069,"Caithness, Sutherland and Easter Ross",50,-2 -S14000070,Coatbridge and Bellshill,50,-12 -S14000071,Cowdenbeath and Kirkcaldy,52,-7 -S14000072,Cumbernauld and Kirkintilloch,50,-8 -S14000073,Dumfries and Galloway,51,-13 -S14000074,"Dumfriesshire, Clydesdale and Tweeddale",52,-13 -S14000075,Dundee Central,50,-6 -S14000076,Dunfermline and Dollar,51,-7 -S14000077,East Kilbride and Strathaven,48,-13 -S14000078,Edinburgh East and Musselburgh,54,-10 -S14000079,Edinburgh North and Leith,53,-9 -S14000080,Edinburgh South,53,-10 -S14000081,Edinburgh South West,52,-10 -S14000082,Edinburgh West,52,-9 -S14000083,Falkirk,51,-8 -S14000084,Glasgow East,51,-10 -S14000085,Glasgow North,49,-9 -S14000086,Glasgow North East,50,-9 -S14000087,Glasgow South,49,-11 -S14000088,Glasgow South West,50,-10 -S14000089,Glasgow West,49,-8 -S14000090,Glenrothes and Mid Fife,52,-6 -S14000091,Gordon and Buchan,50,-4 -S14000092,Hamilton and Clyde Valley,51,-12 -S14000093,Inverclyde and Renfrewshire West,48,-8 -S14000094,"Inverness, Skye and West Ross-shire",49,-3 -S14000095,Livingston,51,-11 -S14000096,Lothian East,53,-11 -S14000097,Mid Dunbartonshire,49,-7 -S14000098,"Moray West, Nairn and Strathspey",49,-4 -S14000099,"Motherwell, Wishaw and Carluke",52,-12 -S14000100,North East Fife,51,-6 -S14000101,Paisley and Renfrewshire North,48,-9 -S14000102,Paisley and Renfrewshire South,49,-10 -S14000103,Perth and Kinross-shire,51,-5 -S14000104,Rutherglen,49,-12 -S14000105,Stirling and Strathallan,49,-6 -S14000106,West Dunbartonshire,48,-7 -S14000107,"Ayr, Carrick and Cumnock",49,-13 -S14000108,"Berwickshire, Roxburgh and Selkirk",53,-12 -S14000109,Central Ayrshire,48,-12 -S14000110,Kilmarnock and Loudoun,50,-13 -S14000111,West Aberdeenshire and Kincardine,51,-4 -W07000081,Aberafan Maesteg,46,-36 -W07000082,Alyn and Deeside,49,-29 -W07000083,Bangor Aberconwy,47,-31 -W07000084,Blaenau Gwent and Rhymney,49,-33 -W07000085,"Brecon, Radnor and Cwm Tawe",50,-32 -W07000086,Bridgend,46,-37 -W07000087,Caerfyrddin,49,-32 -W07000088,Caerphilly,49,-35 -W07000089,Cardiff East,48,-37 -W07000090,Cardiff North,48,-36 -W07000091,Cardiff South and Penarth,48,-38 -W07000092,Cardiff West,47,-37 -W07000093,Ceredigion Preseli,48,-34 -W07000094,Clwyd East,49,-30 -W07000095,Clwyd North,48,-30 -W07000096,Dwyfor Meirionnydd,48,-31 -W07000097,Gower,44,-37 -W07000098,Llanelli,45,-36 -W07000099,Merthyr Tydfil and Aberdare,49,-34 -W07000100,Mid and South Pembrokeshire,44,-36 -W07000101,Monmouthshire,50,-36 -W07000102,Montgomeryshire and Glyndwr,49,-31 -W07000103,Neath and Swansea East,47,-35 -W07000104,Newport East,49,-37 -W07000105,Newport West and Islwyn,49,-36 -W07000106,Pontypridd,48,-35 -W07000107,Rhondda and Ogmore,47,-36 -W07000108,Swansea West,45,-37 -W07000109,Torfaen,50,-34 -W07000110,Vale of Glamorgan,47,-38 -W07000111,Wrexham,50,-30 -W07000112,Ynys Môn,46,-29 +code,name +E14001063,Aldershot +E14001064,Aldridge-Brownhills +E14001065,Altrincham and Sale West +E14001066,Amber Valley +E14001067,Arundel and South Downs +E14001068,Ashfield +E14001069,Ashford +E14001070,Ashton-under-Lyne +E14001071,Aylesbury +E14001072,Banbury +E14001073,Barking +E14001074,Barnsley North +E14001075,Barnsley South +E14001076,Barrow and Furness +E14001077,Basildon and Billericay +E14001078,Basingstoke +E14001079,Bassetlaw +E14001080,Bath +E14001081,Battersea +E14001082,Beaconsfield +E14001083,Beckenham and Penge +E14001084,Bedford +E14001085,Bermondsey and Old Southwark +E14001086,Bethnal Green and Stepney +E14001087,Beverley and Holderness +E14001088,Bexhill and Battle +E14001089,Bexleyheath and Crayford +E14001090,Bicester and Woodstock +E14001091,Birkenhead +E14001092,Birmingham Edgbaston +E14001093,Birmingham Erdington +E14001094,Birmingham Hall Green and Moseley +E14001095,Birmingham Hodge Hill and Solihull North +E14001096,Birmingham Ladywood +E14001097,Birmingham Northfield +E14001098,Birmingham Perry Barr +E14001099,Birmingham Selly Oak +E14001100,Birmingham Yardley +E14001101,Bishop Auckland +E14001102,Blackburn +E14001103,Blackley and Middleton South +E14001104,Blackpool North and Fleetwood +E14001105,Blackpool South +E14001106,Blaydon and Consett +E14001107,Blyth and Ashington +E14001108,Bognor Regis and Littlehampton +E14001109,Bolsover +E14001110,Bolton North East +E14001111,Bolton South and Walkden +E14001112,Bolton West +E14001113,Bootle +E14001114,Boston and Skegness +E14001115,Bournemouth East +E14001116,Bournemouth West +E14001117,Bracknell +E14001118,Bradford East +E14001119,Bradford South +E14001120,Bradford West +E14001121,Braintree +E14001122,Brent East +E14001123,Brent West +E14001124,Brentford and Isleworth +E14001125,Brentwood and Ongar +E14001126,Bridgwater +E14001127,Bridlington and The Wolds +E14001128,Brigg and Immingham +E14001129,Brighton Kemptown and Peacehaven +E14001130,Brighton Pavilion +E14001131,Bristol Central +E14001132,Bristol East +E14001133,Bristol North East +E14001134,Bristol North West +E14001135,Bristol South +E14001136,Broadland and Fakenham +E14001137,Bromley and Biggin Hill +E14001138,Bromsgrove +E14001139,Broxbourne +E14001140,Broxtowe +E14001141,Buckingham and Bletchley +E14001142,Burnley +E14001143,Burton and Uttoxeter +E14001144,Bury North +E14001145,Bury South +E14001146,Bury St Edmunds and Stowmarket +E14001147,Calder Valley +E14001148,Camborne and Redruth +E14001149,Cambridge +E14001150,Cannock Chase +E14001151,Canterbury +E14001152,Carlisle +E14001153,Carshalton and Wallington +E14001154,Castle Point +E14001155,Central Devon +E14001156,Central Suffolk and North Ipswich +E14001157,Chatham and Aylesford +E14001158,Cheadle +E14001159,Chelmsford +E14001160,Chelsea and Fulham +E14001161,Cheltenham +E14001162,Chesham and Amersham +E14001163,Chester North and Neston +E14001164,Chester South and Eddisbury +E14001165,Chesterfield +E14001166,Chichester +E14001167,Chingford and Woodford Green +E14001168,Chippenham +E14001169,Chipping Barnet +E14001170,Chorley +E14001171,Christchurch +E14001172,Cities of London and Westminster +E14001173,City of Durham +E14001174,Clacton +E14001175,Clapham and Brixton Hill +E14001176,Colchester +E14001177,Colne Valley +E14001178,Congleton +E14001179,Corby and East Northamptonshire +E14001180,Coventry East +E14001181,Coventry North West +E14001182,Coventry South +E14001183,Cramlington and Killingworth +E14001184,Crawley +E14001185,Crewe and Nantwich +E14001186,Croydon East +E14001187,Croydon South +E14001188,Croydon West +E14001189,Dagenham and Rainham +E14001190,Darlington +E14001191,Dartford +E14001192,Daventry +E14001193,Derby North +E14001194,Derby South +E14001195,Derbyshire Dales +E14001196,Dewsbury and Batley +E14001197,Didcot and Wantage +E14001198,Doncaster Central +E14001199,Doncaster East and the Isle of Axholme +E14001200,Doncaster North +E14001201,Dorking and Horley +E14001202,Dover and Deal +E14001203,Droitwich and Evesham +E14001204,Dudley +E14001205,Dulwich and West Norwood +E14001206,Dunstable and Leighton Buzzard +E14001207,Ealing Central and Acton +E14001208,Ealing North +E14001209,Ealing Southall +E14001210,Earley and Woodley +E14001211,Easington +E14001212,East Grinstead and Uckfield +E14001213,East Ham +E14001214,East Hampshire +E14001215,East Surrey +E14001216,East Thanet +E14001217,East Wiltshire +E14001218,East Worthing and Shoreham +E14001219,Eastbourne +E14001220,Eastleigh +E14001221,Edmonton and Winchmore Hill +E14001222,Ellesmere Port and Bromborough +E14001223,Eltham and Chislehurst +E14001224,Ely and East Cambridgeshire +E14001225,Enfield North +E14001226,Epping Forest +E14001227,Epsom and Ewell +E14001228,Erewash +E14001229,Erith and Thamesmead +E14001230,Esher and Walton +E14001231,Exeter +E14001232,Exmouth and Exeter East +E14001233,Fareham and Waterlooville +E14001234,Farnham and Bordon +E14001235,Faversham and Mid Kent +E14001236,Feltham and Heston +E14001237,Filton and Bradley Stoke +E14001238,Finchley and Golders Green +E14001239,Folkestone and Hythe +E14001240,Forest of Dean +E14001241,Frome and East Somerset +E14001242,Fylde +E14001243,Gainsborough +E14001244,Gateshead Central and Whickham +E14001245,Gedling +E14001246,Gillingham and Rainham +E14001247,Glastonbury and Somerton +E14001248,Gloucester +E14001249,Godalming and Ash +E14001250,Goole and Pocklington +E14001251,Gorton and Denton +E14001252,Gosport +E14001253,Grantham and Bourne +E14001254,Gravesham +E14001255,Great Grimsby and Cleethorpes +E14001256,Great Yarmouth +E14001257,Greenwich and Woolwich +E14001258,Guildford +E14001259,Hackney North and Stoke Newington +E14001260,Hackney South and Shoreditch +E14001261,Halesowen +E14001262,Halifax +E14001263,Hamble Valley +E14001264,Hammersmith and Chiswick +E14001265,Hampstead and Highgate +E14001266,"Harborough, Oadby and Wigston" +E14001267,Harlow +E14001268,Harpenden and Berkhamsted +E14001269,Harrogate and Knaresborough +E14001270,Harrow East +E14001271,Harrow West +E14001272,Hartlepool +E14001273,Harwich and North Essex +E14001274,Hastings and Rye +E14001275,Havant +E14001276,Hayes and Harlington +E14001277,Hazel Grove +E14001278,Hemel Hempstead +E14001279,Hendon +E14001280,Henley and Thame +E14001281,Hereford and South Herefordshire +E14001282,Herne Bay and Sandwich +E14001283,Hertford and Stortford +E14001284,Hertsmere +E14001285,Hexham +E14001286,Heywood and Middleton North +E14001287,High Peak +E14001288,Hinckley and Bosworth +E14001289,Hitchin +E14001290,Holborn and St Pancras +E14001291,Honiton and Sidmouth +E14001292,Hornchurch and Upminster +E14001293,Hornsey and Friern Barnet +E14001294,Horsham +E14001295,Houghton and Sunderland South +E14001296,Hove and Portslade +E14001297,Huddersfield +E14001298,Huntingdon +E14001299,Hyndburn +E14001300,Ilford North +E14001301,Ilford South +E14001302,Ipswich +E14001303,Isle of Wight East +E14001304,Isle of Wight West +E14001305,Islington North +E14001306,Islington South and Finsbury +E14001307,Jarrow and Gateshead East +E14001308,Keighley and Ilkley +E14001309,Kenilworth and Southam +E14001310,Kensington and Bayswater +E14001311,Kettering +E14001312,Kingston and Surbiton +E14001313,Kingston upon Hull East +E14001314,Kingston upon Hull North and Cottingham +E14001315,Kingston upon Hull West and Haltemprice +E14001316,Kingswinford and South Staffordshire +E14001317,Knowsley +E14001318,Lancaster and Wyre +E14001319,Leeds Central and Headingley +E14001320,Leeds East +E14001321,Leeds North East +E14001322,Leeds North West +E14001323,Leeds South +E14001324,Leeds South West and Morley +E14001325,Leeds West and Pudsey +E14001326,Leicester East +E14001327,Leicester South +E14001328,Leicester West +E14001329,Leigh and Atherton +E14001330,Lewes +E14001331,Lewisham East +E14001332,Lewisham North +E14001333,Lewisham West and East Dulwich +E14001334,Leyton and Wanstead +E14001335,Lichfield +E14001336,Lincoln +E14001337,Liverpool Garston +E14001338,Liverpool Riverside +E14001339,Liverpool Walton +E14001340,Liverpool Wavertree +E14001341,Liverpool West Derby +E14001342,Loughborough +E14001343,Louth and Horncastle +E14001344,Lowestoft +E14001345,Luton North +E14001346,Luton South and South Bedfordshire +E14001347,Macclesfield +E14001348,Maidenhead +E14001349,Maidstone and Malling +E14001350,Makerfield +E14001351,Maldon +E14001352,Manchester Central +E14001353,Manchester Rusholme +E14001354,Manchester Withington +E14001355,Mansfield +E14001356,Melksham and Devizes +E14001357,Melton and Syston +E14001358,Meriden and Solihull East +E14001359,Mid Bedfordshire +E14001360,Mid Buckinghamshire +E14001361,Mid Cheshire +E14001362,Mid Derbyshire +E14001363,Mid Dorset and North Poole +E14001364,Mid Leicestershire +E14001365,Mid Norfolk +E14001366,Mid Sussex +E14001367,Middlesbrough and Thornaby East +E14001368,Middlesbrough South and East Cleveland +E14001369,Milton Keynes Central +E14001370,Milton Keynes North +E14001371,Mitcham and Morden +E14001372,Morecambe and Lunesdale +E14001373,New Forest East +E14001374,New Forest West +E14001375,Newark +E14001376,Newbury +E14001377,Newcastle upon Tyne Central and West +E14001378,Newcastle upon Tyne East and Wallsend +E14001379,Newcastle upon Tyne North +E14001380,Newcastle-under-Lyme +E14001381,Newton Abbot +E14001382,Newton Aycliffe and Spennymoor +E14001383,Normanton and Hemsworth +E14001384,North Bedfordshire +E14001385,North Cornwall +E14001386,North Cotswolds +E14001387,North Devon +E14001388,North Dorset +E14001389,North Durham +E14001390,North East Cambridgeshire +E14001391,North East Derbyshire +E14001392,North East Hampshire +E14001393,North East Hertfordshire +E14001394,North East Somerset and Hanham +E14001395,North Herefordshire +E14001396,North Norfolk +E14001397,North Northumberland +E14001398,North Shropshire +E14001399,North Somerset +E14001400,North Warwickshire and Bedworth +E14001401,North West Cambridgeshire +E14001402,North West Essex +E14001403,North West Hampshire +E14001404,North West Leicestershire +E14001405,North West Norfolk +E14001406,Northampton North +E14001407,Northampton South +E14001408,Norwich North +E14001409,Norwich South +E14001410,Nottingham East +E14001411,Nottingham North and Kimberley +E14001412,Nottingham South +E14001413,Nuneaton +E14001414,Old Bexley and Sidcup +E14001415,Oldham East and Saddleworth +E14001416,"Oldham West, Chadderton and Royton" +E14001417,Orpington +E14001418,Ossett and Denby Dale +E14001419,Oxford East +E14001420,Oxford West and Abingdon +E14001421,Peckham +E14001422,Pendle and Clitheroe +E14001423,Penistone and Stocksbridge +E14001424,Penrith and Solway +E14001425,Peterborough +E14001426,Plymouth Moor View +E14001427,Plymouth Sutton and Devonport +E14001428,"Pontefract, Castleford and Knottingley" +E14001429,Poole +E14001430,Poplar and Limehouse +E14001431,Portsmouth North +E14001432,Portsmouth South +E14001433,Preston +E14001434,Putney +E14001435,Queen's Park and Maida Vale +E14001436,Rawmarsh and Conisbrough +E14001437,Rayleigh and Wickford +E14001438,Reading Central +E14001439,Reading West and Mid Berkshire +E14001440,Redcar +E14001441,Redditch +E14001442,Reigate +E14001443,Ribble Valley +E14001444,Richmond and Northallerton +E14001445,Richmond Park +E14001446,Rochdale +E14001447,Rochester and Strood +E14001448,Romford +E14001449,Romsey and Southampton North +E14001450,Rossendale and Darwen +E14001451,Rother Valley +E14001452,Rotherham +E14001453,Rugby +E14001454,"Ruislip, Northwood and Pinner" +E14001455,Runcorn and Helsby +E14001456,Runnymede and Weybridge +E14001457,Rushcliffe +E14001458,Rutland and Stamford +E14001459,Salford +E14001460,Salisbury +E14001461,Scarborough and Whitby +E14001462,Scunthorpe +E14001463,Sefton Central +E14001464,Selby +E14001465,Sevenoaks +E14001466,Sheffield Brightside and Hillsborough +E14001467,Sheffield Central +E14001468,Sheffield Hallam +E14001469,Sheffield Heeley +E14001470,Sheffield South East +E14001471,Sherwood Forest +E14001472,Shipley +E14001473,Shrewsbury +E14001474,Sittingbourne and Sheppey +E14001475,Skipton and Ripon +E14001476,Sleaford and North Hykeham +E14001477,Slough +E14001478,Smethwick +E14001479,Solihull West and Shirley +E14001480,South Basildon and East Thurrock +E14001481,South Cambridgeshire +E14001482,South Cotswolds +E14001483,South Derbyshire +E14001484,South Devon +E14001485,South Dorset +E14001486,South East Cornwall +E14001487,South Holland and The Deepings +E14001488,South Leicestershire +E14001489,South Norfolk +E14001490,South Northamptonshire +E14001491,South Ribble +E14001492,South Shields +E14001493,South Shropshire +E14001494,South Suffolk +E14001495,South West Devon +E14001496,South West Hertfordshire +E14001497,South West Norfolk +E14001498,South West Wiltshire +E14001499,Southampton Itchen +E14001500,Southampton Test +E14001501,Southend East and Rochford +E14001502,Southend West and Leigh +E14001503,Southgate and Wood Green +E14001504,Southport +E14001505,Spelthorne +E14001506,Spen Valley +E14001507,St Albans +E14001508,St Austell and Newquay +E14001509,St Helens North +E14001510,St Helens South and Whiston +E14001511,St Ives +E14001512,St Neots and Mid Cambridgeshire +E14001513,Stafford +E14001514,Staffordshire Moorlands +E14001515,Stalybridge and Hyde +E14001516,Stevenage +E14001517,Stockport +E14001518,Stockton North +E14001519,Stockton West +E14001520,Stoke-on-Trent Central +E14001521,Stoke-on-Trent North +E14001522,Stoke-on-Trent South +E14001523,"Stone, Great Wyrley and Penkridge" +E14001524,Stourbridge +E14001525,Stratford and Bow +E14001526,Stratford-on-Avon +E14001527,Streatham and Croydon North +E14001528,Stretford and Urmston +E14001529,Stroud +E14001530,Suffolk Coastal +E14001531,Sunderland Central +E14001532,Surrey Heath +E14001533,Sussex Weald +E14001534,Sutton and Cheam +E14001535,Sutton Coldfield +E14001536,Swindon North +E14001537,Swindon South +E14001538,Tamworth +E14001539,Tatton +E14001540,Taunton and Wellington +E14001541,Telford +E14001542,Tewkesbury +E14001543,The Wrekin +E14001544,Thirsk and Malton +E14001545,Thornbury and Yate +E14001546,Thurrock +E14001547,Tipton and Wednesbury +E14001548,Tiverton and Minehead +E14001549,Tonbridge +E14001550,Tooting +E14001551,Torbay +E14001552,Torridge and Tavistock +E14001553,Tottenham +E14001554,Truro and Falmouth +E14001555,Tunbridge Wells +E14001556,Twickenham +E14001557,Tynemouth +E14001558,Uxbridge and South Ruislip +E14001559,Vauxhall and Camberwell Green +E14001560,Wakefield and Rothwell +E14001561,Wallasey +E14001562,Walsall and Bloxwich +E14001563,Walthamstow +E14001564,Warrington North +E14001565,Warrington South +E14001566,Warwick and Leamington +E14001567,Washington and Gateshead South +E14001568,Watford +E14001569,Waveney Valley +E14001570,Weald of Kent +E14001571,Wellingborough and Rushden +E14001572,Wells and Mendip Hills +E14001573,Welwyn Hatfield +E14001574,West Bromwich +E14001575,West Dorset +E14001576,West Ham and Beckton +E14001577,West Lancashire +E14001578,West Suffolk +E14001579,West Worcestershire +E14001580,Westmorland and Lonsdale +E14001581,Weston-super-Mare +E14001582,Wetherby and Easingwold +E14001583,Whitehaven and Workington +E14001584,Widnes and Halewood +E14001585,Wigan +E14001586,Wimbledon +E14001587,Winchester +E14001588,Windsor +E14001589,Wirral West +E14001590,Witham +E14001591,Witney +E14001592,Woking +E14001593,Wokingham +E14001594,Wolverhampton North East +E14001595,Wolverhampton South East +E14001596,Wolverhampton West +E14001597,Worcester +E14001598,Worsley and Eccles +E14001599,Worthing West +E14001600,Wycombe +E14001601,Wyre Forest +E14001602,Wythenshawe and Sale East +E14001603,Yeovil +E14001604,York Central +E14001605,York Outer +N05000001,Belfast East +N05000002,Belfast North +N05000003,Belfast South and Mid Down +N05000004,Belfast West +N05000005,East Antrim +N05000006,East Londonderry +N05000007,Fermanagh and South Tyrone +N05000008,Foyle +N05000009,Lagan Valley +N05000010,Mid Ulster +N05000011,Newry and Armagh +N05000012,North Antrim +N05000013,North Down +N05000014,South Antrim +N05000015,South Down +N05000016,Strangford +N05000017,Upper Bann +N05000018,West Tyrone +S14000021,East Renfrewshire +S14000027,Na h-Eileanan an Iar +S14000045,Midlothian +S14000048,North Ayrshire and Arran +S14000051,Orkney and Shetland +S14000060,Aberdeen North +S14000061,Aberdeen South +S14000062,Aberdeenshire North and Moray East +S14000063,Airdrie and Shotts +S14000064,Alloa and Grangemouth +S14000065,Angus and Perthshire Glens +S14000066,Arbroath and Broughty Ferry +S14000067,"Argyll, Bute and South Lochaber" +S14000068,Bathgate and Linlithgow +S14000069,"Caithness, Sutherland and Easter Ross" +S14000070,Coatbridge and Bellshill +S14000071,Cowdenbeath and Kirkcaldy +S14000072,Cumbernauld and Kirkintilloch +S14000073,Dumfries and Galloway +S14000074,"Dumfriesshire, Clydesdale and Tweeddale" +S14000075,Dundee Central +S14000076,Dunfermline and Dollar +S14000077,East Kilbride and Strathaven +S14000078,Edinburgh East and Musselburgh +S14000079,Edinburgh North and Leith +S14000080,Edinburgh South +S14000081,Edinburgh South West +S14000082,Edinburgh West +S14000083,Falkirk +S14000084,Glasgow East +S14000085,Glasgow North +S14000086,Glasgow North East +S14000087,Glasgow South +S14000088,Glasgow South West +S14000089,Glasgow West +S14000090,Glenrothes and Mid Fife +S14000091,Gordon and Buchan +S14000092,Hamilton and Clyde Valley +S14000093,Inverclyde and Renfrewshire West +S14000094,"Inverness, Skye and West Ross-shire" +S14000095,Livingston +S14000096,Lothian East +S14000097,Mid Dunbartonshire +S14000098,"Moray West, Nairn and Strathspey" +S14000099,"Motherwell, Wishaw and Carluke" +S14000100,North East Fife +S14000101,Paisley and Renfrewshire North +S14000102,Paisley and Renfrewshire South +S14000103,Perth and Kinross-shire +S14000104,Rutherglen +S14000105,Stirling and Strathallan +S14000106,West Dunbartonshire +S14000107,"Ayr, Carrick and Cumnock" +S14000108,"Berwickshire, Roxburgh and Selkirk" +S14000109,Central Ayrshire +S14000110,Kilmarnock and Loudoun +S14000111,West Aberdeenshire and Kincardine +W07000081,Aberafan Maesteg +W07000082,Alyn and Deeside +W07000083,Bangor Aberconwy +W07000084,Blaenau Gwent and Rhymney +W07000085,"Brecon, Radnor and Cwm Tawe" +W07000086,Bridgend +W07000087,Caerfyrddin +W07000088,Caerphilly +W07000089,Cardiff East +W07000090,Cardiff North +W07000091,Cardiff South and Penarth +W07000092,Cardiff West +W07000093,Ceredigion Preseli +W07000094,Clwyd East +W07000095,Clwyd North +W07000096,Dwyfor Meirionnydd +W07000097,Gower +W07000098,Llanelli +W07000099,Merthyr Tydfil and Aberdare +W07000100,Mid and South Pembrokeshire +W07000101,Monmouthshire +W07000102,Montgomeryshire and Glyndwr +W07000103,Neath and Swansea East +W07000104,Newport East +W07000105,Newport West and Islwyn +W07000106,Pontypridd +W07000107,Rhondda and Ogmore +W07000108,Swansea West +W07000109,Torfaen +W07000110,Vale of Glamorgan +W07000111,Wrexham +W07000112,Ynys Môn diff --git a/tests/unit/test_country.py b/tests/unit/test_country.py index aa5b10934..fca1ca3a4 100644 --- a/tests/unit/test_country.py +++ b/tests/unit/test_country.py @@ -413,6 +413,31 @@ def test__northern_irish_local_authorities_have_n_prefix( assert "N09000011" in set(northern_irish_las["code"]) +class TestConstituenciesDataFile: + """Tests for the 2024 constituencies CSV data file.""" + + @pytest.fixture + def constituencies_df(self): + return pd.read_csv(AREA_LIST_DIRECTORY / "constituencies_2024.csv") + + def test__file_has_only_code_and_name_columns(self, constituencies_df): + """The file holds each constituency's code and name, and no hex-map position.""" + assert list(constituencies_df.columns) == ["code", "name"] + + def test__file_has_650_constituencies(self, constituencies_df): + assert len(constituencies_df) == 650 + + def test__file_matches_the_installed_policyengine_list(self, constituencies_df): + """Codes and names equal .py's packaged 2024 constituency list. + + .py's list is read from the installed package, so a .py update that + changes a code or a name makes this test fail until the file follows. + """ + policyengine_list = pd.read_csv(packaged_uk_area_list_path("constituency")) + + assert _names_by_code(constituencies_df) == _names_by_code(policyengine_list) + + class TestSimulationCompatibility: def test__create_simulation_uses_legacy_tax_benefit_system_signature(self): class LegacySimulation: From fc680a35b50d6d3186b3905d4e7e92cce4befe9d Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:55:27 +0400 Subject: [PATCH 3/4] Build the UK region list from .py's packaged area lists The UK metadata's constituency and local-authority region options now come from the area lists packaged with .py, the files .py builds its UK region registry from. `get_py_uk_area_names` in `constants.py` reads them from the installed policyengine wheel through `distribution("policyengine").locate_file(...)`, as `get_py_manifest` does for the bundle manifest. It does not import .py: importing any .py module builds .py's country models, which adds several seconds to startup and requests release manifests from Hugging Face. The Public API's own `constituencies_2024.csv` and `local_authorities_2021.csv` are deleted, with the tests that only checked those files. Tests: - New, failed before this change: the area options follow a stand-in .py wheel's area lists, sorted by name (they listed the Public API's own 1,011 areas instead); and a subprocess that blocks .py imports reads both lists in file order (`get_py_uk_area_names` did not exist). - New, passed before and after: the area options equal `build_uk_region_registry(include_constituencies=True, include_local_authorities=True)`, by name, label, type and order. It replaces the narrower registry-label check for local authorities. - Unchanged and still passing: the comparison with the recorded 1,016-entry region list. Co-Authored-By: Claude Opus 5.5 --- changelog.d/area-lists-without-xy.removed.md | 1 - changelog.d/uk-area-lists-from-py.changed.md | 1 + policyengine_api/constants.py | 31 +- policyengine_api/country.py | 31 +- policyengine_api/data/constituencies_2024.csv | 651 ------------------ .../data/local_authorities_2021.csv | 362 ---------- tests/unit/test_constants.py | 76 +- tests/unit/test_country.py | 212 +++--- 8 files changed, 189 insertions(+), 1176 deletions(-) delete mode 100644 changelog.d/area-lists-without-xy.removed.md create mode 100644 changelog.d/uk-area-lists-from-py.changed.md delete mode 100644 policyengine_api/data/constituencies_2024.csv delete mode 100644 policyengine_api/data/local_authorities_2021.csv diff --git a/changelog.d/area-lists-without-xy.removed.md b/changelog.d/area-lists-without-xy.removed.md deleted file mode 100644 index c6fb0d232..000000000 --- a/changelog.d/area-lists-without-xy.removed.md +++ /dev/null @@ -1 +0,0 @@ -Removed the unused `x` and `y` hex-map position columns from the packaged UK constituency and local-authority area lists; the UK metadata's region options are unchanged. diff --git a/changelog.d/uk-area-lists-from-py.changed.md b/changelog.d/uk-area-lists-from-py.changed.md new file mode 100644 index 000000000..7822614c8 --- /dev/null +++ b/changelog.d/uk-area-lists-from-py.changed.md @@ -0,0 +1 @@ +The UK metadata's constituency and local-authority region options are read from the area lists packaged with .py, without importing .py, and the Public API's own copies of those lists are removed; the region options are unchanged. diff --git a/policyengine_api/constants.py b/policyengine_api/constants.py index d16d41692..0729c48bb 100644 --- a/policyengine_api/constants.py +++ b/policyengine_api/constants.py @@ -1,11 +1,16 @@ -"""API version, country package versions and bundle metadata, resolved at import.""" +"""API version, country package versions and bundle metadata, resolved at import. +Also reads the UK area lists packaged with .py. +""" + +import csv import hashlib +import io import json from datetime import datetime from importlib.metadata import distribution, distributions from pathlib import Path -from typing import Any +from typing import Any, Literal from policyengine_api.dataset_display import ( DEFAULT_DATASET_DISPLAY_LABEL, @@ -57,6 +62,28 @@ def get_py_manifest() -> Any: # noqa: ANN401 # SimplePath, which open() reject ) +UKAreaType = Literal["constituency", "local_authority"] +PY_UK_AREA_LIST_FILES: dict[UKAreaType, str] = { + "constituency": "policyengine/data/uk_geography/constituencies_2024.csv", + "local_authority": "policyengine/data/uk_geography/local_authorities_2023.csv", +} + + +def get_py_uk_area_names(area_type: UKAreaType) -> list[str]: + """Return the area names in .py's packaged list for a UK area type, in file order. + + .py builds its UK region registry from these files. They are read from the + installed policyengine wheel rather than through .py, because importing + any .py module builds .py's country models, which takes several seconds + and requests release manifests over the network. + """ + area_list = distribution("policyengine").locate_file( + PY_UK_AREA_LIST_FILES[area_type] + ) + rows = csv.DictReader(io.StringIO(area_list.read_text(encoding="utf-8"))) + return [row["name"] for row in rows] + + def _load_policyengine_bundle() -> dict | None: try: with Path(get_py_manifest()).open() as manifest_file: diff --git a/policyengine_api/country.py b/policyengine_api/country.py index 8c04362b4..362dafc17 100644 --- a/policyengine_api/country.py +++ b/policyengine_api/country.py @@ -12,7 +12,6 @@ from typing import Any, NamedTuple import dpath -import pandas as pd from policyengine_core.model_api import Enum, Reform, Variable from policyengine_core.parameters import ( Parameter, @@ -30,6 +29,7 @@ from policyengine_api.constants import ( UK_COUNTRY_REGIONS, get_bundle_default_dataset_option, + get_py_uk_area_names, ) from policyengine_api.data.congressional_districts import ( build_congressional_district_metadata, @@ -197,11 +197,6 @@ def build_microsimulation_options(self) -> dict: # time_period: [{ name: 2022, label: "2022", ... }] } options = {} if self.country_id == "uk": - constituency_names_path = ( - Path(__file__).parent / "data" / "constituencies_2024.csv" - ) - constituency_names = pd.read_csv(constituency_names_path) - constituency_names = constituency_names.sort_values("name") region = [ {"name": "uk", "label": "the UK", "type": "national"}, *( @@ -209,26 +204,16 @@ def build_microsimulation_options(self) -> dict: for name, label in UK_COUNTRY_REGIONS ), ] + # Constituencies, then local authorities, each sorted by name, from + # the area lists .py builds its UK region registry from. region.extend( { - "name": f"constituency/{constituency_names.iloc[i]['name']}", - "label": constituency_names.iloc[i]["name"], - "type": "constituency", - } - for i in range(len(constituency_names)) - ) - local_authority_names_path = ( - Path(__file__).parent / "data" / "local_authorities_2021.csv" - ) - local_authority_names = pd.read_csv(local_authority_names_path) - local_authority_names = local_authority_names.sort_values("name") - region.extend( - { - "name": f"local_authority/{local_authority_names.iloc[i]['name']}", - "label": local_authority_names.iloc[i]["name"], - "type": "local_authority", + "name": f"{area_type}/{area_name}", + "label": area_name, + "type": area_type, } - for i in range(len(local_authority_names)) + for area_type in ("constituency", "local_authority") + for area_name in sorted(get_py_uk_area_names(area_type)) ) time_period = [ {"name": 2024, "label": "2024"}, diff --git a/policyengine_api/data/constituencies_2024.csv b/policyengine_api/data/constituencies_2024.csv deleted file mode 100644 index 04c4b34ea..000000000 --- a/policyengine_api/data/constituencies_2024.csv +++ /dev/null @@ -1,651 +0,0 @@ -code,name -E14001063,Aldershot -E14001064,Aldridge-Brownhills -E14001065,Altrincham and Sale West -E14001066,Amber Valley -E14001067,Arundel and South Downs -E14001068,Ashfield -E14001069,Ashford -E14001070,Ashton-under-Lyne -E14001071,Aylesbury -E14001072,Banbury -E14001073,Barking -E14001074,Barnsley North -E14001075,Barnsley South -E14001076,Barrow and Furness -E14001077,Basildon and Billericay -E14001078,Basingstoke -E14001079,Bassetlaw -E14001080,Bath -E14001081,Battersea -E14001082,Beaconsfield -E14001083,Beckenham and Penge -E14001084,Bedford -E14001085,Bermondsey and Old Southwark -E14001086,Bethnal Green and Stepney -E14001087,Beverley and Holderness -E14001088,Bexhill and Battle -E14001089,Bexleyheath and Crayford -E14001090,Bicester and Woodstock -E14001091,Birkenhead -E14001092,Birmingham Edgbaston -E14001093,Birmingham Erdington -E14001094,Birmingham Hall Green and Moseley -E14001095,Birmingham Hodge Hill and Solihull North -E14001096,Birmingham Ladywood -E14001097,Birmingham Northfield -E14001098,Birmingham Perry Barr -E14001099,Birmingham Selly Oak -E14001100,Birmingham Yardley -E14001101,Bishop Auckland -E14001102,Blackburn -E14001103,Blackley and Middleton South -E14001104,Blackpool North and Fleetwood -E14001105,Blackpool South -E14001106,Blaydon and Consett -E14001107,Blyth and Ashington -E14001108,Bognor Regis and Littlehampton -E14001109,Bolsover -E14001110,Bolton North East -E14001111,Bolton South and Walkden -E14001112,Bolton West -E14001113,Bootle -E14001114,Boston and Skegness -E14001115,Bournemouth East -E14001116,Bournemouth West -E14001117,Bracknell -E14001118,Bradford East -E14001119,Bradford South -E14001120,Bradford West -E14001121,Braintree -E14001122,Brent East -E14001123,Brent West -E14001124,Brentford and Isleworth -E14001125,Brentwood and Ongar -E14001126,Bridgwater -E14001127,Bridlington and The Wolds -E14001128,Brigg and Immingham -E14001129,Brighton Kemptown and Peacehaven -E14001130,Brighton Pavilion -E14001131,Bristol Central -E14001132,Bristol East -E14001133,Bristol North East -E14001134,Bristol North West -E14001135,Bristol South -E14001136,Broadland and Fakenham -E14001137,Bromley and Biggin Hill -E14001138,Bromsgrove -E14001139,Broxbourne -E14001140,Broxtowe -E14001141,Buckingham and Bletchley -E14001142,Burnley -E14001143,Burton and Uttoxeter -E14001144,Bury North -E14001145,Bury South -E14001146,Bury St Edmunds and Stowmarket -E14001147,Calder Valley -E14001148,Camborne and Redruth -E14001149,Cambridge -E14001150,Cannock Chase -E14001151,Canterbury -E14001152,Carlisle -E14001153,Carshalton and Wallington -E14001154,Castle Point -E14001155,Central Devon -E14001156,Central Suffolk and North Ipswich -E14001157,Chatham and Aylesford -E14001158,Cheadle -E14001159,Chelmsford -E14001160,Chelsea and Fulham -E14001161,Cheltenham -E14001162,Chesham and Amersham -E14001163,Chester North and Neston -E14001164,Chester South and Eddisbury -E14001165,Chesterfield -E14001166,Chichester -E14001167,Chingford and Woodford Green -E14001168,Chippenham -E14001169,Chipping Barnet -E14001170,Chorley -E14001171,Christchurch -E14001172,Cities of London and Westminster -E14001173,City of Durham -E14001174,Clacton -E14001175,Clapham and Brixton Hill -E14001176,Colchester -E14001177,Colne Valley -E14001178,Congleton -E14001179,Corby and East Northamptonshire -E14001180,Coventry East -E14001181,Coventry North West -E14001182,Coventry South -E14001183,Cramlington and Killingworth -E14001184,Crawley -E14001185,Crewe and Nantwich -E14001186,Croydon East -E14001187,Croydon South -E14001188,Croydon West -E14001189,Dagenham and Rainham -E14001190,Darlington -E14001191,Dartford -E14001192,Daventry -E14001193,Derby North -E14001194,Derby South -E14001195,Derbyshire Dales -E14001196,Dewsbury and Batley -E14001197,Didcot and Wantage -E14001198,Doncaster Central -E14001199,Doncaster East and the Isle of Axholme -E14001200,Doncaster North -E14001201,Dorking and Horley -E14001202,Dover and Deal -E14001203,Droitwich and Evesham -E14001204,Dudley -E14001205,Dulwich and West Norwood -E14001206,Dunstable and Leighton Buzzard -E14001207,Ealing Central and Acton -E14001208,Ealing North -E14001209,Ealing Southall -E14001210,Earley and Woodley -E14001211,Easington -E14001212,East Grinstead and Uckfield -E14001213,East Ham -E14001214,East Hampshire -E14001215,East Surrey -E14001216,East Thanet -E14001217,East Wiltshire -E14001218,East Worthing and Shoreham -E14001219,Eastbourne -E14001220,Eastleigh -E14001221,Edmonton and Winchmore Hill -E14001222,Ellesmere Port and Bromborough -E14001223,Eltham and Chislehurst -E14001224,Ely and East Cambridgeshire -E14001225,Enfield North -E14001226,Epping Forest -E14001227,Epsom and Ewell -E14001228,Erewash -E14001229,Erith and Thamesmead -E14001230,Esher and Walton -E14001231,Exeter -E14001232,Exmouth and Exeter East -E14001233,Fareham and Waterlooville -E14001234,Farnham and Bordon -E14001235,Faversham and Mid Kent -E14001236,Feltham and Heston -E14001237,Filton and Bradley Stoke -E14001238,Finchley and Golders Green -E14001239,Folkestone and Hythe -E14001240,Forest of Dean -E14001241,Frome and East Somerset -E14001242,Fylde -E14001243,Gainsborough -E14001244,Gateshead Central and Whickham -E14001245,Gedling -E14001246,Gillingham and Rainham -E14001247,Glastonbury and Somerton -E14001248,Gloucester -E14001249,Godalming and Ash -E14001250,Goole and Pocklington -E14001251,Gorton and Denton -E14001252,Gosport -E14001253,Grantham and Bourne -E14001254,Gravesham -E14001255,Great Grimsby and Cleethorpes -E14001256,Great Yarmouth -E14001257,Greenwich and Woolwich -E14001258,Guildford -E14001259,Hackney North and Stoke Newington -E14001260,Hackney South and Shoreditch -E14001261,Halesowen -E14001262,Halifax -E14001263,Hamble Valley -E14001264,Hammersmith and Chiswick -E14001265,Hampstead and Highgate -E14001266,"Harborough, Oadby and Wigston" -E14001267,Harlow -E14001268,Harpenden and Berkhamsted -E14001269,Harrogate and Knaresborough -E14001270,Harrow East -E14001271,Harrow West -E14001272,Hartlepool -E14001273,Harwich and North Essex -E14001274,Hastings and Rye -E14001275,Havant -E14001276,Hayes and Harlington -E14001277,Hazel Grove -E14001278,Hemel Hempstead -E14001279,Hendon -E14001280,Henley and Thame -E14001281,Hereford and South Herefordshire -E14001282,Herne Bay and Sandwich -E14001283,Hertford and Stortford -E14001284,Hertsmere -E14001285,Hexham -E14001286,Heywood and Middleton North -E14001287,High Peak -E14001288,Hinckley and Bosworth -E14001289,Hitchin -E14001290,Holborn and St Pancras -E14001291,Honiton and Sidmouth -E14001292,Hornchurch and Upminster -E14001293,Hornsey and Friern Barnet -E14001294,Horsham -E14001295,Houghton and Sunderland South -E14001296,Hove and Portslade -E14001297,Huddersfield -E14001298,Huntingdon -E14001299,Hyndburn -E14001300,Ilford North -E14001301,Ilford South -E14001302,Ipswich -E14001303,Isle of Wight East -E14001304,Isle of Wight West -E14001305,Islington North -E14001306,Islington South and Finsbury -E14001307,Jarrow and Gateshead East -E14001308,Keighley and Ilkley -E14001309,Kenilworth and Southam -E14001310,Kensington and Bayswater -E14001311,Kettering -E14001312,Kingston and Surbiton -E14001313,Kingston upon Hull East -E14001314,Kingston upon Hull North and Cottingham -E14001315,Kingston upon Hull West and Haltemprice -E14001316,Kingswinford and South Staffordshire -E14001317,Knowsley -E14001318,Lancaster and Wyre -E14001319,Leeds Central and Headingley -E14001320,Leeds East -E14001321,Leeds North East -E14001322,Leeds North West -E14001323,Leeds South -E14001324,Leeds South West and Morley -E14001325,Leeds West and Pudsey -E14001326,Leicester East -E14001327,Leicester South -E14001328,Leicester West -E14001329,Leigh and Atherton -E14001330,Lewes -E14001331,Lewisham East -E14001332,Lewisham North -E14001333,Lewisham West and East Dulwich -E14001334,Leyton and Wanstead -E14001335,Lichfield -E14001336,Lincoln -E14001337,Liverpool Garston -E14001338,Liverpool Riverside -E14001339,Liverpool Walton -E14001340,Liverpool Wavertree -E14001341,Liverpool West Derby -E14001342,Loughborough -E14001343,Louth and Horncastle -E14001344,Lowestoft -E14001345,Luton North -E14001346,Luton South and South Bedfordshire -E14001347,Macclesfield -E14001348,Maidenhead -E14001349,Maidstone and Malling -E14001350,Makerfield -E14001351,Maldon -E14001352,Manchester Central -E14001353,Manchester Rusholme -E14001354,Manchester Withington -E14001355,Mansfield -E14001356,Melksham and Devizes -E14001357,Melton and Syston -E14001358,Meriden and Solihull East -E14001359,Mid Bedfordshire -E14001360,Mid Buckinghamshire -E14001361,Mid Cheshire -E14001362,Mid Derbyshire -E14001363,Mid Dorset and North Poole -E14001364,Mid Leicestershire -E14001365,Mid Norfolk -E14001366,Mid Sussex -E14001367,Middlesbrough and Thornaby East -E14001368,Middlesbrough South and East Cleveland -E14001369,Milton Keynes Central -E14001370,Milton Keynes North -E14001371,Mitcham and Morden -E14001372,Morecambe and Lunesdale -E14001373,New Forest East -E14001374,New Forest West -E14001375,Newark -E14001376,Newbury -E14001377,Newcastle upon Tyne Central and West -E14001378,Newcastle upon Tyne East and Wallsend -E14001379,Newcastle upon Tyne North -E14001380,Newcastle-under-Lyme -E14001381,Newton Abbot -E14001382,Newton Aycliffe and Spennymoor -E14001383,Normanton and Hemsworth -E14001384,North Bedfordshire -E14001385,North Cornwall -E14001386,North Cotswolds -E14001387,North Devon -E14001388,North Dorset -E14001389,North Durham -E14001390,North East Cambridgeshire -E14001391,North East Derbyshire -E14001392,North East Hampshire -E14001393,North East Hertfordshire -E14001394,North East Somerset and Hanham -E14001395,North Herefordshire -E14001396,North Norfolk -E14001397,North Northumberland -E14001398,North Shropshire -E14001399,North Somerset -E14001400,North Warwickshire and Bedworth -E14001401,North West Cambridgeshire -E14001402,North West Essex -E14001403,North West Hampshire -E14001404,North West Leicestershire -E14001405,North West Norfolk -E14001406,Northampton North -E14001407,Northampton South -E14001408,Norwich North -E14001409,Norwich South -E14001410,Nottingham East -E14001411,Nottingham North and Kimberley -E14001412,Nottingham South -E14001413,Nuneaton -E14001414,Old Bexley and Sidcup -E14001415,Oldham East and Saddleworth -E14001416,"Oldham West, Chadderton and Royton" -E14001417,Orpington -E14001418,Ossett and Denby Dale -E14001419,Oxford East -E14001420,Oxford West and Abingdon -E14001421,Peckham -E14001422,Pendle and Clitheroe -E14001423,Penistone and Stocksbridge -E14001424,Penrith and Solway -E14001425,Peterborough -E14001426,Plymouth Moor View -E14001427,Plymouth Sutton and Devonport -E14001428,"Pontefract, Castleford and Knottingley" -E14001429,Poole -E14001430,Poplar and Limehouse -E14001431,Portsmouth North -E14001432,Portsmouth South -E14001433,Preston -E14001434,Putney -E14001435,Queen's Park and Maida Vale -E14001436,Rawmarsh and Conisbrough -E14001437,Rayleigh and Wickford -E14001438,Reading Central -E14001439,Reading West and Mid Berkshire -E14001440,Redcar -E14001441,Redditch -E14001442,Reigate -E14001443,Ribble Valley -E14001444,Richmond and Northallerton -E14001445,Richmond Park -E14001446,Rochdale -E14001447,Rochester and Strood -E14001448,Romford -E14001449,Romsey and Southampton North -E14001450,Rossendale and Darwen -E14001451,Rother Valley -E14001452,Rotherham -E14001453,Rugby -E14001454,"Ruislip, Northwood and Pinner" -E14001455,Runcorn and Helsby -E14001456,Runnymede and Weybridge -E14001457,Rushcliffe -E14001458,Rutland and Stamford -E14001459,Salford -E14001460,Salisbury -E14001461,Scarborough and Whitby -E14001462,Scunthorpe -E14001463,Sefton Central -E14001464,Selby -E14001465,Sevenoaks -E14001466,Sheffield Brightside and Hillsborough -E14001467,Sheffield Central -E14001468,Sheffield Hallam -E14001469,Sheffield Heeley -E14001470,Sheffield South East -E14001471,Sherwood Forest -E14001472,Shipley -E14001473,Shrewsbury -E14001474,Sittingbourne and Sheppey -E14001475,Skipton and Ripon -E14001476,Sleaford and North Hykeham -E14001477,Slough -E14001478,Smethwick -E14001479,Solihull West and Shirley -E14001480,South Basildon and East Thurrock -E14001481,South Cambridgeshire -E14001482,South Cotswolds -E14001483,South Derbyshire -E14001484,South Devon -E14001485,South Dorset -E14001486,South East Cornwall -E14001487,South Holland and The Deepings -E14001488,South Leicestershire -E14001489,South Norfolk -E14001490,South Northamptonshire -E14001491,South Ribble -E14001492,South Shields -E14001493,South Shropshire -E14001494,South Suffolk -E14001495,South West Devon -E14001496,South West Hertfordshire -E14001497,South West Norfolk -E14001498,South West Wiltshire -E14001499,Southampton Itchen -E14001500,Southampton Test -E14001501,Southend East and Rochford -E14001502,Southend West and Leigh -E14001503,Southgate and Wood Green -E14001504,Southport -E14001505,Spelthorne -E14001506,Spen Valley -E14001507,St Albans -E14001508,St Austell and Newquay -E14001509,St Helens North -E14001510,St Helens South and Whiston -E14001511,St Ives -E14001512,St Neots and Mid Cambridgeshire -E14001513,Stafford -E14001514,Staffordshire Moorlands -E14001515,Stalybridge and Hyde -E14001516,Stevenage -E14001517,Stockport -E14001518,Stockton North -E14001519,Stockton West -E14001520,Stoke-on-Trent Central -E14001521,Stoke-on-Trent North -E14001522,Stoke-on-Trent South -E14001523,"Stone, Great Wyrley and Penkridge" -E14001524,Stourbridge -E14001525,Stratford and Bow -E14001526,Stratford-on-Avon -E14001527,Streatham and Croydon North -E14001528,Stretford and Urmston -E14001529,Stroud -E14001530,Suffolk Coastal -E14001531,Sunderland Central -E14001532,Surrey Heath -E14001533,Sussex Weald -E14001534,Sutton and Cheam -E14001535,Sutton Coldfield -E14001536,Swindon North -E14001537,Swindon South -E14001538,Tamworth -E14001539,Tatton -E14001540,Taunton and Wellington -E14001541,Telford -E14001542,Tewkesbury -E14001543,The Wrekin -E14001544,Thirsk and Malton -E14001545,Thornbury and Yate -E14001546,Thurrock -E14001547,Tipton and Wednesbury -E14001548,Tiverton and Minehead -E14001549,Tonbridge -E14001550,Tooting -E14001551,Torbay -E14001552,Torridge and Tavistock -E14001553,Tottenham -E14001554,Truro and Falmouth -E14001555,Tunbridge Wells -E14001556,Twickenham -E14001557,Tynemouth -E14001558,Uxbridge and South Ruislip -E14001559,Vauxhall and Camberwell Green -E14001560,Wakefield and Rothwell -E14001561,Wallasey -E14001562,Walsall and Bloxwich -E14001563,Walthamstow -E14001564,Warrington North -E14001565,Warrington South -E14001566,Warwick and Leamington -E14001567,Washington and Gateshead South -E14001568,Watford -E14001569,Waveney Valley -E14001570,Weald of Kent -E14001571,Wellingborough and Rushden -E14001572,Wells and Mendip Hills -E14001573,Welwyn Hatfield -E14001574,West Bromwich -E14001575,West Dorset -E14001576,West Ham and Beckton -E14001577,West Lancashire -E14001578,West Suffolk -E14001579,West Worcestershire -E14001580,Westmorland and Lonsdale -E14001581,Weston-super-Mare -E14001582,Wetherby and Easingwold -E14001583,Whitehaven and Workington -E14001584,Widnes and Halewood -E14001585,Wigan -E14001586,Wimbledon -E14001587,Winchester -E14001588,Windsor -E14001589,Wirral West -E14001590,Witham -E14001591,Witney -E14001592,Woking -E14001593,Wokingham -E14001594,Wolverhampton North East -E14001595,Wolverhampton South East -E14001596,Wolverhampton West -E14001597,Worcester -E14001598,Worsley and Eccles -E14001599,Worthing West -E14001600,Wycombe -E14001601,Wyre Forest -E14001602,Wythenshawe and Sale East -E14001603,Yeovil -E14001604,York Central -E14001605,York Outer -N05000001,Belfast East -N05000002,Belfast North -N05000003,Belfast South and Mid Down -N05000004,Belfast West -N05000005,East Antrim -N05000006,East Londonderry -N05000007,Fermanagh and South Tyrone -N05000008,Foyle -N05000009,Lagan Valley -N05000010,Mid Ulster -N05000011,Newry and Armagh -N05000012,North Antrim -N05000013,North Down -N05000014,South Antrim -N05000015,South Down -N05000016,Strangford -N05000017,Upper Bann -N05000018,West Tyrone -S14000021,East Renfrewshire -S14000027,Na h-Eileanan an Iar -S14000045,Midlothian -S14000048,North Ayrshire and Arran -S14000051,Orkney and Shetland -S14000060,Aberdeen North -S14000061,Aberdeen South -S14000062,Aberdeenshire North and Moray East -S14000063,Airdrie and Shotts -S14000064,Alloa and Grangemouth -S14000065,Angus and Perthshire Glens -S14000066,Arbroath and Broughty Ferry -S14000067,"Argyll, Bute and South Lochaber" -S14000068,Bathgate and Linlithgow -S14000069,"Caithness, Sutherland and Easter Ross" -S14000070,Coatbridge and Bellshill -S14000071,Cowdenbeath and Kirkcaldy -S14000072,Cumbernauld and Kirkintilloch -S14000073,Dumfries and Galloway -S14000074,"Dumfriesshire, Clydesdale and Tweeddale" -S14000075,Dundee Central -S14000076,Dunfermline and Dollar -S14000077,East Kilbride and Strathaven -S14000078,Edinburgh East and Musselburgh -S14000079,Edinburgh North and Leith -S14000080,Edinburgh South -S14000081,Edinburgh South West -S14000082,Edinburgh West -S14000083,Falkirk -S14000084,Glasgow East -S14000085,Glasgow North -S14000086,Glasgow North East -S14000087,Glasgow South -S14000088,Glasgow South West -S14000089,Glasgow West -S14000090,Glenrothes and Mid Fife -S14000091,Gordon and Buchan -S14000092,Hamilton and Clyde Valley -S14000093,Inverclyde and Renfrewshire West -S14000094,"Inverness, Skye and West Ross-shire" -S14000095,Livingston -S14000096,Lothian East -S14000097,Mid Dunbartonshire -S14000098,"Moray West, Nairn and Strathspey" -S14000099,"Motherwell, Wishaw and Carluke" -S14000100,North East Fife -S14000101,Paisley and Renfrewshire North -S14000102,Paisley and Renfrewshire South -S14000103,Perth and Kinross-shire -S14000104,Rutherglen -S14000105,Stirling and Strathallan -S14000106,West Dunbartonshire -S14000107,"Ayr, Carrick and Cumnock" -S14000108,"Berwickshire, Roxburgh and Selkirk" -S14000109,Central Ayrshire -S14000110,Kilmarnock and Loudoun -S14000111,West Aberdeenshire and Kincardine -W07000081,Aberafan Maesteg -W07000082,Alyn and Deeside -W07000083,Bangor Aberconwy -W07000084,Blaenau Gwent and Rhymney -W07000085,"Brecon, Radnor and Cwm Tawe" -W07000086,Bridgend -W07000087,Caerfyrddin -W07000088,Caerphilly -W07000089,Cardiff East -W07000090,Cardiff North -W07000091,Cardiff South and Penarth -W07000092,Cardiff West -W07000093,Ceredigion Preseli -W07000094,Clwyd East -W07000095,Clwyd North -W07000096,Dwyfor Meirionnydd -W07000097,Gower -W07000098,Llanelli -W07000099,Merthyr Tydfil and Aberdare -W07000100,Mid and South Pembrokeshire -W07000101,Monmouthshire -W07000102,Montgomeryshire and Glyndwr -W07000103,Neath and Swansea East -W07000104,Newport East -W07000105,Newport West and Islwyn -W07000106,Pontypridd -W07000107,Rhondda and Ogmore -W07000108,Swansea West -W07000109,Torfaen -W07000110,Vale of Glamorgan -W07000111,Wrexham -W07000112,Ynys Môn diff --git a/policyengine_api/data/local_authorities_2021.csv b/policyengine_api/data/local_authorities_2021.csv deleted file mode 100644 index 52c4a32be..000000000 --- a/policyengine_api/data/local_authorities_2021.csv +++ /dev/null @@ -1,362 +0,0 @@ -code,name -E06000001,Hartlepool -E06000002,Middlesbrough -E06000003,Redcar and Cleveland -E06000004,Stockton-on-Tees -E06000005,Darlington -E06000006,Halton -E06000007,Warrington -E06000008,Blackburn with Darwen -E06000009,Blackpool -E06000010,"Kingston upon Hull, City of" -E06000011,East Riding of Yorkshire -E06000012,North East Lincolnshire -E06000013,North Lincolnshire -E06000014,York -E06000015,Derby -E06000016,Leicester -E06000017,Rutland -E06000018,Nottingham -E06000019,"Herefordshire, County of" -E06000020,Telford and Wrekin -E06000021,Stoke-on-Trent -E06000022,Bath and North East Somerset -E06000023,"Bristol, City of" -E06000024,North Somerset -E06000025,South Gloucestershire -E06000026,Plymouth -E06000027,Torbay -E06000030,Swindon -E06000031,Peterborough -E06000032,Luton -E06000033,Southend-on-Sea -E06000034,Thurrock -E06000035,Medway -E06000036,Bracknell Forest -E06000037,West Berkshire -E06000038,Reading -E06000039,Slough -E06000040,Windsor and Maidenhead -E06000041,Wokingham -E06000042,Milton Keynes -E06000043,Brighton and Hove -E06000044,Portsmouth -E06000045,Southampton -E06000046,Isle of Wight -E06000047,County Durham -E06000049,Cheshire East -E06000050,Cheshire West and Chester -E06000051,Shropshire -E06000052,Cornwall -E06000053,Isles of Scilly -E06000054,Wiltshire -E06000055,Bedford -E06000056,Central Bedfordshire -E06000057,Northumberland -E06000058,"Bournemouth, Christchurch and Poole" -E06000059,Dorset -E06000060,Buckinghamshire -E06000061,North Northamptonshire -E06000062,West Northamptonshire -E06000063,Cumberland -E06000064,Westmorland and Furness -E06000065,North Yorkshire -E06000066,Somerset -E07000008,Cambridge -E07000009,East Cambridgeshire -E07000010,Fenland -E07000011,Huntingdonshire -E07000012,South Cambridgeshire -E07000032,Amber Valley -E07000033,Bolsover -E07000034,Chesterfield -E07000035,Derbyshire Dales -E07000036,Erewash -E07000037,High Peak -E07000038,North East Derbyshire -E07000039,South Derbyshire -E07000040,East Devon -E07000041,Exeter -E07000042,Mid Devon -E07000043,North Devon -E07000044,South Hams -E07000045,Teignbridge -E07000046,Torridge -E07000047,West Devon -E07000061,Eastbourne -E07000062,Hastings -E07000063,Lewes -E07000064,Rother -E07000065,Wealden -E07000066,Basildon -E07000067,Braintree -E07000068,Brentwood -E07000069,Castle Point -E07000070,Chelmsford -E07000071,Colchester -E07000072,Epping Forest -E07000073,Harlow -E07000074,Maldon -E07000075,Rochford -E07000076,Tendring -E07000077,Uttlesford -E07000078,Cheltenham -E07000079,Cotswold -E07000080,Forest of Dean -E07000081,Gloucester -E07000082,Stroud -E07000083,Tewkesbury -E07000084,Basingstoke and Deane -E07000085,East Hampshire -E07000086,Eastleigh -E07000087,Fareham -E07000088,Gosport -E07000089,Hart -E07000090,Havant -E07000091,New Forest -E07000092,Rushmoor -E07000093,Test Valley -E07000094,Winchester -E07000095,Broxbourne -E07000096,Dacorum -E07000098,Hertsmere -E07000099,North Hertfordshire -E07000102,Three Rivers -E07000103,Watford -E07000105,Ashford -E07000106,Canterbury -E07000107,Dartford -E07000108,Dover -E07000109,Gravesham -E07000110,Maidstone -E07000111,Sevenoaks -E07000112,Folkestone and Hythe -E07000113,Swale -E07000114,Thanet -E07000115,Tonbridge and Malling -E07000116,Tunbridge Wells -E07000117,Burnley -E07000118,Chorley -E07000119,Fylde -E07000120,Hyndburn -E07000121,Lancaster -E07000122,Pendle -E07000123,Preston -E07000124,Ribble Valley -E07000125,Rossendale -E07000126,South Ribble -E07000127,West Lancashire -E07000128,Wyre -E07000129,Blaby -E07000130,Charnwood -E07000131,Harborough -E07000132,Hinckley and Bosworth -E07000133,Melton -E07000134,North West Leicestershire -E07000135,Oadby and Wigston -E07000136,Boston -E07000137,East Lindsey -E07000138,Lincoln -E07000139,North Kesteven -E07000140,South Holland -E07000141,South Kesteven -E07000142,West Lindsey -E07000143,Breckland -E07000144,Broadland -E07000145,Great Yarmouth -E07000146,King's Lynn and West Norfolk -E07000147,North Norfolk -E07000148,Norwich -E07000149,South Norfolk -E07000170,Ashfield -E07000171,Bassetlaw -E07000172,Broxtowe -E07000173,Gedling -E07000174,Mansfield -E07000175,Newark and Sherwood -E07000176,Rushcliffe -E07000177,Cherwell -E07000178,Oxford -E07000179,South Oxfordshire -E07000180,Vale of White Horse -E07000181,West Oxfordshire -E07000192,Cannock Chase -E07000193,East Staffordshire -E07000194,Lichfield -E07000195,Newcastle-under-Lyme -E07000196,South Staffordshire -E07000197,Stafford -E07000198,Staffordshire Moorlands -E07000199,Tamworth -E07000200,Babergh -E07000202,Ipswich -E07000203,Mid Suffolk -E07000207,Elmbridge -E07000208,Epsom and Ewell -E07000209,Guildford -E07000210,Mole Valley -E07000211,Reigate and Banstead -E07000212,Runnymede -E07000213,Spelthorne -E07000214,Surrey Heath -E07000215,Tandridge -E07000216,Waverley -E07000217,Woking -E07000218,North Warwickshire -E07000219,Nuneaton and Bedworth -E07000220,Rugby -E07000221,Stratford-on-Avon -E07000222,Warwick -E07000223,Adur -E07000224,Arun -E07000225,Chichester -E07000226,Crawley -E07000227,Horsham -E07000228,Mid Sussex -E07000229,Worthing -E07000234,Bromsgrove -E07000235,Malvern Hills -E07000236,Redditch -E07000237,Worcester -E07000238,Wychavon -E07000239,Wyre Forest -E07000240,St Albans -E07000241,Welwyn Hatfield -E07000242,East Hertfordshire -E07000243,Stevenage -E07000244,East Suffolk -E07000245,West Suffolk -E08000001,Bolton -E08000002,Bury -E08000003,Manchester -E08000004,Oldham -E08000005,Rochdale -E08000006,Salford -E08000007,Stockport -E08000008,Tameside -E08000009,Trafford -E08000010,Wigan -E08000011,Knowsley -E08000012,Liverpool -E08000013,St. Helens -E08000014,Sefton -E08000015,Wirral -E08000016,Barnsley -E08000017,Doncaster -E08000018,Rotherham -E08000019,Sheffield -E08000021,Newcastle upon Tyne -E08000022,North Tyneside -E08000023,South Tyneside -E08000024,Sunderland -E08000025,Birmingham -E08000026,Coventry -E08000027,Dudley -E08000028,Sandwell -E08000029,Solihull -E08000030,Walsall -E08000031,Wolverhampton -E08000032,Bradford -E08000033,Calderdale -E08000034,Kirklees -E08000035,Leeds -E08000036,Wakefield -E08000037,Gateshead -E09000001,City of London -E09000002,Barking and Dagenham -E09000003,Barnet -E09000004,Bexley -E09000005,Brent -E09000006,Bromley -E09000007,Camden -E09000008,Croydon -E09000009,Ealing -E09000010,Enfield -E09000011,Greenwich -E09000012,Hackney -E09000013,Hammersmith and Fulham -E09000014,Haringey -E09000015,Harrow -E09000016,Havering -E09000017,Hillingdon -E09000018,Hounslow -E09000019,Islington -E09000020,Kensington and Chelsea -E09000021,Kingston upon Thames -E09000022,Lambeth -E09000023,Lewisham -E09000024,Merton -E09000025,Newham -E09000026,Redbridge -E09000027,Richmond upon Thames -E09000028,Southwark -E09000029,Sutton -E09000030,Tower Hamlets -E09000031,Waltham Forest -E09000032,Wandsworth -E09000033,Westminster -N09000001,Antrim and Newtownabbey -N09000002,"Armagh City, Banbridge and Craigavon" -N09000003,Belfast -N09000004,Causeway Coast and Glens -N09000005,Derry City and Strabane -N09000006,Fermanagh and Omagh -N09000007,Lisburn and Castlereagh -N09000008,Mid and East Antrim -N09000009,Mid Ulster -N09000010,"Newry, Mourne and Down" -N09000011,Ards and North Down -S12000005,Clackmannanshire -S12000006,Dumfries and Galloway -S12000008,East Ayrshire -S12000010,East Lothian -S12000011,East Renfrewshire -S12000013,Na h-Eileanan Siar -S12000014,Falkirk -S12000017,Highland -S12000018,Inverclyde -S12000019,Midlothian -S12000020,Moray -S12000021,North Ayrshire -S12000023,Orkney Islands -S12000026,Scottish Borders -S12000027,Shetland Islands -S12000028,South Ayrshire -S12000029,South Lanarkshire -S12000030,Stirling -S12000033,Aberdeen City -S12000034,Aberdeenshire -S12000035,Argyll and Bute -S12000036,City of Edinburgh -S12000038,Renfrewshire -S12000039,West Dunbartonshire -S12000040,West Lothian -S12000041,Angus -S12000042,Dundee City -S12000045,East Dunbartonshire -S12000047,Fife -S12000048,Perth and Kinross -S12000049,Glasgow City -S12000050,North Lanarkshire -W06000001,Isle of Anglesey -W06000002,Gwynedd -W06000003,Conwy -W06000004,Denbighshire -W06000005,Flintshire -W06000006,Wrexham -W06000008,Ceredigion -W06000009,Pembrokeshire -W06000010,Carmarthenshire -W06000011,Swansea -W06000012,Neath Port Talbot -W06000013,Bridgend -W06000014,Vale of Glamorgan -W06000015,Cardiff -W06000016,Rhondda Cynon Taf -W06000018,Caerphilly -W06000019,Blaenau Gwent -W06000020,Torfaen -W06000021,Monmouthshire -W06000022,Newport -W06000023,Powys -W06000024,Merthyr Tydfil diff --git a/tests/unit/test_constants.py b/tests/unit/test_constants.py index ffa441a99..cd7e44a47 100644 --- a/tests/unit/test_constants.py +++ b/tests/unit/test_constants.py @@ -21,6 +21,24 @@ get_py_manifest, ) +# Prepended to a subprocess script: any import of .py (the ``policyengine`` +# package) after this raises. +BLOCK_POLICYENGINE_IMPORTS = """ +import importlib.abc +import json +import sys + + +class BlockPolicyEngineImports(importlib.abc.MetaPathFinder): + def find_spec(self, fullname, path=None, target=None): + if fullname == "policyengine" or fullname.startswith("policyengine."): + raise AssertionError(f"Unexpected import: {fullname}") + return None + + +sys.meta_path.insert(0, BlockPolicyEngineImports()) +""" + class TestBundleDatasetDisplayLabels: @pytest.mark.parametrize( @@ -188,21 +206,9 @@ def test__get_py_manifest_returns_packaged_manifest_path(self): assert manifest_path.exists() def test__constants_load_from_manifest_without_importing_policyengine(self): - code = """ -import importlib.abc -import json -import sys - - -class BlockPolicyEngineImports(importlib.abc.MetaPathFinder): - def find_spec(self, fullname, path=None, target=None): - if fullname == "policyengine" or fullname.startswith("policyengine."): - raise AssertionError(f"Unexpected import: {fullname}") - return None - - -sys.meta_path.insert(0, BlockPolicyEngineImports()) - + code = ( + BLOCK_POLICYENGINE_IMPORTS + + """ from policyengine_api.constants import ( # noqa: E402 COUNTRY_PACKAGE_VERSIONS, POLICYENGINE_CORE_VERSION, @@ -220,6 +226,7 @@ def find_spec(self, fullname, path=None, target=None): ) ) """ + ) result = subprocess.run( [sys.executable, "-c", code], text=True, @@ -230,6 +237,45 @@ def find_spec(self, fullname, path=None, target=None): assert result.returncode == 0, result.stderr assert json.loads(result.stdout) == self._expected_bundle_versions() + def test__uk_area_names_load_without_importing_policyengine(self): + """.py's packaged area lists are read in file order, without importing .py. + + Importing any .py module builds .py's country models, which takes + several seconds and requests release manifests over the network. + """ + code = ( + BLOCK_POLICYENGINE_IMPORTS + + """ +from policyengine_api.constants import get_py_uk_area_names # noqa: E402 + +print( + json.dumps( + { + area_type: get_py_uk_area_names(area_type) + for area_type in ("constituency", "local_authority") + } + ) +) +""" + ) + result = subprocess.run( + [sys.executable, "-c", code], + text=True, + capture_output=True, + check=False, + ) + + from policyengine.countries.uk.regions import build_uk_region_registry + + registry = build_uk_region_registry( + include_constituencies=True, include_local_authorities=True + ) + assert result.returncode == 0, result.stderr + assert json.loads(result.stdout) == { + area_type: [region.label for region in registry.get_by_type(area_type)] + for area_type in ("constituency", "local_authority") + } + def test__load_policyengine_bundle_rejects_missing_manifest( self, monkeypatch, tmp_path ): diff --git a/tests/unit/test_country.py b/tests/unit/test_country.py index fca1ca3a4..f2560285a 100644 --- a/tests/unit/test_country.py +++ b/tests/unit/test_country.py @@ -1,14 +1,13 @@ import json from collections import Counter from datetime import date, datetime +from importlib.metadata import distribution from pathlib import Path from types import SimpleNamespace import numpy as np -import pandas as pd import pytest from policyengine.countries.uk.regions import build_uk_region_registry -from policyengine.data.uk_geography_assets import packaged_uk_area_list_path from policyengine_core.enums import EnumArray from policyengine_core.model_api import Enum @@ -19,14 +18,20 @@ get_requested_computations, ) -AREA_LIST_DIRECTORY = Path(__file__).parents[2] / "policyengine_api" / "data" RECORDED_UK_REGION_OPTIONS_PATH = ( Path(__file__).parents[1] / "data" / "uk_economy_region_options.json" ) +UK_AREA_TYPES = ("constituency", "local_authority") -def _names_by_code(area_list: pd.DataFrame) -> dict[str, str]: - return dict(zip(area_list["code"], area_list["name"], strict=True)) +class _InstalledWheelStandIn: + """Stands in for an installed wheel whose files are under ``root``.""" + + def __init__(self, root: Path) -> None: + self.root = root + + def locate_file(self, path: str) -> Path: + return self.root / path class ExampleEnum(Enum): @@ -209,7 +214,7 @@ def get_population(self, entity_plural): class TestUKCountryMetadata: - """Tests for UK country metadata, specifically local authority loading.""" + """Tests for UK country metadata, specifically its region options.""" @pytest.fixture def uk_country(self): @@ -241,30 +246,90 @@ def test__ards_and_north_down_is_offered(self, uk_regions): "type": "local_authority", } in uk_regions - def test__every_local_authority_resolves_in_the_policyengine_registry( - self, uk_regions - ): - """Each offered name matches a .py registry label, ignoring case. + def test__area_regions_equal_the_policyengine_registry(self, uk_regions): + """The constituency and local-authority options are .py's registry areas. - The simulation API resolves ``local_authority/{name}`` to the registry - code whose label matches the name, ignoring case. + Each option's name is ``/