Sunday, February 10, 2019

We're not in Kansas

I've been using the excellent MaxMind Geo IP database (https://www.maxmind.com) in a Python application (https://github.com/drsjb80/HPotter). Interestingly, when I look a MSU Denver's IP address:
 
$ python3
Python 3.7.1 (default, Nov 18 2018, 09:59:08)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import geoip2.database
>>> reader = geoip2.database.Reader('/usr/local/lib/python3.7/site-packages/_maxminddb_geolite2/GeoLite2-City.mmdb')
>>> reader.city('147.153.5.6').location
geoip2.records.Location(average_income=None, metro_code=None, time_zone=None, population_density=None, longitude=-97.822, postal_code=None, postal_confidence=None, accuracy_radius=5, latitude=37.751)


the lat/long says we're in Kansas, in the middle of a reservior acutally:
 Who knew?