Browse Source

Seed initial local authorities

pull/1395/head
Kat 3 years ago
parent
commit
c8cf54f68f
  1. 2
      app/models/local_authority.rb
  2. 25
      app/services/imports/local_authorities_service.rb
  3. 388
      config/local_authorities_data/initial_local_authorities.csv
  4. 6
      db/seeds.rb

2
app/models/local_authority.rb

@ -0,0 +1,2 @@
class LocalAuthority < ApplicationRecord
end

25
app/services/imports/local_authorities_service.rb

@ -0,0 +1,25 @@
require "csv"
module Imports
class LocalAuthoritiesService
attr_reader :path, :count
def initialize(path:)
@path = path
@count = 0
end
def call
CSV.foreach(path, headers: true) do |row|
LocalAuthority.upsert(
{ code: row["code"],
la_name: row["la_name"],
start_date: Time.zone.local(row["start_year"], 4, 1),
end_date: (Time.zone.local(row["end_year"], 3, 31) if row["end_year"]),
previous_location_only: row["previous_location_only"] },
)
@count += 1
end
end
end
end

388
config/local_authorities_data/initial_local_authorities.csv

@ -0,0 +1,388 @@
code,la_name,start_year,end_year,previous_location_only
S12000033,Aberdeen City,2021,,true
S12000034,Aberdeenshire,2021,,true
E07000223,Adur,2021,,
E07000032,Amber Valley,2021,,
S12000041,Angus,2021,,true
N09000001,Antrim and Newtownabbey,2021,,true
N09000011,Ards and North Down,2021,,true
S12000035,Argyll and Bute,2021,,true
N09000002,"Armagh City, Banbridge and Craigavon",2021,,true
E07000224,Arun,2021,,
E07000170,Ashfield,2021,,
E07000105,Ashford,2021,,
E07000200,Babergh,2021,,
E09000002,Barking and Dagenham,2021,,
E09000003,Barnet,2021,,
E08000016,Barnsley,2021,,
E07000066,Basildon,2021,,
E07000084,Basingstoke and Deane,2021,,
E07000171,Bassetlaw,2021,,
E06000022,Bath and North East Somerset,2021,,
E06000055,Bedford,2021,,
N09000003,Belfast,2021,,true
E09000004,Bexley,2021,,
E08000025,Birmingham,2021,,
E07000129,Blaby,2021,,
E06000008,Blackburn with Darwen,2021,,
E06000009,Blackpool,2021,,
W06000019,Blaenau Gwent,2021,,true
E07000033,Bolsover,2021,,
E08000001,Bolton,2021,,
E07000136,Boston,2021,,
E06000058,"Bournemouth, Christchurch and Poole",2021,,
E06000036,Bracknell Forest,2021,,
E08000032,Bradford,2021,,
E07000067,Braintree,2021,,
E07000143,Breckland,2021,,
E09000005,Brent,2021,,
E07000068,Brentwood,2021,,
W06000013,Bridgend,2021,,true
E06000043,Brighton and Hove,2021,,
E06000023,"Bristol, City of",2021,,
E07000144,Broadland,2021,,
E09000006,Bromley,2021,,
E07000234,Bromsgrove,2021,,
E07000095,Broxbourne,2021,,
E07000172,Broxtowe,2021,,
E06000060,Buckinghamshire,2021,,
E07000117,Burnley,2021,,
E08000002,Bury,2021,,
W06000018,Caerphilly,2021,,true
E08000033,Calderdale,2021,,
E07000008,Cambridge,2021,,
E09000007,Camden,2021,,
E07000192,Cannock Chase,2021,,
E07000106,Canterbury,2021,,
W06000015,Cardiff,2021,,true
W06000010,Carmarthenshire,2021,,true
E07000069,Castle Point,2021,,
N09000004,Causeway Coast and Glens,2021,,true
E06000056,Central Bedfordshire,2021,,
W06000008,Ceredigion,2021,,true
E07000130,Charnwood,2021,,
E07000070,Chelmsford,2021,,
E07000078,Cheltenham,2021,,
E07000177,Cherwell,2021,,
E06000049,Cheshire East,2021,,
E06000050,Cheshire West and Chester,2021,,
E07000034,Chesterfield,2021,,
E07000225,Chichester,2021,,
E07000118,Chorley,2021,,
S12000036,City of Edinburgh,2021,,true
E09000001,City of London,2021,,
S12000005,Clackmannanshire,2021,,true
E07000071,Colchester,2021,,
W06000003,Conwy,2021,,true
E07000150,Corby,2021,,
E06000052,Cornwall,2021,,
E07000079,Cotswold,2021,,
E06000047,County Durham,2021,,
E08000026,Coventry,2021,,
E07000226,Crawley,2021,,
E09000008,Croydon,2021,,
E06000063,Cumberland,2023,,
E07000096,Dacorum,2021,,
E06000005,Darlington,2021,,
E07000107,Dartford,2021,,
E07000151,Daventry,2021,,
W06000004,Denbighshire,2021,,true
E06000015,Derby,2021,,
E07000035,Derbyshire Dales,2021,,
N09000005,Derry City and Strabane,2021,,true
E08000017,Doncaster,2021,,
E06000059,Dorset,2021,,
E07000108,Dover,2021,,
E08000027,Dudley,2021,,
S12000006,Dumfries and Galloway,2021,,true
S12000042,Dundee City,2021,,true
E09000009,Ealing,2021,,
S12000008,East Ayrshire,2021,,true
E07000009,East Cambridgeshire,2021,,
E07000040,East Devon,2021,,
S12000045,East Dunbartonshire,2021,,true
E07000085,East Hampshire,2021,,
E07000242,East Hertfordshire,2021,,
E07000137,East Lindsey,2021,,
S12000010,East Lothian,2021,,true
E07000152,East Northamptonshire,2021,,
S12000011,East Renfrewshire,2021,,true
E06000011,East Riding of Yorkshire,2021,,
E07000193,East Staffordshire,2021,,
E07000244,East Suffolk,2021,,
E07000061,Eastbourne,2021,,
E07000086,Eastleigh,2021,,
E07000207,Elmbridge,2021,,
E09000010,Enfield,2021,,
E07000072,Epping Forest,2021,,
E07000208,Epsom and Ewell,2021,,
E07000036,Erewash,2021,,
E07000041,Exeter,2021,,
S12000014,Falkirk,2021,,true
E07000087,Fareham,2021,,
E07000010,Fenland,2021,,
N09000006,Fermanagh and Omagh,2021,,true
S12000047,Fife,2021,,true
W06000005,Flintshire,2021,,true
E07000112,Folkestone and Hythe,2021,,
E07000080,Forest of Dean,2021,,
E07000119,Fylde,2021,,
E08000037,Gateshead,2021,,
E07000173,Gedling,2021,,
S12000049,Glasgow City,2021,,true
E07000081,Gloucester,2021,,
E07000088,Gosport,2021,,
E07000109,Gravesham,2021,,
E07000145,Great Yarmouth,2021,,
E09000011,Greenwich,2021,,
E07000209,Guildford,2021,,
W06000002,Gwynedd,2021,,
E09000012,Hackney,2021,,
E06000006,Halton,2021,,
E09000013,Hammersmith and Fulham,2021,,
E07000131,Harborough,2021,,
E09000014,Haringey,2021,,
E07000073,Harlow,2021,,
E09000015,Harrow,2021,,
E07000089,Hart,2021,,
E06000001,Hartlepool,2021,,
E07000062,Hastings,2021,,
E07000090,Havant,2021,,
E09000016,Havering,2021,,
E06000019,"Herefordshire, County of",2021,,
E07000098,Hertsmere,2021,,
E07000037,High Peak,2021,,
S12000017,Highland,2021,,
E09000017,Hillingdon,2021,,
E07000132,Hinckley and Bosworth,2021,,
E07000227,Horsham,2021,,
E09000018,Hounslow,2021,,
E07000011,Huntingdonshire,2021,,
E07000120,Hyndburn,2021,,
S12000018,Inverclyde,2021,,true
E07000202,Ipswich,2021,,
W06000001,Isle of Anglesey,2021,,true
E06000046,Isle of Wight,2021,,
E06000053,Isles of Scilly,2021,,
E09000019,Islington,2021,,
E09000020,Kensington and Chelsea,2021,,
E07000153,Kettering,2021,,
E07000146,King’s Lynn and West Norfolk,2021,,
E06000010,"Kingston upon Hull, City of",2021,,
E09000021,Kingston upon Thames,2021,,
E08000034,Kirklees,2021,,
E08000011,Knowsley,2021,,
E09000022,Lambeth,2021,,
E07000121,Lancaster,2021,,
E08000035,Leeds,2021,,
E06000016,Leicester,2021,,
E07000063,Lewes,2021,,
E09000023,Lewisham,2021,,
E07000194,Lichfield,2021,,
E07000138,Lincoln,2021,,
N09000007,Lisburn and Castlereagh,2021,,true
E08000012,Liverpool,2021,,
E06000032,Luton,2021,,
E07000110,Maidstone,2021,,
E07000074,Maldon,2021,,
E07000235,Malvern Hills,2021,,
E08000003,Manchester,2021,,
E07000174,Mansfield,2021,,
E06000035,Medway,2021,,
E07000133,Melton,2021,,
W06000024,Merthyr Tydfil,2021,,true
E09000024,Merton,2021,,
E07000042,Mid Devon,2021,,
E07000203,Mid Suffolk,2021,,
E07000228,Mid Sussex,2021,,
N09000009,Mid Ulster,2021,,true
N09000008,Mid and East Antrim,2021,,true
E06000002,Middlesbrough,2021,,
S12000019,Midlothian,2021,,true
E06000042,Milton Keynes,2021,,
E07000210,Mole Valley,2021,,
W06000021,Monmouthshire,2021,,true
S12000020,Moray,2021,,true
S12000013,Na h-Eileanan Siar,2021,,true
W06000012,Neath Port Talbot,2021,,true
E07000091,New Forest,2021,,
E07000175,Newark and Sherwood,2021,,
E08000021,Newcastle upon Tyne,2021,,
E07000195,Newcastle-under-Lyme,2021,,
E09000025,Newham,2021,,
W06000022,Newport,2021,,true
N09000010,"Newry, Mourne and Down",2021,,true
S12000021,North Ayrshire,2021,,true
E07000043,North Devon,2021,,
E07000038,North East Derbyshire,2021,,
E06000012,North East Lincolnshire,2021,,
E07000099,North Hertfordshire,2021,,
E07000139,North Kesteven,2021,,
S12000050,North Lanarkshire,2021,,true
E06000013,North Lincolnshire,2021,,
E07000147,North Norfolk,2021,,
E06000024,North Somerset,2021,,
E08000022,North Tyneside,2021,,
E07000218,North Warwickshire,2021,,
E07000134,North West Leicestershire,2021,,
E07000154,Northampton,2021,,
E06000057,Northumberland,2021,,
E07000148,Norwich,2021,,
E06000018,Nottingham,2021,,
E07000219,Nuneaton and Bedworth,2021,,
E07000135,Oadby and Wigston,2021,,
E08000004,Oldham,2021,,
S12000023,Orkney Islands,2021,,true
E07000178,Oxford,2021,,
W06000009,Pembrokeshire,2021,,true
E07000122,Pendle,2021,,
S12000048,Perth and Kinross,2021,,true
E06000031,Peterborough,2021,,
E06000026,Plymouth,2021,,
E06000044,Portsmouth,2021,,
W06000023,Powys,2021,,true
E07000123,Preston,2021,,
E06000038,Reading,2021,,
E09000026,Redbridge,2021,,
E06000003,Redcar and Cleveland,2021,,
E07000236,Redditch,2021,,
E07000211,Reigate and Banstead,2021,,
S12000038,Renfrewshire,2021,,true
W06000016,Rhondda Cynon Taf,2021,,true
E07000124,Ribble Valley,2021,,
E09000027,Richmond upon Thames,2021,,
E08000005,Rochdale,2021,,
E07000075,Rochford,2021,,
E07000125,Rossendale,2021,,
E07000064,Rother,2021,,
E08000018,Rotherham,2021,,
E07000220,Rugby,2021,,
E07000212,Runnymede,2021,,
E07000176,Rushcliffe,2021,,
E07000092,Rushmoor,2021,,
E06000017,Rutland,2021,,
E08000006,Salford,2021,,
E08000028,Sandwell,2021,,
S12000026,Scottish Borders,2021,,true
E08000014,Sefton,2021,,
E07000111,Sevenoaks,2021,,
E08000019,Sheffield,2021,,
S12000027,Shetland Islands,2021,,true
E06000051,Shropshire,2021,,
E06000039,Slough,2021,,
E08000029,Solihull,2021,,
E06000066,Somerset,2023,,
S12000028,South Ayrshire,2021,,true
E07000012,South Cambridgeshire,2021,,
E07000039,South Derbyshire,2021,,
E06000025,South Gloucestershire,2021,,
E07000044,South Hams,2021,,
E07000140,South Holland,2021,,
E07000141,South Kesteven,2021,,
S12000029,South Lanarkshire,2021,,true
E07000149,South Norfolk,2021,,
E07000155,South Northamptonshire,2021,,
E07000179,South Oxfordshire,2021,,
E07000126,South Ribble,2021,,
E07000196,South Staffordshire,2021,,
E08000023,South Tyneside,2021,,
E06000045,Southampton,2021,,
E06000033,Southend-on-Sea,2021,,
E09000028,Southwark,2021,,
E07000213,Spelthorne,2021,,
E07000240,St Albans,2021,,
E08000013,St. Helens,2021,,
E07000197,Stafford,2021,,
E07000198,Staffordshire Moorlands,2021,,
E07000243,Stevenage,2021,,
S12000030,Stirling,2021,,true
E08000007,Stockport,2021,,
E06000004,Stockton-on-Tees,2021,,
E06000021,Stoke-on-Trent,2021,,
E07000221,Stratford-on-Avon,2021,,
E07000082,Stroud,2021,,
E08000024,Sunderland,2021,,
E07000214,Surrey Heath,2021,,
E09000029,Sutton,2021,,
E07000113,Swale,2021,,
W06000011,Swansea,2021,,true
E06000030,Swindon,2021,,
E08000008,Tameside,2021,,
E07000199,Tamworth,2021,,
E07000215,Tandridge,2021,,
E07000045,Teignbridge,2021,,
E06000020,Telford and Wrekin,2021,,
E07000076,Tendring,2021,,
E07000093,Test Valley,2021,,
E07000083,Tewkesbury,2021,,
E07000114,Thanet,2021,,
E07000102,Three Rivers,2021,,
E06000034,Thurrock,2021,,
E07000115,Tonbridge and Malling,2021,,
E06000027,Torbay,2021,,
W06000020,Torfaen,2021,,true
E07000046,Torridge,2021,,
E09000030,Tower Hamlets,2021,,
E08000009,Trafford,2021,,
E07000116,Tunbridge Wells,2021,,
E07000077,Uttlesford,2021,,
W06000014,Vale of Glamorgan,2021,,true
E07000180,Vale of White Horse,2021,,
E08000036,Wakefield,2021,,
E08000030,Walsall,2021,,
E09000031,Waltham Forest,2021,,
E09000032,Wandsworth,2021,,
E06000007,Warrington,2021,,
E07000222,Warwick,2021,,
E07000103,Watford,2021,,
E07000216,Waverley,2021,,
E07000065,Wealden,2021,,
E07000156,Wellingborough,2021,,
E07000241,Welwyn Hatfield,2021,,
E06000037,West Berkshire,2021,,
E07000047,West Devon,2021,,
S12000039,West Dunbartonshire,2021,,true
E07000127,West Lancashire,2021,,
E07000142,West Lindsey,2021,,
S12000040,West Lothian,2021,,true
E07000181,West Oxfordshire,2021,,
E07000245,West Suffolk,2021,,
E09000033,Westminster,2021,,
E06000064,Westmorland and Furness,2023,,
E08000010,Wigan,2021,,
E06000054,Wiltshire,2021,,
E07000094,Winchester,2021,,
E06000040,Windsor and Maidenhead,2021,,
E08000015,Wirral,2021,,
E07000217,Woking,2021,,
E06000041,Wokingham,2021,,
E08000031,Wolverhampton,2021,,
E07000237,Worcester,2021,,
E07000229,Worthing,2021,,
W06000006,Wrexham,2021,,true
E07000238,Wychavon,2021,,
E07000128,Wyre,2021,,
E07000239,Wyre Forest,2021,,
E06000014,York,2021,,
E06000065,North Yorkshire,2023,,
N92000002,Northern Ireland,2021,,true
S92000003,Scotland,2021,,true
W92000004,Wales,2021,,true
9300000XX,Outside UK,2021,,true
E07000027,Barrow-in-Furness,2021,2023,
E07000030,Eden,2021,2023,
E07000031,South Lakeland,2021,2023,
E07000026,Allerdale,2021,2023,
E07000028,Carlisle,2021,2023,
E07000029,Copeland,2021,2023,
E07000163,Craven,2021,2023,
E07000164,Hambleton,2021,2023,
E07000165,Harrogate,2021,2023,
E07000166,Richmondshire,2021,2023,
E07000167,Ryedale,2021,2023,
E07000168,Scarborough,2021,2023,
E07000169,Selby,2021,2023,
E07000187,Mendip,2021,2023,
E07000188,Sedgemoor,2021,2023,
E07000246,Somerset West and Taunton,2021,2023,
E07000189,South Somerset,2021,2023,
1 code la_name start_year end_year previous_location_only
2 S12000033 Aberdeen City 2021 true
3 S12000034 Aberdeenshire 2021 true
4 E07000223 Adur 2021
5 E07000032 Amber Valley 2021
6 S12000041 Angus 2021 true
7 N09000001 Antrim and Newtownabbey 2021 true
8 N09000011 Ards and North Down 2021 true
9 S12000035 Argyll and Bute 2021 true
10 N09000002 Armagh City, Banbridge and Craigavon 2021 true
11 E07000224 Arun 2021
12 E07000170 Ashfield 2021
13 E07000105 Ashford 2021
14 E07000200 Babergh 2021
15 E09000002 Barking and Dagenham 2021
16 E09000003 Barnet 2021
17 E08000016 Barnsley 2021
18 E07000066 Basildon 2021
19 E07000084 Basingstoke and Deane 2021
20 E07000171 Bassetlaw 2021
21 E06000022 Bath and North East Somerset 2021
22 E06000055 Bedford 2021
23 N09000003 Belfast 2021 true
24 E09000004 Bexley 2021
25 E08000025 Birmingham 2021
26 E07000129 Blaby 2021
27 E06000008 Blackburn with Darwen 2021
28 E06000009 Blackpool 2021
29 W06000019 Blaenau Gwent 2021 true
30 E07000033 Bolsover 2021
31 E08000001 Bolton 2021
32 E07000136 Boston 2021
33 E06000058 Bournemouth, Christchurch and Poole 2021
34 E06000036 Bracknell Forest 2021
35 E08000032 Bradford 2021
36 E07000067 Braintree 2021
37 E07000143 Breckland 2021
38 E09000005 Brent 2021
39 E07000068 Brentwood 2021
40 W06000013 Bridgend 2021 true
41 E06000043 Brighton and Hove 2021
42 E06000023 Bristol, City of 2021
43 E07000144 Broadland 2021
44 E09000006 Bromley 2021
45 E07000234 Bromsgrove 2021
46 E07000095 Broxbourne 2021
47 E07000172 Broxtowe 2021
48 E06000060 Buckinghamshire 2021
49 E07000117 Burnley 2021
50 E08000002 Bury 2021
51 W06000018 Caerphilly 2021 true
52 E08000033 Calderdale 2021
53 E07000008 Cambridge 2021
54 E09000007 Camden 2021
55 E07000192 Cannock Chase 2021
56 E07000106 Canterbury 2021
57 W06000015 Cardiff 2021 true
58 W06000010 Carmarthenshire 2021 true
59 E07000069 Castle Point 2021
60 N09000004 Causeway Coast and Glens 2021 true
61 E06000056 Central Bedfordshire 2021
62 W06000008 Ceredigion 2021 true
63 E07000130 Charnwood 2021
64 E07000070 Chelmsford 2021
65 E07000078 Cheltenham 2021
66 E07000177 Cherwell 2021
67 E06000049 Cheshire East 2021
68 E06000050 Cheshire West and Chester 2021
69 E07000034 Chesterfield 2021
70 E07000225 Chichester 2021
71 E07000118 Chorley 2021
72 S12000036 City of Edinburgh 2021 true
73 E09000001 City of London 2021
74 S12000005 Clackmannanshire 2021 true
75 E07000071 Colchester 2021
76 W06000003 Conwy 2021 true
77 E07000150 Corby 2021
78 E06000052 Cornwall 2021
79 E07000079 Cotswold 2021
80 E06000047 County Durham 2021
81 E08000026 Coventry 2021
82 E07000226 Crawley 2021
83 E09000008 Croydon 2021
84 E06000063 Cumberland 2023
85 E07000096 Dacorum 2021
86 E06000005 Darlington 2021
87 E07000107 Dartford 2021
88 E07000151 Daventry 2021
89 W06000004 Denbighshire 2021 true
90 E06000015 Derby 2021
91 E07000035 Derbyshire Dales 2021
92 N09000005 Derry City and Strabane 2021 true
93 E08000017 Doncaster 2021
94 E06000059 Dorset 2021
95 E07000108 Dover 2021
96 E08000027 Dudley 2021
97 S12000006 Dumfries and Galloway 2021 true
98 S12000042 Dundee City 2021 true
99 E09000009 Ealing 2021
100 S12000008 East Ayrshire 2021 true
101 E07000009 East Cambridgeshire 2021
102 E07000040 East Devon 2021
103 S12000045 East Dunbartonshire 2021 true
104 E07000085 East Hampshire 2021
105 E07000242 East Hertfordshire 2021
106 E07000137 East Lindsey 2021
107 S12000010 East Lothian 2021 true
108 E07000152 East Northamptonshire 2021
109 S12000011 East Renfrewshire 2021 true
110 E06000011 East Riding of Yorkshire 2021
111 E07000193 East Staffordshire 2021
112 E07000244 East Suffolk 2021
113 E07000061 Eastbourne 2021
114 E07000086 Eastleigh 2021
115 E07000207 Elmbridge 2021
116 E09000010 Enfield 2021
117 E07000072 Epping Forest 2021
118 E07000208 Epsom and Ewell 2021
119 E07000036 Erewash 2021
120 E07000041 Exeter 2021
121 S12000014 Falkirk 2021 true
122 E07000087 Fareham 2021
123 E07000010 Fenland 2021
124 N09000006 Fermanagh and Omagh 2021 true
125 S12000047 Fife 2021 true
126 W06000005 Flintshire 2021 true
127 E07000112 Folkestone and Hythe 2021
128 E07000080 Forest of Dean 2021
129 E07000119 Fylde 2021
130 E08000037 Gateshead 2021
131 E07000173 Gedling 2021
132 S12000049 Glasgow City 2021 true
133 E07000081 Gloucester 2021
134 E07000088 Gosport 2021
135 E07000109 Gravesham 2021
136 E07000145 Great Yarmouth 2021
137 E09000011 Greenwich 2021
138 E07000209 Guildford 2021
139 W06000002 Gwynedd 2021
140 E09000012 Hackney 2021
141 E06000006 Halton 2021
142 E09000013 Hammersmith and Fulham 2021
143 E07000131 Harborough 2021
144 E09000014 Haringey 2021
145 E07000073 Harlow 2021
146 E09000015 Harrow 2021
147 E07000089 Hart 2021
148 E06000001 Hartlepool 2021
149 E07000062 Hastings 2021
150 E07000090 Havant 2021
151 E09000016 Havering 2021
152 E06000019 Herefordshire, County of 2021
153 E07000098 Hertsmere 2021
154 E07000037 High Peak 2021
155 S12000017 Highland 2021
156 E09000017 Hillingdon 2021
157 E07000132 Hinckley and Bosworth 2021
158 E07000227 Horsham 2021
159 E09000018 Hounslow 2021
160 E07000011 Huntingdonshire 2021
161 E07000120 Hyndburn 2021
162 S12000018 Inverclyde 2021 true
163 E07000202 Ipswich 2021
164 W06000001 Isle of Anglesey 2021 true
165 E06000046 Isle of Wight 2021
166 E06000053 Isles of Scilly 2021
167 E09000019 Islington 2021
168 E09000020 Kensington and Chelsea 2021
169 E07000153 Kettering 2021
170 E07000146 King’s Lynn and West Norfolk 2021
171 E06000010 Kingston upon Hull, City of 2021
172 E09000021 Kingston upon Thames 2021
173 E08000034 Kirklees 2021
174 E08000011 Knowsley 2021
175 E09000022 Lambeth 2021
176 E07000121 Lancaster 2021
177 E08000035 Leeds 2021
178 E06000016 Leicester 2021
179 E07000063 Lewes 2021
180 E09000023 Lewisham 2021
181 E07000194 Lichfield 2021
182 E07000138 Lincoln 2021
183 N09000007 Lisburn and Castlereagh 2021 true
184 E08000012 Liverpool 2021
185 E06000032 Luton 2021
186 E07000110 Maidstone 2021
187 E07000074 Maldon 2021
188 E07000235 Malvern Hills 2021
189 E08000003 Manchester 2021
190 E07000174 Mansfield 2021
191 E06000035 Medway 2021
192 E07000133 Melton 2021
193 W06000024 Merthyr Tydfil 2021 true
194 E09000024 Merton 2021
195 E07000042 Mid Devon 2021
196 E07000203 Mid Suffolk 2021
197 E07000228 Mid Sussex 2021
198 N09000009 Mid Ulster 2021 true
199 N09000008 Mid and East Antrim 2021 true
200 E06000002 Middlesbrough 2021
201 S12000019 Midlothian 2021 true
202 E06000042 Milton Keynes 2021
203 E07000210 Mole Valley 2021
204 W06000021 Monmouthshire 2021 true
205 S12000020 Moray 2021 true
206 S12000013 Na h-Eileanan Siar 2021 true
207 W06000012 Neath Port Talbot 2021 true
208 E07000091 New Forest 2021
209 E07000175 Newark and Sherwood 2021
210 E08000021 Newcastle upon Tyne 2021
211 E07000195 Newcastle-under-Lyme 2021
212 E09000025 Newham 2021
213 W06000022 Newport 2021 true
214 N09000010 Newry, Mourne and Down 2021 true
215 S12000021 North Ayrshire 2021 true
216 E07000043 North Devon 2021
217 E07000038 North East Derbyshire 2021
218 E06000012 North East Lincolnshire 2021
219 E07000099 North Hertfordshire 2021
220 E07000139 North Kesteven 2021
221 S12000050 North Lanarkshire 2021 true
222 E06000013 North Lincolnshire 2021
223 E07000147 North Norfolk 2021
224 E06000024 North Somerset 2021
225 E08000022 North Tyneside 2021
226 E07000218 North Warwickshire 2021
227 E07000134 North West Leicestershire 2021
228 E07000154 Northampton 2021
229 E06000057 Northumberland 2021
230 E07000148 Norwich 2021
231 E06000018 Nottingham 2021
232 E07000219 Nuneaton and Bedworth 2021
233 E07000135 Oadby and Wigston 2021
234 E08000004 Oldham 2021
235 S12000023 Orkney Islands 2021 true
236 E07000178 Oxford 2021
237 W06000009 Pembrokeshire 2021 true
238 E07000122 Pendle 2021
239 S12000048 Perth and Kinross 2021 true
240 E06000031 Peterborough 2021
241 E06000026 Plymouth 2021
242 E06000044 Portsmouth 2021
243 W06000023 Powys 2021 true
244 E07000123 Preston 2021
245 E06000038 Reading 2021
246 E09000026 Redbridge 2021
247 E06000003 Redcar and Cleveland 2021
248 E07000236 Redditch 2021
249 E07000211 Reigate and Banstead 2021
250 S12000038 Renfrewshire 2021 true
251 W06000016 Rhondda Cynon Taf 2021 true
252 E07000124 Ribble Valley 2021
253 E09000027 Richmond upon Thames 2021
254 E08000005 Rochdale 2021
255 E07000075 Rochford 2021
256 E07000125 Rossendale 2021
257 E07000064 Rother 2021
258 E08000018 Rotherham 2021
259 E07000220 Rugby 2021
260 E07000212 Runnymede 2021
261 E07000176 Rushcliffe 2021
262 E07000092 Rushmoor 2021
263 E06000017 Rutland 2021
264 E08000006 Salford 2021
265 E08000028 Sandwell 2021
266 S12000026 Scottish Borders 2021 true
267 E08000014 Sefton 2021
268 E07000111 Sevenoaks 2021
269 E08000019 Sheffield 2021
270 S12000027 Shetland Islands 2021 true
271 E06000051 Shropshire 2021
272 E06000039 Slough 2021
273 E08000029 Solihull 2021
274 E06000066 Somerset 2023
275 S12000028 South Ayrshire 2021 true
276 E07000012 South Cambridgeshire 2021
277 E07000039 South Derbyshire 2021
278 E06000025 South Gloucestershire 2021
279 E07000044 South Hams 2021
280 E07000140 South Holland 2021
281 E07000141 South Kesteven 2021
282 S12000029 South Lanarkshire 2021 true
283 E07000149 South Norfolk 2021
284 E07000155 South Northamptonshire 2021
285 E07000179 South Oxfordshire 2021
286 E07000126 South Ribble 2021
287 E07000196 South Staffordshire 2021
288 E08000023 South Tyneside 2021
289 E06000045 Southampton 2021
290 E06000033 Southend-on-Sea 2021
291 E09000028 Southwark 2021
292 E07000213 Spelthorne 2021
293 E07000240 St Albans 2021
294 E08000013 St. Helens 2021
295 E07000197 Stafford 2021
296 E07000198 Staffordshire Moorlands 2021
297 E07000243 Stevenage 2021
298 S12000030 Stirling 2021 true
299 E08000007 Stockport 2021
300 E06000004 Stockton-on-Tees 2021
301 E06000021 Stoke-on-Trent 2021
302 E07000221 Stratford-on-Avon 2021
303 E07000082 Stroud 2021
304 E08000024 Sunderland 2021
305 E07000214 Surrey Heath 2021
306 E09000029 Sutton 2021
307 E07000113 Swale 2021
308 W06000011 Swansea 2021 true
309 E06000030 Swindon 2021
310 E08000008 Tameside 2021
311 E07000199 Tamworth 2021
312 E07000215 Tandridge 2021
313 E07000045 Teignbridge 2021
314 E06000020 Telford and Wrekin 2021
315 E07000076 Tendring 2021
316 E07000093 Test Valley 2021
317 E07000083 Tewkesbury 2021
318 E07000114 Thanet 2021
319 E07000102 Three Rivers 2021
320 E06000034 Thurrock 2021
321 E07000115 Tonbridge and Malling 2021
322 E06000027 Torbay 2021
323 W06000020 Torfaen 2021 true
324 E07000046 Torridge 2021
325 E09000030 Tower Hamlets 2021
326 E08000009 Trafford 2021
327 E07000116 Tunbridge Wells 2021
328 E07000077 Uttlesford 2021
329 W06000014 Vale of Glamorgan 2021 true
330 E07000180 Vale of White Horse 2021
331 E08000036 Wakefield 2021
332 E08000030 Walsall 2021
333 E09000031 Waltham Forest 2021
334 E09000032 Wandsworth 2021
335 E06000007 Warrington 2021
336 E07000222 Warwick 2021
337 E07000103 Watford 2021
338 E07000216 Waverley 2021
339 E07000065 Wealden 2021
340 E07000156 Wellingborough 2021
341 E07000241 Welwyn Hatfield 2021
342 E06000037 West Berkshire 2021
343 E07000047 West Devon 2021
344 S12000039 West Dunbartonshire 2021 true
345 E07000127 West Lancashire 2021
346 E07000142 West Lindsey 2021
347 S12000040 West Lothian 2021 true
348 E07000181 West Oxfordshire 2021
349 E07000245 West Suffolk 2021
350 E09000033 Westminster 2021
351 E06000064 Westmorland and Furness 2023
352 E08000010 Wigan 2021
353 E06000054 Wiltshire 2021
354 E07000094 Winchester 2021
355 E06000040 Windsor and Maidenhead 2021
356 E08000015 Wirral 2021
357 E07000217 Woking 2021
358 E06000041 Wokingham 2021
359 E08000031 Wolverhampton 2021
360 E07000237 Worcester 2021
361 E07000229 Worthing 2021
362 W06000006 Wrexham 2021 true
363 E07000238 Wychavon 2021
364 E07000128 Wyre 2021
365 E07000239 Wyre Forest 2021
366 E06000014 York 2021
367 E06000065 North Yorkshire 2023
368 N92000002 Northern Ireland 2021 true
369 S92000003 Scotland 2021 true
370 W92000004 Wales 2021 true
371 9300000XX Outside UK 2021 true
372 E07000027 Barrow-in-Furness 2021 2023
373 E07000030 Eden 2021 2023
374 E07000031 South Lakeland 2021 2023
375 E07000026 Allerdale 2021 2023
376 E07000028 Carlisle 2021 2023
377 E07000029 Copeland 2021 2023
378 E07000163 Craven 2021 2023
379 E07000164 Hambleton 2021 2023
380 E07000165 Harrogate 2021 2023
381 E07000166 Richmondshire 2021 2023
382 E07000167 Ryedale 2021 2023
383 E07000168 Scarborough 2021 2023
384 E07000169 Selby 2021 2023
385 E07000187 Mendip 2021 2023
386 E07000188 Sedgemoor 2021 2023
387 E07000246 Somerset West and Taunton 2021 2023
388 E07000189 South Somerset 2021 2023

6
db/seeds.rb

@ -325,4 +325,10 @@ unless Rails.env.test?
end
end
end
if LocalAuthority.count.zero?
path = "config/local_authorities_data/initial_local_authorities.csv"
service = Imports::LocalAuthoritiesService.new(path:)
service.call
end
# rubocop:enable Rails/Output

Loading…
Cancel
Save