Comments (6)
@swcraig I see what you mean. Weird that the Wiki ISO 3166-2 entry lists it that way. Not that it's technically wrong, but as you say it doesn't line up compared to someone familiar with the region.
Doesn't matter, I'll try and build my own workaround. I have a client who handles shipping across the UK and needs accurate counties/cities as it affects postage. If I rely on the ISO it messes it up because say a customer is looking for Bedfordshire (like myself as I'm from Bedfordshire), I have never and would never look for Central Bedfordshire, so the user may get confused.
Anyway, thanks for your help and replies, it was very much appreciated. Enjoy your weekend!
from carmen.
@MrFehr I had no luck with this issue, simply because my use case was a checkout system in an online store, and as you will most likely be aware UK postcodes are street accurate anyway, so in my opinion it was better to not offer a county dropdown list, than it was to offer one with a mixed list of cites and counties, with some of the key counties completely missing.
And when I thought about it, other locations are probably effected by this issue too and I would never know about it.
from carmen.
Did you have any luck solving this? I'm facing the same issue myself. Choosing GB as the ISO and it gives me England, England and Wales, Wiltshere and a few others as Counties/States. Annoying! Thinking I'm going to have to create my own ISO to get round it; did you try that and have any luck? Thanks
from carmen.
Hi Folks,
Thanks for creating this issue. Since the data is pulled directly from a mirror of the ISO repository, carmen only reflects that view of the world.
@MrFehr when I query for the United Kingdom I get the following.
irb(main):005:0> pp Carmen::Country.named('United Kingdom').subregions
[<#Carmen::Region name="England and Wales" type="nation">,
<#Carmen::Region name="England" type="country">,
<#Carmen::Region name="Great Britain" type="nation">,
<#Carmen::Region name="Northern Ireland" type="province">,
<#Carmen::Region name="Scotland" type="country">,
<#Carmen::Region name="United Kingdom" type="nation">,
<#Carmen::Region name="Wales; Cymru" type="country">]
I don't see Wiltshere in there. Is this not the expected output?
As for the incorrect counties for the United Kingdom mentioned in the original issue description, Pull Requests are welcome to add data overlays to get this fixed. The way to do this is outlined in the wiki.
from carmen.
Hey @swcraig, just found this and it seems to have been fixed. The Gem I'm using however that has Carmen built-in is using version 1.1.1 though hence why it still has Wiltshere and Middlesex. Is there any reason why there is both England/Wales, and England and Wales? Or any easy way to remove just 'England and Wales' as I think it'll confuse users choosing their country.
Also, looking at this list, it's quite a mix of counties, cities, towns, London boroughs and unitary authorities, and also missing a lot of counties too. For example it has Bedford and Luton which are part of Bedfordshire, but it doesn't have Bedfordshire, only Central Bedfordshire, which isn't a place but a local authority.
I am happy redoing the list and contributing to the project, but just want to ensure I do it correctly. The current list for gb.yml is a mix; should I change this to counties, then create another sub-list for cities within those counties or?
from carmen.
The locale/base/en/world/gb/eng.yml
file you referenced reflects the ISO repository; at a glance the Wikipedia page for GB's ISO 3166-2 entry seems to list the same. The page also mentions that Bedfordshire was removed on 2010-06-30 (under "Changes"). Is this not expected?
In my experience the data coming from the ISO repository and what is expected as someone familiar with the region doesn't always line up; I unfortunately can't guess why/how the ISO data is updated or defined, carmen just blindly pulls it down.
from carmen.
Related Issues (20)
- Kenya's provinces were replaced by a system of counties in 2013. HOT 2
- France's 27 regions were reduced to 18 in 2016 HOT 2
- New Maintenance Plan HOT 2
- About the country code of Kosovo HOT 1
- Wrong subregions for NZ
- Brazilian's subregions aren't right HOT 2
- Very slow rake, rspec, and server startup HOT 3
- subregions? method throwing error. HOT 1
- Bahamas -> New Providence (BS-NP) island state missing HOT 2
- Hong Kong has no subregions
- Missing subregion for Chile
- The keys for IT provinces are shown in numeric
- Translation of subregions for CN
- Error on require: uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState (NameError) HOT 1
- Shipping Drop Down Menu - Yerushalayim Al Quads - Change to Jerusalemin
- Locales reset unexpectedly HOT 1
- Search through countries is not so effective, as it may be
- Update repo to show v1.1.3 release
- Tanzania is not a valid "named" input
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carmen.