Annotation integration service for M-Lab data
Pull request Compare This branch is 7 commits ahead, 183 commits behind m-lab:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
travis @ 7f6ef90


branch travis-ci coveralls
master Travis Build Status Coverage Status

Annotation integration service provides geolocation for IPv4 and IPv6 MaxMind databases from Google Cloud Storage.

If an annotation request is dated prior to August 2017, location data will be derived from MaxMind GeoLiteLatest databases. Otherwise, data will be provided by MaxMind GeoLite2 databases. The discrepencies between provided databases are provided below.

MaxMind GeoLiteLatest databases include:

  1. GeoLiteCity-Blocks.csv - StartIPNum IPv4 - EndIPNum IPv4 - GeonameID
  2. GeoLiteCity-Location.csv - GeonameID - Country Code - City - Postal Code - Logitude - Latitude - MetroCode

MaxMind GeoLite2 databases include:

  1. GeoLite2-City-Blocks-IPv4.csv & GeoLite2-City-Blocks-IPv6.csv - IP network (CIDR Format) - GeonameID (identifies end user location) - Registered Country Geoname ID (identifies country where IP address is registered to an ISP) - Latitude - Longitude
  2. GeoLite2-City-Locations-en.csv - GeonameID - Continent Code - Country ISO - Country Name - City Name - Metro Code

GeonameID is the same with Registered Country Geoname ID most of time, but with some exceptions. Either GeonameID or Registered Country Geoname ID could be not available for some IP addresses.

Important descrepencies to note include:

  1. GeoLite2 databases provides a network IP range in CIDR format while GeoLiteLatest databases provide an IP range in decimal format.
  2. GeoLite2 provides both end user location as well as country registration information while GeoLiteLatest includes only end user location.

Annotatation service will respond with the following data:

  • IP Address range
  • Postal Code
  • Latitude
  • Longitude
  • Continent Code
  • Country Code
  • Country Name
  • Metro Code
  • City Name