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)
  • Copy
  • Fill window

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")
  • Copy
  • Fill window

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB 3 Core and Enterprise are now in Beta

InfluxDB 3 Core and Enterprise are now available for beta testing, available under MIT or Apache 2 license.

InfluxDB 3 Core is a high-speed, recent-data engine that collects and processes data in real-time, while persisting it to local disk or object storage. InfluxDB 3 Enterprise is a commercial product that builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries. A free tier of InfluxDB 3 Enterprise will also be available for at-home, non-commercial use for hobbyists to get the full historical time series database set of capabilities.

For more information, check out:

InfluxDB Cloud powered by TSM