Geo Lookup without IP



  • Avatar
    Cory Singleton

    Hi Ashley, yes, this is possible. Alternatively, instead of faking an IP, you could also simply return a latitude and longitude that corresponds to somewhere in each country code for example:

    | if(country_code_in_log="US","39.7392") as latitude

    | if(country_code_in_log="US","-104.9903") as longitude

    | count by latitude,longitude

    As long as you have two columns named Latitude and Longitude, the map visualization will display it. 

    Hope this helps. If for some reason I have misunderstood, let me know and we can chat further. 

  • Avatar
    Ian Ashman

    Rather than IP Addresses, consider using a lookup table with the country code in the log.

    Find a source csv file of latitude/logitude for each country code and use this file in a search lookup.

    For example,

    The source file

    AE,23.424076,53.847818,"United Arab Emirates"
    AG,17.060816,-61.796428,"Antigua and Barbuda"
    .... etc

    This lookup file can be integrated as follows:

    | lookup latitude,longitude from on country=country_code_in_log
    | count by latitude,longitude


Please sign in to leave a comment.