Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Spain there are two provinces left #27

Open
victor-elabs opened this issue Aug 16, 2021 · 10 comments
Open

In Spain there are two provinces left #27

victor-elabs opened this issue Aug 16, 2021 · 10 comments

Comments

@victor-elabs
Copy link

Working with the npm module, we find 2 provinces left in Spain. This provinces are Navarra and Asturias, both of this provinces have the same name as the region, maybe this is the reason why are not in the province JSON.

@ekkis
Copy link
Collaborator

ekkis commented Aug 17, 2021

technically, Asturies is not a province, it's a principality... though I now realise there is a province of the same name that's co-existent with the principality, so point taken

@victor-elabs
Copy link
Author

Thank's Erik.

What are the next steps? You will push some changes to province JSON or you prefer to create a branch where I could push the changes and wait to a pull request?

We already modify the provinces.json until the update is done, because it cause some problems in our checkout integrations.

These are the the changes applied:

{ "name": "Navarra", "short": "NA", "alias": null }, { "name": "Asturias", "short": "O", "alias": null }

@ekkis
Copy link
Collaborator

ekkis commented Aug 18, 2021

I'll integrate your changes but I notice too that the Balearic islands is also missing. I think the problem is that the concept of the province in general is mal-apropriated in Spain where the "autonomous communities" are a super-ceding subdivision. so by rights we shouldn't have La Coruña as a province but Galicia

@ekkis
Copy link
Collaborator

ekkis commented Aug 18, 2021

also, where did you get "O" for Asturies?

@ekkis
Copy link
Collaborator

ekkis commented Aug 18, 2021

I'm noticing other problems... things missing, for example Betanzos, a province of Galicia is missing. you can see the provinces here: https://en.wikipedia.org/wiki/Galicia_(Spain) -- could you do a review of Spain and fill in what I've missed? I originally sourced these data from the Wikipedia tables project but I think it needs review

@ekkis
Copy link
Collaborator

ekkis commented Aug 18, 2021

oh, my bad, Betanzos is no longer valid, as of 1833. but we should also think about adding the local names to the data, such as "Ourense" for "Orense", or "Uvieu" for "Oviedo"

@ekkis
Copy link
Collaborator

ekkis commented Aug 18, 2021

I created this in support of these changes: #28

@ekkis
Copy link
Collaborator

ekkis commented Aug 18, 2021

actually, I already had a ticket for it: #9 -- haha

@victor-elabs
Copy link
Author

victor-elabs commented Aug 18, 2021

Hi Erik.

I checked what you say about Balearic and other provinces.

Here in Spain we have autonomous communities. provinces and another subdivision called "Diputación".

I checked the official information about the provinces, their local names and the shorten name and I think the JSON bellow is correct.

[ { "name": "Álava", "short": "VI", "alias": "Araba" }, { "name": "Albacete", "short": "AB", "alias": null }, { "name": "Alicante", "short": "A", "alias": null }, { "name": "Almería", "short": "AL", "alias": null }, { "name": "Asturias", "short": "O", "alias": null }, { "name": "Ávila", "short": "AV", "alias": null }, { "name": "Badajoz", "short": "BA", "alias": null }, { "name": "Barcelona", "short": "PM", "alias": null }, { "name": "Burgos", "short": "B", "alias": null }, { "name": "Cáceres", "short": "BU", "alias": null }, { "name": "Cádiz", "short": "CC", "alias": null }, { "name": "Cantabria", "short": "CA", "alias": null }, { "name": "Castellón", "short": "S", "alias": null }, { "name": "Ciudad Real", "short": "CS", "alias": null }, { "name": "Córdoba", "short": "CR", "alias": null }, { "name": "Cuenca", "short": "CO", "alias": null }, { "name": "Gerona", "short": "CU", "alias": "Girona" }, { "name": "Granada", "short": "GI", "alias": null }, { "name": "Guadalajara", "short": "GR", "alias": null }, { "name": "Guipúzcoa", "short": "GU", "alias": "Gipuzkoa" }, { "name": "Huelva", "short": "SS", "alias": null }, { "name": "Huesca", "short": "H", "alias": null }, { "name": "Islas Baleares", "short": "HU", "alias": null }, { "name": "Jaén", "short": "J", "alias": null }, { "name": "La Coruña", "short": "C", "alias": "A Coruña" }, { "name": "La Rioja", "short": "LO", "alias": null }, { "name": "Las Palmas", "short": "GC", "alias": null }, { "name": "León", "short": "LE", "alias": null }, { "name": "Lérida", "short": "L", "alias": "Lleida" }, { "name": "Lugo", "short": "LU", "alias": null }, { "name": "Madrid", "short": "M", "alias": null }, { "name": "Málaga", "short": "MA", "alias": null }, { "name": "Murcia", "short": "MU", "alias": null }, { "name": "Navarra", "short": "NA", "alias": null }, { "name": "Orense", "short": "OR", "alias": "Ourense" }, { "name": "Palencia", "short": "P", "alias": null }, { "name": "Pontevedra", "short": "PO", "alias": null }, { "name": "Salamanca", "short": "SA", "alias": null }, { "name": "Santa Cruz de Tenerife", "short": "TF", "alias": null }, { "name": "Segovia", "short": "SG", "alias": null }, { "name": "Sevilla", "short": "SE", "alias": null }, { "name": "Soria", "short": "SO", "alias": null }, { "name": "Tarragona", "short": "T", "alias": null }, { "name": "Teruel", "short": "TE", "alias": null }, { "name": "Toledo", "short": "TO", "alias": null }, { "name": "Valencia", "short": "V", "alias": null }, { "name": "Valladolid", "short": "VA", "alias": null }, { "name": "Vizcaya", "short": "BI", "alias": "Bizkaia" }, { "name": "Zamora", "short": "ZA", "alias": null }, { "name": "Zaragoza", "short": "Z", "alias": null } ]

I hope i could help you with that.

@ekkis
Copy link
Collaborator

ekkis commented Aug 19, 2021

actually, I've found that the denominations for the sub-divisions change from place to place. sometimes they are parroquias, sometimes ayuntamientos, comarcas, municipios, concexos (concellu), etc. it's not standardised, or maybe it's a matter of allowing the local nomenclature for the level. I'm actually building a meta-layer to describe these things so it kinda looks like this:

{
    "meta": {
        "ES": [
            "Autonomous community group",
            "Autonomous community",
            "Province",
            "Comarca",
            "Municipality (municipio)"
        ]
    
    },
    "data": {
        "ES": {
            "North West": {
                "Galicia": {
                    "A Coruña": {
                        "Arteixo": {
                            "Armentón": {},
                            "Arteixo": {},
                            "Barrañán": {},
                            "Chamín": {},

so you can see from the above that the autonomous community is Galicia, the province A Coruña, Comarca Arteixo and municipality Armentón...

I need to think about allowing overrides at lower levels, for example, Asturies doesn't have provinces; it has comarcas and beneath has municipalities, beneath which are parishes, so I would need to do something like:

    "meta": {
        "ES": {
            "_default_": [
                "Autonomous community group",
                "Autonomous community",
                "Province",
                "Comarca",
                "Municipality (municipio)"
            ],
            "North West": {
                "Asturies": [
                    "Comarca",
                    "Municipality",
                    "Parish"
                ]
            }

or some such structure. if you have thoughts I'm all ears

p.s. the advantage is that we could then list cities under the lowest level of the tree and that would allow us fine-grain control to distribute postal codes, telephone codes, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants