Documentation

Work with geo-temporal data

See the equivalent InfluxDB v2.6 documentation: Work with geo-temporal data.

Use the Flux Geo package to filter geo-temporal data and group by geographic location or track.

The Geo package is experimental and subject to change at any time. By using it, you agree to the risks of experimental functions.

To work with geo-temporal data:

  1. Import the experimental/geo package.

    import "experimental/geo"
    
  2. Load geo-temporal data. See below for sample geo-temporal data.

  3. Do one or more of the following:


Sample data

Many of the examples in this section use a sampleGeoData variable that represents a sample set of geo-temporal data. The Bird Migration Sample Data available on GitHub provides sample geo-temporal data that meets the requirements of the Flux Geo package.

Load annotated CSV sample data

Use the experimental csv.from() function to load the sample bird migration annotated CSV data from GitHub:

import `experimental/csv`

sampleGeoData = csv.from(
  url: "https://github.com/influxdata/influxdb2-sample-data/blob/master/bird-migration-data/bird-migration.csv"
)

csv.from(url: ...) downloads sample data each time you execute the query (~1.3 MB). If bandwidth is a concern, use the to() function to write the data to a bucket, and then query the bucket with from().

Write sample data to InfluxDB with line protocol

Use curl and the influx write command to write bird migration line protocol to InfluxDB. Replace db/rp with your destination bucket:

curl https://raw.githubusercontent.com/influxdata/influxdb2-sample-data/master/bird-migration-data/bird-migration.line --output ./tmp-data
influx write -b db/rp @./tmp-data
rm -f ./tmp-data

Use Flux to query the bird migration data and assign it to the sampleGeoData variable:

sampleGeoData = from(bucket: "db/rp")
    |> range(start: 2019-01-01T00:00:00Z, stop: 2019-12-31T23:59:59Z)
    |> filter(fn: (r) => r._measurement == "migration")

Was this page helpful?

Thank you for your feedback!


Set your InfluxDB URL

Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.

InfluxDB Cloud backed by InfluxDB IOx

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by IOx, this is the correct documentation.

If powered by TSM, see the TSM-based InfluxDB Cloud documentation.

InfluxDB Cloud backed by InfluxDB TSM

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine which enables nearly unlimited series cardinality and SQL query support. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by TSM, this is the correct documentation.

If powered by IOx, see the IOx-based InfluxDB Cloud documentation.

State of the InfluxDB Cloud (IOx) documentation

The new documentation for InfluxDB Cloud backed by InfluxDB IOx is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.