Code Monkey home page Code Monkey logo

yammdb's Introduction

yammdb

just another .mmdb

This is another .mmdb which initially is build to verify existing geo data with real measurements.
However it works like any other .mmdb you can find on the Internet.

The goal is to update this .mmdb weekly.
You can get the .mmdb here: https://yammdb.serv.app/geo.mmdb
Raw data can be found here: https://raw.serv.app/

Limitations

  • This is not convering the entire IPv4 space, roughtly from 975k routed subnets, we have data on about 717k.
  • 1.1.1.1 like any other anycast IP will return incorrect data, the IP has to be unicast

Locations
Currently we have Servers in the following locations, we use to take measurements.

Continent Country City Info
EU UK London
EU NL Amsterdam
EU DE Frankfurt
EU FR Paris Thanks to Bunny
EU CZ Prague Thanks to Skylonhost
EU PL Warsaw Thanks to Webhorizon
EU AT Vienna
EU CH Zurich
EU ES Madrid Thanks to Ginernet
EU RU Moscow
EU TR Istanbul Thanks to Rabisu
NA US New York
NA US Seattle
NA US Miami
NA US Dallas
SA BR Sao Paulo Thanks to Misaka
AF NG Lagos Thanks to Misaka
AS RU Novosibirsk
AS JP Tokyo CN2
AS CN Hong Kong CN2
AS IN Mumbai
AS PK Pakistan Thanks to Virtury
AS SG Singapore
OC AU Sydney Thanks to Advinservers

This list will likely be expanded, if you want to sponsor us a virtual server for this, you can hit me up.

Structure
The Datastructure is the following.

Name Type Description
iso_code string ISO 3166-1, Alpha2
continent_code string NA, SA, AF, EU, AS, OC
location(latitude,longitude) double WGS
accuracy_radius double latency (ms)

Install dependencies for python example

pip3 install geoip2

Example
Reading the data is as easy as:

import geoip2.database

reader = geoip2.database.Reader("geo.mmdb")
response = reader.city("1.1.1.1")
print("Continent",response.continent.code)
print("Country",response.country.iso_code)
print("Latitude",response.location.latitude,"Longitude",response.location.longitude)
print(f"Latency {response.location.accuracy_radius}ms")

Currently accuracy_radius is used for the latency measured, since custom fields are not possible in the default reader.

yammdb's People

Contributors

ne00n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.