Archived documentation version rendered and hosted by DevNetExpertTraining.com
Documentation

Map visualization

The Map visualization displays geo-temporal data on a geographic map.

Map data visualization

Set up the Map visualization

To view geo-temporal data on a geographic map, set up a Map visualization.

Set up the Map visualization

  1. Do one of the following:

    • Click Data Explorer in the navigation bar.

    • Click Dashboards in the navigation bar:

      Click the name of the dashboard to update and then do one of the following:

      • To edit an existing cell, click the icon on the cell and then Configure.
      • To create a new cell, click Add Cell.
  2. Use the Query Builder or the Script Editor to enter your query. To determine the location of points on a geographic map, query results must include the following fields:

    • lat: latitude in decimal degrees (WGS 84)
    • lon: longitude in decimal degrees (WGS 84)

    Or the s2_cell_id tag (S2 Cell ID as a token)

    If query results include lat and lon fields and an s2_cell_id tag, the map uses the lat and lon fields to determine point locations. If results only include the s2_cell_id, the map uses the center of the S2 cell as the point location.

    See Example queries.

Example queries

View a bird’s migration path

The following query uses the Bird migration sample data to display the migration path of a specific bird.

from(bucket: "migration")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => r._measurement == "migration")
    |> filter(fn: (r) => r._field == "lat" or r._field == "lon")
    |> filter(fn: (r) => r.id == "91864A")  
    |> aggregateWindow(every: v.windowPeriod, fn: last)

View earthquakes reported by USGS

The following query uses the United States Geological Survey (USGS) earthquake data to display the locations of earthquakes.

from(bucket: "usgs")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => r._measurement == "earthquakes")
    |> filter(fn: (r) => r._field == "lat" or r._field == "lon")

Select your region

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.