Visualize location and IP data

Visualize IP addresses, airports, cities, and countries on a map using our built-in location mapping.

Create your first map chart

  1. Create a new chart and select Chart -> Map in right sidebar.

  2. Pick a numeric column to visualize on the map and drag it to Value.

  3. Drag an IP address or other location column to Location.

You should see your IP addresses rendered on a map below.

Map chart.png

Create a map chart using SQL

Here's an SQL example visualizing CloudFlare request rate by location:

Visualize IP addresses via SQL
SELECT
  avgMerge(rate_avg) AS value,
  location(metricTag('colo')) AS location
FROM {{source}}
WHERE
  name = 'cloudflare_zone_colocation_requests_total'
  AND dt BETWEEN {{start_time}} AND {{end_time}}
GROUP BY location

Want to show IPs on the map?

Open the right sidebar on your chart and select Data -> Location label -> Original value. Now, the tooltips will show your data directly instead of the closest city.

Map chart showing IP addresses.png

Need to visualize airports, cities, or countries?

Location in query builder and location() in SQL both accept many location formats. Use "1.1.1.1", "JFK", "San Francisco, CA", "London, UK", or "US".

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏