Git Product home page Git Product logo

Comments (6)

MrFehr avatar MrFehr commented on September 22, 2024 1

@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.

MatthewKennedy avatar MatthewKennedy commented on September 22, 2024 1

@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.

MrFehr avatar MrFehr commented on September 22, 2024

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.

swcraig avatar swcraig commented on September 22, 2024

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.

MrFehr avatar MrFehr commented on September 22, 2024

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.

swcraig avatar swcraig commented on September 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.