Looking up IP locations via API

OR….. WHERE ARE THESE PEOPLE WHO ARE PLANNING A BASEBALL ROAD TRIP ?

I was doing some homegrown analytics for my baseball road trip planner at basesroaded.com. I have the IP address of any visit to the site, so I wanted to see where people were coming from (note: this assumes no one is coming in through proxy). I needed a method of determining approximate location from the IP address. There are a number of services for looking up an individual IP address, but I wanted to do this programmatically.

Some Google research yielded the service available at http://ipinfodb.com/ip_location_api_json.php.
This is a very helpful site that provides an API for looking up IP addresses and returning their approximate location. I ran a Python script that looped through my last 200 IP addresses and looked up their location, then created a GEOJSON file to map them.

CONCLUSION: I’m afraid this is not that insightful and may just reflect general populations in the US, but the exercise may prove helpful for other purposes !

 

locations-of-brt-visits