{
  "format": "dataset-manifest/1",
  "slug": "sensor-readings",
  "version": 2,
  "seed": "sensor-readings:1",
  "spec": {
    "format": "dataset/1",
    "slug": "sensor-readings",
    "name": "Sensor Readings",
    "tagline": "Sensor readings for temperature, humidity, and battery from devices at sites collected every ten minutes over a month.",
    "description": "Devices at various sites continuously monitor environmental conditions, sending temperature, humidity, and battery status readings every ten minutes. Each device, equipped with sensors, operates at designated locations, creating a network that captures real-time data crucial for understanding both device performance and environmental variations. Gaps in data may occur when devices go offline, influencing the insights that can be drawn from the dataset. \n\nThe 'devices' table contains individual device identifiers, along with specifications such as the model and installation date. Each device is linked to a particular location in the 'sites' table, which lists site names, geographical coordinates, and other relevant information. The 'sensors' table details the sensors integrated into each device, defining their capabilities and types (temperature, humidity, battery level). Finally, the 'readings' table captures the actual measurements taken from the sensors, timestamped for every ten-minute interval. Each reading can be connected back to a specific sensor and device, allowing for a comprehensive view of performance over time. \n\nThis dataset enables exploration of questions such as: How do temperature and humidity levels vary over time at different sites? What percentage of readings are missing due to device offline periods? How do battery levels correlate with the frequency of data collection? Practicing with this data is excellent for honing skills in time series analysis, data cleaning, and understanding device performance metrics. \n\nPlease note that the data is synthetic, created to model the operational behavior of an IoT device network without utilizing real-world measurements.",
    "domain": "iot",
    "shape": "time-series",
    "useCases": [
      "etl-pipelines",
      "analytics-demo"
    ],
    "keywords": [
      "sensor data",
      "iot",
      "environmental monitoring",
      "temperature",
      "humidity",
      "battery levels",
      "time-series"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "devices": {
        "description": "This table contains information about each device, including its unique ID and the site it belongs to.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each device."
          },
          "site_id": {
            "kind": "fk",
            "ref": "sites.id",
            "description": "Foreign key linking to the site where the device is installed."
          },
          "device_name": {
            "kind": "words",
            "max": 3,
            "description": "The name assigned to the device.",
            "nullable": true,
            "pool": [
              "thermostat",
              "sensor",
              "camera",
              "light",
              "switch",
              "monitor",
              "detector",
              "controller",
              "module",
              "gateway",
              "hub",
              "transmitter",
              "receiver",
              "logger",
              "actuator",
              "beacon",
              "node",
              "tracker",
              "display",
              "connector"
            ],
            "min": 1
          }
        }
      },
      "sites": {
        "description": "This table lists the different sites where the devices are installed, providing location context.",
        "rows": 20,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each site."
          },
          "site_name": {
            "kind": "words",
            "max": 3,
            "description": "The name of the site.",
            "nullable": true,
            "pool": [
              "warehouse",
              "factory",
              "office",
              "building",
              "park",
              "campus",
              "site",
              "location",
              "zone",
              "area",
              "facility",
              "plant",
              "station",
              "hub",
              "network",
              "region",
              "district",
              "block",
              "sector",
              "field"
            ],
            "min": 1
          },
          "location": {
            "kind": "json",
            "template": {
              "latitude": {
                "kind": "decimal",
                "min": -90,
                "max": 90
              },
              "longitude": {
                "kind": "decimal",
                "min": -180,
                "max": 180
              }
            },
            "description": "Geographical coordinates of the site.",
            "nullable": true
          }
        }
      },
      "sensors": {
        "description": "This table details the various types of sensors used in the devices, linking them to their specifications.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each sensor type."
          },
          "sensor_type": {
            "kind": "enum",
            "values": [
              "temperature",
              "humidity",
              "battery"
            ],
            "description": "The type of measurement the sensor takes.",
            "weights": [
              6,
              3,
              1
            ]
          },
          "unit": {
            "kind": "words",
            "max": 3,
            "description": "The unit of measurement for the sensor type.",
            "nullable": true,
            "when": {
              "column": "sensor_type",
              "in": [
                "temperature",
                "humidity"
              ]
            },
            "pool": [
              "celsius",
              "fahrenheit",
              "kelvin",
              "percent",
              "lux",
              "volt",
              "ampere",
              "hertz",
              "pascal",
              "decibel",
              "ohm",
              "meter",
              "liter",
              "gram",
              "joule",
              "watt",
              "mole",
              "newton",
              "bar",
              "giga"
            ],
            "min": 1
          }
        }
      },
      "readings": {
        "description": "This table captures the sensor readings taken at regular intervals, linking each reading to a specific device and a sensor type.",
        "rows": {
          "per": "devices",
          "via": "device_id",
          "min": 10,
          "max": 30,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each reading."
          },
          "device_id": {
            "kind": "fk",
            "ref": "devices.id",
            "description": "Foreign key linking to the device that generated the reading."
          },
          "sensor_id": {
            "kind": "fk",
            "ref": "sensors.id",
            "description": "Foreign key linking to the type of sensor that recorded the reading."
          },
          "reading_value": {
            "kind": "decimal",
            "min": 0,
            "max": 100,
            "description": "The recorded value from the sensor reading.",
            "distribution": "high"
          },
          "timestamp": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-01-31",
            "description": "The date and time when the reading was taken."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "high-cardinality",
      "free-text"
    ],
    "analysisQuestions": [
      "What is the average temperature recorded per site over the month?",
      "How do humidity levels fluctuate throughout the day?",
      "Which devices have the highest battery usage?",
      "Are there any patterns in the readings that indicate device failures?",
      "What time of day do devices report the most readings?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Devices and Readings",
        "sql": "SELECT d.device_name, r.reading_value FROM devices d JOIN readings r ON d.id = r.device_id;",
        "dialect": "postgres"
      },
      {
        "title": "Average Temperature by Site",
        "sql": "SELECT s.site_name, AVG(r.reading_value) AS average_temp FROM readings r JOIN devices d ON r.device_id = d.id JOIN sites s ON d.site_id = s.id WHERE r.sensor_id = (SELECT id FROM sensors WHERE sensor_type = 'temperature') GROUP BY s.site_name;",
        "dialect": "postgres"
      },
      {
        "title": "Reading Count Over Time",
        "sql": "SELECT DATE(r.timestamp) AS reading_date, COUNT(*) AS reading_count FROM readings r GROUP BY reading_date ORDER BY reading_date;",
        "dialect": "postgres"
      },
      {
        "title": "Battery Levels Over Time",
        "sql": "SELECT r.timestamp, r.reading_value FROM readings r JOIN sensors s ON r.sensor_id = s.id WHERE s.sensor_type = 'battery' ORDER BY r.timestamp;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "IoT Analytics Dashboard",
        "body": "Data scientists can utilize this dataset to build an analytics dashboard that visualizes the performance of sensor readings over time. By connecting this data to a BI tool, they can create compelling visualizations that quickly highlight trends and anomalies in environmental metrics."
      },
      {
        "title": "ETL Pipeline Development",
        "body": "Data engineers can leverage this dataset to develop ETL pipelines that process sensor data for storage in a data warehouse. The varied readings and structured format provide an ideal scenario for practicing data transformation and loading processes."
      },
      {
        "title": "Predictive Maintenance Models",
        "body": "Machine learning practitioners can use this dataset to train models for predictive maintenance. By analyzing sensor readings, they can identify patterns that precede device failures, enabling proactive maintenance and reducing downtime."
      }
    ]
  },
  "counts": {
    "sensors": 10,
    "sites": 20,
    "devices": 50,
    "readings": 798
  },
  "stats": {
    "devices": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "site_id": {
          "nulls": 0,
          "distinct": 19,
          "min": 1,
          "max": 20
        },
        "device_name": {
          "nulls": 5,
          "distinct": 41
        }
      }
    },
    "sites": {
      "rows": 20,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 20,
          "min": 1,
          "max": 20
        },
        "site_name": {
          "nulls": 0,
          "distinct": 19
        },
        "location": {
          "nulls": 1,
          "distinct": 19
        }
      }
    },
    "sensors": {
      "rows": 10,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "sensor_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "battery",
          "max": "temperature"
        },
        "unit": {
          "nulls": 1,
          "distinct": 9
        }
      }
    },
    "readings": {
      "rows": 798,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 798,
          "min": 1,
          "max": 798
        },
        "device_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "sensor_id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "reading_value": {
          "nulls": 0,
          "distinct": 739,
          "min": 0.01,
          "max": 100
        },
        "timestamp": {
          "nulls": 0,
          "distinct": 798,
          "min": "2023-01-01 01:29:43",
          "max": "2023-01-31 23:49:33"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/sensors.csv",
      "format": "csv",
      "table": "sensors",
      "key": "datasets/sensor-readings/v2/csv/sensors.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/csv/sensors.csv",
      "bytes": 239,
      "sha256": "50e69a6d5328bcf6cf0a1c8a8479870caf0130107d0a35258b4e799a04d3b76c",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/sites.csv",
      "format": "csv",
      "table": "sites",
      "key": "datasets/sensor-readings/v2/csv/sites.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/csv/sites.csv",
      "bytes": 1243,
      "sha256": "f0b0842118d76034f9ad997e32227957c87a2a765f1ec4fb096807cbb25e1477",
      "rows": 20,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/devices.csv",
      "format": "csv",
      "table": "devices",
      "key": "datasets/sensor-readings/v2/csv/devices.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/csv/devices.csv",
      "bytes": 1008,
      "sha256": "64f57308d8cdb8722d38d0b8f3025e41c5349e7bcb0b60ef0e8b9b7d750d6848",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/readings.csv",
      "format": "csv",
      "table": "readings",
      "key": "datasets/sensor-readings/v2/csv/readings.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/csv/readings.csv",
      "bytes": 28538,
      "sha256": "b527414e08d68a4b5b6516046ada9d5b393e27de9dd66541cc8343aca326b875",
      "rows": 798,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "sensor-readings.json",
      "format": "json",
      "table": null,
      "key": "datasets/sensor-readings/v2/sensor-readings.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/sensor-readings.json",
      "bytes": 124333,
      "sha256": "5952dfd763bbf5ee433aa358932a708e744c29ff5dcd2aced017e4beb855e50f",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/sensor-readings/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/sql/postgres.sql",
      "bytes": 43475,
      "sha256": "40d39d4db116387d1b161648b4d7e609d1388ea326a831a8e62c3ead9f58c375",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/sensor-readings/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/sql/mysql.sql",
      "bytes": 43048,
      "sha256": "75392d5f984dfc625bd60c7bf29e5604a63af673e7658a42006b12cb1f0a5fef",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/sensor-readings/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/sql/mssql.sql",
      "bytes": 44197,
      "sha256": "a8c548b318941e32a25b49f56d3e195ff0dd1a9b406dcb9b75cb362decfff381",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/sensor-readings/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/sql/sqlite.sql",
      "bytes": 42912,
      "sha256": "41fc7055a0dc3c1d386afd8cd1e5d52351c372555e7aaefcaf83b431d13c539c",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/sensor-readings/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/prisma/seed.ts",
      "bytes": 104902,
      "sha256": "83982d7effe555622b4091c65e4f78cfdf0420cd30713488539818c200bc0155",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/sensor-readings/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/sensor-readings/v2/django/fixtures.json",
      "bytes": 160328,
      "sha256": "ba77ddb70c8113f815d0bb54224f2b773a135d85f7853066f9e049f2f2e3156f",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788734258331,
  "updatedAt": 1788785897856
}
