cjheath / geoip

The Ruby gem for querying Maxmind.com's GeoIP database, which returns the geographic location of a server given its IP address
http://geoip.rubyforge.org/
GNU Lesser General Public License v2.1
714 stars 90 forks source link

GeoIP database global accuracy #35

Open srilumpa opened 11 years ago

srilumpa commented 11 years ago

Hi,

I've read on MaxMind's website that the accuracy of their database decrease at the rate of about 1.5% per month and I was wondering if their is a way to evaluate the overall accuracy of the database once the GeoIP object is created.

If the creation date of the .dat file is available, it could be interesting to access it and read it through th GeoIP model, or even having access to a method, say #accuracy, returning directly the evaluated accuracy:

def accuracy
  0.985**((Time.now - database_publication_date)/2592000).to_i
end