Giter VIP home page Giter VIP logo

Comments (3)

bhousel avatar bhousel commented on July 21, 2024

Weird, yeah I don't really understand it.
I do know that "Metropolitan France" with the ISO code FX, and is a separate feature that is within France and within Europe, EU, etc..
https://ideditor.codes/?code=Q212429
"groups": ["FR", "155", "150", "EU", "UN", "001"],

from country-coder.

bhousel avatar bhousel commented on July 21, 2024

I did some more testing today and I still don't know what's going on

> import("@ideditor/country-coder").then(module => { cc = module });
Promise { <pending> }
> cc.isInEuropeanUnion('fx')
true
> cc.isInEuropeanUnion('fr')
false
> cc.isInEuropeanUnion('es')
true

I don't see any obvious difference in the data in how Spain and France are different. Both are made up of "parent" features with null geometry and "child" features with groups properties.

from country-coder.

Bonkles avatar Bonkles commented on July 21, 2024

Update: I noticed a few interesting facts in the borders.json data file:

Neither spain nor france are directly listed as members of the EU.
all of Spain's territories are listed as having EU group membership, even though Spain itself does not.
None of France's territories are listed as having EU group membership. France itself, like spain, is also not listed as a direct EU member.

So why the difference?

If I modify all of France's territories to also be members of the EU, then the test starts to pass. Somehow, group membership is being synthesized from the 'ground up', considering constituent territories first.

from country-coder.

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.