0

I'm looking to get a city to country mapping without an IP address I have access to these files on my box:

GeoIP2Country.mmdb  
GeoIPCountry.dat 
GeoIP2City.mmdb        
GeoIPCity.dat   
GeoIP2ISP.mmdb      
GeoIP2Connections.mmdb 

Normally the way I would use this is GeoIP2Country.country(cip).country.name and it would return a country name for the IP I feed it.

In my use case I want to provide it with a city name and have it return a country name. Since all the data is in there this would save me a lot of time. Is it possible to query mmdb (no idea how to do this) then convert that to a dataframe so I can just have a df of country to city mapping or vise versa?

chowpay
  • 1,515
  • 6
  • 22
  • 44

1 Answers1

0

based on this :Query by city name on geolite2 .mmdb file (JAVA) I cant do what I wnated to.

BUT there is also a country_code.csv I think thats offered by maxmind which does what I need in conjunction with some other non mmdb files.

chowpay
  • 1,515
  • 6
  • 22
  • 44