Documentation

Sample data

Use sample data to familiarize yourself with time series data and InfluxDB. InfluxData provides many sample time series datasets to use with InfluxDB Cloud.

InfluxDB Cloud demo data

Use InfluxDB Cloud demo data buckets for quick, free access to different types of sample data.

Demo data is not available for use with third-party integrations such as Grafana.

Sample data sets

The following sample data sets are used as examples in InfluxDB query guides.

Air sensor sample data

Air sensor sample data represents an “Internet of Things” (IoT) use case by simulating temperature, humidity, and carbon monoxide levels for multiple rooms in a building. The dataset also includes a relational SQL dataset with meta information about sensors in each room.

View air sensor sample data

Used in Query SQL data sources.

Bird migration sample data

Bird migration data is adapted from the Movebank: Animal Tracking data set on Kaggle and represents animal migratory movements throughout 2019. Use the Flux Geo package to query and analyze the geo-temporal data in this sample data set.

View bird migration sample data

Used in Work with geo-temporal data.

NOAA water sample data

This data set is publicly available data from the National Oceanic and Atmospheric Administration’s (NOAA) Center for Operational Oceanographic Products and Services.

The CSV data includes 15,258 observations of water levels (ft) collected every six minutes at two stations (Santa Monica, CA (ID 9410840) and Coyote Creek, CA (ID 9414575)) over the period from August 18, 2015 through September 18, 2015.

To avoid having to re-download this 10MB dataset every time you run a query, we recommend that you create a new bucket (noaa) and write the NOAA data to it. We also recommend updating the timestamps of the data to be relative to now(). To do so, run the following:

import "experimental/csv"

relativeToNow = (tables=<-) =>
  tables
    |> elapsed()
    |> sort(columns: ["_time"], desc: true)
    |> cumulativeSum(columns: ["elapsed"])
    |> map(fn: (r) => ({ r with _time: time(v: int(v: now()) - (r.elapsed * 1000000000))}))

csv.from(url: "https://influx-testdata.s3.amazonaws.com/noaa.csv")
  |> relativeToNow()
  |> to(bucket: "noaa", org: "example-org")

Used in Common queries and Common tasks.

USGS earthquake data

The United States Geological Survey (USGS) collects earthquake data and makes this data publicly available. Each earthquake event includes information such as latitude and longitude coordinates, magnitude, depth, and more.

To periodically retrieve and write USGS earthquake data to InfluxDB

  1. Create a new bucket named usgs.

  2. Create a new task and include the following Flux script:

    import "csv"
    import "experimental"
    import "experimental/http"
    
    usgsCSV = string(v: (http.get(url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.csv")).body)
    
    csv.from(csv: usgsCSV, mode: "raw")
      |> map(fn: (r) => ({
        _measurement: "earthquakes",
        _time: time(v: r.time),
        lat: float(v: r.latitude),
        lon: float(v: r.longitude),
        depth: float(v: r.depth),
        depthError: float(v: r.depthError),
        mag: float(v: r.mag),
        magType: string(v: r.magType),
        nst: int(v: r.nst),
        gap: float(v: r.gap),
        dmin: float(v: r.dmin),
        rms: float(v: r.rms),
        net: string(v: r.net),
        id: string(v: r.id),
        updated: int(v: time(v: r.updated)) / 1000000,
        place: string(v: r.place),
        type: string(v: r.type),
        locationSource: string(v: r.locationSource),
        magSource: string(v: r.magSource),
        horizontalError: float(v: r.horizontalError),
        magError: float(v: r.magError),
        magNst: int(v: r.magNst),
      }))
      |> group(columns: ["_measurement", "locationSource", "magSource", "type", "net", "magType"])
      |> experimental.to(bucket: "usgs")
    

    USGS updates earthquake data every minute. This task retrieves earthquake data for the current day. Set your task’s every interval between 1m and 24h, depending on how often you want to retrieve new data.

Collected USGS data

The task above writes the following to InfluxDB:

Fields:
lat, lon, depth, depthError, mag, nst, gap, dmin, rms, id, updated, place, horizontalError, magError, magNst

Tags:
magType, net, type, locationSource, magSource


Select your region

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.