Coder Social home page Coder Social logo

Comments (8)

adamvr avatar adamvr commented on July 19, 2024

👍

from node-geoip.

ramonsnir avatar ramonsnir commented on July 19, 2024

👍

from node-geoip.

BenjaminRH avatar BenjaminRH commented on July 19, 2024

👍

from node-geoip.

rickgbw avatar rickgbw commented on July 19, 2024

👍

from node-geoip.

subversivo58 avatar subversivo58 commented on July 19, 2024

👍 This is a great need to filter connections, distribute applications, or provide content on demand

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

If anyone wants to build this, i'll merge it in.

from node-geoip.

typpo avatar typpo commented on July 19, 2024

@bluesmoon As far as I can tell continent is not directly available in any of the Maxmind geoip databases.

But I did find this mapping provided by Maxmind from ISO 3166 country code to continent code: https://dev.maxmind.com/geoip/legacy/codes/country_continent/

(It appears the mapping is also included statically in the C library implementation: https://github.com/maxmind/geoip-api-c/blob/a16267aec08fe9e9f7875b8d8b2f3d2cc154e51e/libGeoIP/GeoIP.c#L542)

So what I'd like to do is use the Maxmind country code->continent mapping and perform lookups based on that. I can point it to the download on the above Maxmind site. I don't think it's necessary to process the simple lookup table into .dat format, so I'd just keep it as CSV or maybe convert it to a json map that can be loaded in directly from data/. Let me know what you think.

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

Sure, go ahead. I would have preferred if there were a separate library to map country to continent since it seems like something usable outside of geo-ip as well, but if there isn't then this is fine.

My concern with any kind of continent mapping is the complication with Turkey which is simultaneously in Asia and Europe or countries like France or the Netherlands which are primarily in Europe, but also have portions in the Caribbean and elsewhere.

from node-geoip.

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.