willdurand/Geocoder — pull request #84 by ollietb (2012-09-10 18:16:34+00:00)
Title: Freegeoip region_code

I saw that the FreeGeoIpProvider wasn't returning the region_code, even though the documentation says it does. When I investigated it seemed like the results from the US were returning FIPS alpha codes (CA, NY etc) and any other country were returning FIPS numeric codes. I added some code which standardises American codes with the rest of the world. It doesn't break BC because currently the FreeGeoIpProvider returns `null` as the region_code

Compare http://freegeoip.net/json/bbc.com with http://freegeoip.net/json/google.com to see what I mean. The FIPS region_code for California should be 06, London correctly returns N7.
The information I took is from here: http://dev.maxmind.com/static/maxmind-region-codes.csv