Maxmind.com provide a free GeoIP database in binary format (.dat), and some PHP class files for performing GeoIP lookup's on an IP address.

I wrote an article on their support forums hereĀ :
http://forum.maxmind.com/viewtopic.php?t=27

detailing how to install and use the GeoIP class files with AWStats