Database Reference
In-Depth Information
"NT.TO","NT.TO",0.00,"N/A","11:-40am",N/A,N/A,N/A,N/A,N/A
"GE","General Electric ",18.43,"1/7/2011","4:00pm",18.58,18.66,18.20,0.46,20.26
"MSFT","Microsoft Corpora",28.60,"1/7/2011","4:00pm",28.64,28.74,28.25,0.55,12.42
IP Addresses
You almost always know the IP address of the machine a user is connecting to your web service
from, and it's possible to guess a lot of information based on that number. In fact, it's so powerful
that it's treated as personally identiiable information in the EU, so for privacy-sensitive applica-
tions I'd recommend you remove IP addresses from your logs entirely .
You do need to be careful, though, since the information derived from IP addresses is unreliable.
In particular it's not a good idea to make hard-and-fast decisions based on the geographic results.
It can be very useful to use that information to intelligently set defaults for languages or home
locations, though, as long as the user can correct them subsequently.
MaxMind
The GeoLite City database by MaxMind is one of my all-time favorite resources. It's a compre-
hensive data set listing the city and country locations of a large number of IP addresses, released
under a data license that does require credit but is otherwise very open. It also comes bundled
with a set of APIs for a lot of diferent languages that make it easy to do the IP to location lookup
from within your own programs. GeoLite City also ofers a richer commercial data set that you
can drop into a system using the free iles, without requiring any code changes.
Infochimps
Taking the geolocation idea a step further, Infochimps ofers up demographic information on the
area that a visitor is living in. It appears to rely on US Census data, since it returns only language
information for other countries. You could use this to better target ofers or otherwise customize
the user experience on your site, though obviously the information will be pretty approximate:
curl "http://api.infochimps.com/web/an/de/demographics.json?\
apikey=api_test-W1cipwpcdu9Cbd9pmm8D4Cjc469&ip=67.195.115.39"
{ "men":2568,"women":2640,"w35_49":787,"m35_49":806,"kids":890,
"w18_34":700,"teens":515,"m18_34":752,
"rank":6,"lang":"english","second_langs":"?","households":2476}
Search WWH ::




Custom Search