uk_county_locator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f80e2a756a051daa471e931e2a6a873d3bcd6cb1cb70982615db766d640e121a
4
+ data.tar.gz: 84f0c67cdc2e61b1a10b0a7df7de88f3d71c6ad304935f2527128c85c9f9e405
5
+ SHA512:
6
+ metadata.gz: b1f68ea7ca094210af2fb2f3802e07226309bf612a6b8dd25d79c55c60baa7ee959bcc4262f794456d19db06173f2aa915c650de1650328b74f2538b082eebfc
7
+ data.tar.gz: 4346bc8f9577b663a8b57a139d11ee8fab609a4c8373ecb8573845437dfd7d448f7f15781ba1efea4e0cc591d757c43b6db467e1937b64a4205882fc50cfc58a
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,19 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: single_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
14
+
15
+ Metrics/BlockLength:
16
+ Max: 200
17
+
18
+ Metrics/ModuleLength:
19
+ Max: 200
data/Appraisals ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'rails_5.0' do
4
+ gem 'rails', '~> 5.0'
5
+ end
6
+
7
+ appraise 'rails_5.2' do
8
+ gem 'rails', '~> 5.2'
9
+ end
10
+
11
+ appraise 'rails_6.0' do
12
+ gem 'rails', '~> 6.0'
13
+ end
14
+
15
+ appraise 'rails_6.1' do
16
+ gem 'rails', '~> 6.1'
17
+ end
18
+
19
+ appraise 'rails_7.0' do
20
+ gem 'rails', '~> 7.0'
21
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-01-10
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at ed@homeflow.co.uk. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 EdBeese
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Edward Beesley
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,168 @@
1
+ # UK County Locator
2
+
3
+ ## Overview
4
+
5
+ `UkCountyLocator` is a Ruby gem that determines the county of a given set of coordinates within the UK. It supports multiple county classification types, including ceremonial, historic, and current administrative boundaries. The gem also provides functionality for retrieving county boundary polygons.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'uk_county_locator'
13
+ ```
14
+
15
+ Then execute:
16
+
17
+ ```sh
18
+ bundle install
19
+ ```
20
+
21
+ Or install it manually:
22
+
23
+ ```sh
24
+ gem install uk_county_locator
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ### Finding a County by Coordinates
30
+
31
+ ```ruby
32
+ require 'uk_county_locator'
33
+
34
+ lat = 51.5074
35
+ lng = -0.1278
36
+
37
+ county = UkCountyLocator.find_county(lat: lat, lng: lng)
38
+ puts county # => "Greater London"
39
+ ```
40
+ By default, the gem will return the Ceremonial County of the coordinates.
41
+
42
+ An optional `type` argument, which will accept the following supported county types:
43
+
44
+ - `:current` – Modern administrative counties and Unitary Authorities
45
+ - `:ceremonial` – Traditional ceremonial counties
46
+ - `:historic` – Historic counties
47
+ - `:all` – Includes all available types
48
+
49
+ Assuming the same coordinates above:
50
+
51
+ ```ruby
52
+ county_data = UkCountyLocator.find_county(lat: 51.5074, lng: -0.1278, type: :all)
53
+ puts county_data
54
+ # => {:current_county_or_unitary_authority=>"Westminster", :ceremonial_county=>"Greater London", :historic_county=>"Middlesex"}
55
+ ```
56
+ ### Fetching County Boundaries
57
+ The polygons are stored as encoded strings, using the [Polylines Gem](https://github.com/joshuaclayton/polylines).
58
+
59
+ You can retrieve the encoded string, which can then be decoded using the Polylines Gem.
60
+
61
+ ```ruby
62
+ polygon = UkCountyLocator.find_polygon(county: 'Greater London', type: :ceremonial)
63
+ puts polygon # => "iah@mrgyHs@tTkk@zc@jz@h{@kLnr@jo@rWal@}Rrk@za@UjMdhAb_@t|Bjn@`h@|mAzs@kMl\\h..."
64
+ ```
65
+
66
+ The gem will support a number of common aliases for county names, in as far as is feasible, including shorthand abbreviations, such as 'Herts', 'Beds' and 'Bucks', as well as Welsh, Irish and Scots Gaelic languages, and more subtle alternative names.
67
+
68
+ #### Fetching the County List
69
+
70
+ It is also possible to fetch the list of counties, per type (alphabetised):
71
+ ```ruby
72
+ county_list = UkCountyLocator.county_list(type: :ceremonial)
73
+ puts county_list # => ["Bedfordshire", "Berkshire", "Bristol", "Buckinghamshire", "Cambridgeshire", ...]
74
+ ```
75
+
76
+ ## County Type Definitions
77
+ There are three sets of county data within the gem. The definitions between the three sets will differ between the four constituent countries of the United Kingdom, but are defined as per these Wikipedia links:
78
+
79
+ ### Ceremonial Counties `type: :ceremonial`
80
+ #### England
81
+ [Ceremonial counties of England](https://en.wikipedia.org/wiki/Ceremonial_counties_of_England)
82
+ #### Wales
83
+ [Preserved Counties of Wales](https://en.wikipedia.org/wiki/Preserved_counties_of_Wales)
84
+ #### Scotland
85
+ [Local government areas of Scotland (1975–1996)](https://en.wikipedia.org/wiki/Local_government_areas_of_Scotland_(1975%E2%80%931996))
86
+ #### Northern Ireland
87
+ [Counties of Northern Ireland](https://en.wikipedia.org/wiki/Counties_of_Northern_Ireland)
88
+ ### Current Counties & Unitary Authorities `type: :current`
89
+ #### England
90
+ This is a combined map of the different current administrative areas, namely:
91
+
92
+ [County Councils](https://en.wikipedia.org/wiki/List_of_county_councils_in_England)
93
+
94
+ [Unitary Authorities](https://en.wikipedia.org/wiki/Unitary_authorities_of_England)
95
+
96
+ [Metropolitan Boroughs](https://en.wikipedia.org/wiki/Metropolitan_borough)
97
+
98
+ [London Boroughs](https://en.wikipedia.org/wiki/London_boroughs)
99
+ #### Wales
100
+ [Welsh Local Authorities](https://en.wikipedia.org/wiki/Local_government_in_Wales)
101
+ #### Scotland
102
+ [Council Areas of Scotland](https://simple.wikipedia.org/wiki/Council_areas_of_Scotland)
103
+ #### Northern Ireland
104
+ [Local Government Districts of Northern Ireland](https://en.wikipedia.org/wiki/Local_government_in_Northern_Ireland)
105
+ ### Historic Counties `type: :historic`
106
+ #### England
107
+ [Historic Counties of England](https://en.wikipedia.org/wiki/Historic_counties_of_England)
108
+ #### Wales
109
+ [Historic Counties of Wales](https://en.wikipedia.org/wiki/Historic_counties_of_Wales)
110
+ #### Scotland
111
+ [Shire Counties of Scotland (1889-1975)](https://en.wikipedia.org/wiki/Shires_of_Scotland#Counties_from_1889_to_1975)
112
+ #### Northern Ireland
113
+ [Counties of Northern Ireland](https://en.wikipedia.org/wiki/Counties_of_Northern_Ireland)
114
+
115
+ ## Considerations & Limitations
116
+ ### Single Polygon Shapes
117
+ It should be noted that this gem stores the county polygons as encoded strings. In order for these to be encoded, a polygon must be one, continuous shape, rather than a collection of separate, unconnected polygons.
118
+
119
+ To this end, the polygons may cover areas of water that connect separated land masses, such as islands.
120
+
121
+ See image of Orkney Islands polygon:
122
+
123
+ ![Image of Orkney Islands Polygon](https://res.cloudinary.com/dnhuvsfil/image/upload/v1740658412/Screenshot_from_2025-02-27_11-24-31_gquyhu.png)
124
+
125
+
126
+ ### Rivers, Tributaries and Coastal Lines
127
+ In order to compress the polygon areas, the boundaries that cover coastal lines have been more roughly drawn, with fewer coordinate points. The polygons are continuous where larger rivers and tributaries, where the same county on both sides. This means that coordinates that fall in the river will return the county as a result.
128
+
129
+ For example, coordinates that fall within the river Thames, where Greater London is on both sides of the river, will return 'Greater London' as the ceremonial county.
130
+
131
+ ![Excerpt of Greater London Polygon](https://res.cloudinary.com/dnhuvsfil/image/upload/v1740658346/london_ektehn.png)
132
+
133
+ This means that the gem would not be an appropriate tool to verify that given coordinates are within the land masses of the UK.
134
+
135
+ ## Data Sources
136
+ The data to compile these polygon areas has been taken from a number of sources, including:
137
+ - [OpenStreetMap](https://www.openstreetmap.org/)
138
+ - [Office of National Statistics (ONS)](https://www.ons.gov.uk/aboutus)
139
+ - [UK Ceremonial Counties](https://github.com/evansd/uk-ceremonial-counties/blob/master/uk-ceremonial-counties.geojson)
140
+ - [The Association of British Counties](https://abcounties.com/)
141
+
142
+ ## Performance Optimization
143
+
144
+ The gem utilizes the `Parallel` gem to speed up polygon lookups.
145
+
146
+ ## Compatibility
147
+
148
+ The gem is tested against multiple versions of Rails using Appraisal, ensuring broad compatibility with different Ruby on Rails applications.
149
+
150
+ ## Contributing
151
+
152
+ ### Polygon Mapping
153
+ The polygons included within this gem have been generated using the data sources listed above, within an acceptable tollerance of accuracy. However, there may be small errors at the boundaries of polygons.
154
+
155
+ If such an error is noted, pull requests to update the polygons are welcome. Please include details of the area(s) that has been altered within a PR, in order to more efficiently confirm accuracy.
156
+
157
+ ### Submitting Fixes and Improvements
158
+ These and all other bug reports and pull requests are welcome on GitHub.
159
+
160
+ 1. Fork the repository
161
+ 2. Create a new branch (`git checkout -b feature-branch`)
162
+ 3. Commit your changes (`git commit -m 'Add new feature'`)
163
+ 4. Push to the branch (`git push origin feature-branch`)
164
+ 5. Create a new Pull Request
165
+
166
+ ## License
167
+
168
+ This project is licensed under the MIT License.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require 'rubocop/rake_task'
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,180 @@
1
+ # frozen_string_literal: true
2
+
3
+ module UkCountyLocator
4
+ module Aliases
5
+ module CeremonialCountyAliases
6
+ CEREMONIAL_COUNTY_ALIASES = {
7
+ 'London' => 'Greater London',
8
+ 'Lon' => 'Greater London',
9
+ 'Manchester' => 'Greater Manchester',
10
+ 'S Yorkshire' => 'South Yorkshire',
11
+ 'S Yorks' => 'South Yorkshire',
12
+ 'South Yorks' => 'South Yorkshire',
13
+ 'Tyne & Wear' => 'Tyne and Wear',
14
+ 'W Midlands' => 'West Midlands',
15
+ 'W Yorkshire' => 'West Yorkshire',
16
+ 'W Yorks' => 'West Yorkshire',
17
+ 'West Yorks' => 'West Yorkshire',
18
+ 'N Yorkshire' => 'North Yorkshire',
19
+ 'N Yorks' => 'North Yorkshire',
20
+ 'North Yorks' => 'North Yorkshire',
21
+ 'Durham' => 'County Durham',
22
+ 'Co Durham' => 'County Durham',
23
+ 'Co Dur' => 'County Durham',
24
+ 'Dur' => 'County Durham',
25
+ 'Ches' => 'Cheshire',
26
+ 'Lancs' => 'Lancashire',
27
+ 'East Yorkshire' => 'East Riding of Yorkshire',
28
+ 'East Yorks' => 'East Riding of Yorkshire',
29
+ 'E Yorkshire' => 'East Riding of Yorkshire',
30
+ 'E Yorks' => 'East Riding of Yorkshire',
31
+ 'Lincs' => 'Lincolnshire',
32
+ 'Derbs' => 'Derbyshire',
33
+ 'Rutlandshire' => 'Rutland',
34
+ 'Rut' => 'Rutland',
35
+ 'Notts' => 'Nottinghamshire',
36
+ 'Somersetshire' => 'Somerset',
37
+ 'Som' => 'Somerset',
38
+ 'Glos' => 'Gloucestershire',
39
+ 'Gloucs' => 'Gloucestershire',
40
+ 'Dev' => 'Devon',
41
+ 'Dor' => 'Dorset',
42
+ 'Cambs' => 'Cambridgeshire',
43
+ 'Beds' => 'Bedfordshire',
44
+ 'Berks' => 'Berkshire',
45
+ 'E Sussex' => 'East Sussex',
46
+ 'East Sx' => 'East Sussex',
47
+ 'E Sx' => 'East Sussex',
48
+ 'E Ssx' => 'East Sussex',
49
+ 'East Ssx' => 'East Sussex',
50
+ 'East Suss' => 'East Sussex',
51
+ 'E Suss' => 'East Sussex',
52
+ 'Hants' => 'Hampshire',
53
+ 'Bucks' => 'Buckinghamshire',
54
+ 'Cumberland' => 'Cumbria',
55
+ 'Cumb' => 'Cumbria',
56
+ 'Herts' => 'Hertfordshire',
57
+ 'Leics' => 'Leicestershire',
58
+ 'Norf' => 'Norfolk',
59
+ 'Northants' => 'Northamptonshire',
60
+ 'Oxon' => 'Oxfordshire',
61
+ 'Staffs' => 'Staffordshire',
62
+ 'Staf' => 'Staffordshire',
63
+ 'Suff' => 'Suffolk',
64
+ 'Surr' => 'Surrey',
65
+ 'Sy' => 'Surrey',
66
+ 'Warks' => 'Warwickshire',
67
+ 'War' => 'Warwickshire',
68
+ 'Warw' => 'Warwickshire',
69
+ 'W Sussex' => 'West Sussex',
70
+ 'West Sx' => 'West Sussex',
71
+ 'W Sx' => 'West Sussex',
72
+ 'W Ssx' => 'West Sussex',
73
+ 'West Ssx' => 'West Sussex',
74
+ 'West Suss' => 'West Sussex',
75
+ 'W Suss' => 'West Sussex',
76
+ 'Worcs' => 'Worcestershire',
77
+ 'Worsts' => 'Worcestershire',
78
+ 'Shrops' => 'Shropshire',
79
+ 'Salop' => 'Shropshire',
80
+ 'Corn' => 'Cornwall',
81
+ 'Cornw' => 'Cornwall',
82
+ 'Wilts' => 'Wiltshire',
83
+ 'Isle Wight' => 'Isle of Wight',
84
+ 'Northumb' => 'Northumberland',
85
+ 'Northd' => 'Northumberland',
86
+ 'Here' => 'Herefordshire',
87
+ 'Heref' => 'Herefordshire',
88
+ 'Gramp' => 'Grampian',
89
+ "Roinn a' Mhonaidh" => 'Grampian',
90
+ 'Strath' => 'Strathclyde',
91
+ 'Srath Chluaidh' => 'Strathclyde',
92
+ 'Central Scotland' => 'Central (Scotland)',
93
+ 'Cent Scotland' => 'Central (Scotland)',
94
+ 'C Scotland' => 'Central (Scotland)',
95
+ 'Roinn Meadhanach' => 'Central (Scotland)',
96
+ 'Dumfries & Galloway' => 'Dumfries and Galloway',
97
+ 'Dumfries' => 'Dumfries and Galloway',
98
+ 'Galloway' => 'Dumfries and Galloway',
99
+ 'Dùn Phris is Gall-Ghaidhealaibh' => 'Dumfries and Galloway',
100
+ 'Dun Phris is Gall-Ghaidhealaibh' => 'Dumfries and Galloway',
101
+ 'Dùn Phris' => 'Dumfries and Galloway',
102
+ 'Dun Phris' => 'Dumfries and Galloway',
103
+ 'Gall-Ghaidhealaibh' => 'Dumfries and Galloway',
104
+ 'Loth' => 'Lothian',
105
+ 'Lodainn' => 'Lothian',
106
+ 'Eilean Siar' => 'Eilean Siar (Western Isles)',
107
+ 'Western Isles' => 'Eilean Siar (Western Isles)',
108
+ 'Outer Hebrides' => 'Eilean Siar (Western Isles)',
109
+ 'Na h-Eileanan Siar' => 'Eilean Siar (Western Isles)',
110
+ 'Orkney' => 'Orkney Islands',
111
+ 'Arcaibh' => 'Orkney Islands',
112
+ 'Borders' => 'Scottish Borders',
113
+ 'Crìochan na h-Alba' => 'Scottish Borders',
114
+ 'Criochan na h-Alba' => 'Scottish Borders',
115
+ 'Shetland' => 'Shetland Islands',
116
+ 'Zetland' => 'Shetland Islands',
117
+ 'Sealtainn' => 'Shetland Islands',
118
+ 'W Glamorgan' => 'West Glamorgan',
119
+ 'West Glam' => 'West Glamorgan',
120
+ 'W Glam' => 'West Glamorgan',
121
+ 'Gorllewin Morgannwg' => 'West Glamorgan',
122
+ 'M Glamorgan' => 'Mid Glamorgan',
123
+ 'Mid Glam' => 'Mid Glamorgan',
124
+ 'M Glam' => 'Mid Glamorgan',
125
+ 'Morgannwg Ganol' => 'Mid Glamorgan',
126
+ 'S Glamorgan' => 'South Glamorgan',
127
+ 'South Glam' => 'South Glamorgan',
128
+ 'S Glam' => 'South Glamorgan',
129
+ 'De Morgannwg' => 'South Glamorgan',
130
+ 'Co Tyrone' => 'County Tyrone',
131
+ 'Tyrone' => 'County Tyrone',
132
+ 'Tir Eoghain' => 'County Tyrone',
133
+ 'Tír Eoghain' => 'County Tyrone',
134
+ 'Contae Tír Eoghain' => 'County Tyrone',
135
+ 'Contae Tir Eoghain' => 'County Tyrone',
136
+ 'Coontie Owenslann' => 'County Tyrone',
137
+ 'Owenslann' => 'County Tyrone',
138
+ 'Co Armagh' => 'County Armagh',
139
+ 'Armagh' => 'County Armagh',
140
+ 'Contae Ard Mhacha' => 'County Armagh',
141
+ 'Ard Mhacha' => 'County Armagh',
142
+ 'Coontie Airmagh' => 'County Armagh',
143
+ 'Airmagh' => 'County Armagh',
144
+ 'Coontie Armagh' => 'County Armagh',
145
+ 'Down' => 'County Down',
146
+ 'Co Down' => 'County Down',
147
+ 'Contae an Dúin' => 'County Down',
148
+ 'Contae an Duin' => 'County Down',
149
+ 'Dúin' => 'County Down',
150
+ 'Duin' => 'County Down',
151
+ 'Coontie Doon' => 'County Down',
152
+ 'Doon' => 'County Down',
153
+ 'Countie Doun' => 'County Down',
154
+ 'Doun' => 'County Down',
155
+ 'Co Londonderry' => 'County Londonderry',
156
+ 'Londonderry' => 'County Londonderry',
157
+ 'County Derry' => 'County Londonderry',
158
+ 'Derry' => 'County Londonderry',
159
+ 'Co Derry' => 'County Londonderry',
160
+ 'Contae Dhoire' => 'County Londonderry',
161
+ 'Dhoire' => 'County Londonderry',
162
+ 'Coontie Lunnonderrie' => 'County Londonderry',
163
+ 'Lunnonderrie' => 'County Londonderry',
164
+ 'Antrim' => 'County Antrim',
165
+ 'Co Antrim' => 'County Antrim',
166
+ 'Contae Aontroma' => 'County Antrim',
167
+ 'Aontroma' => 'County Antrim',
168
+ 'Coontie Antrìm' => 'County Antrim',
169
+ 'Fermanagh' => 'County Fermanagh',
170
+ 'Co Fermanagh' => 'County Fermanagh',
171
+ 'Contae Fhear Manach' => 'County Fermanagh',
172
+ 'Fhear Manach' => 'County Fermanagh',
173
+ 'Contae Fir Manach' => 'County Fermanagh',
174
+ 'Fir Manach' => 'County Fermanagh',
175
+ 'Coontie Fermanay' => 'County Fermanagh',
176
+ 'Fermanay' => 'County Fermanagh'
177
+ }.freeze
178
+ end
179
+ end
180
+ end