能源负荷/功率包(UCI Household Power)
真实开源数据集封装(SKU-08):UCI Individual household electric power consumption。约 4 年 1 分钟间隔有功功率等时序;归一化为 timestamp + Global_active_power 等列。许可 CC BY 4.0。
提供商: 平台自营
交付形态:文件包
适用场景
1 / 5场景说明
适用于:
1
家庭负荷/功率短期预测基线
2
时序重采样、缺失处理与特征工程教学
3
分项计量(Sub_metering_*)探索分析
不适用于:替代电网系统负荷或区域调度数据。
使用指南
2 / 5通过统一 API 拉取数据(全站接口相同,仅替换 slug)。
-
1
获取凭证
登录 → 购买 → 在 申请 API Key 签发密钥(仅显示一次)
-
2
发起请求
GET /api/v1/data/energy-uci-power/rows?page=1&size=10,Header:X-API-Key -
3
解析响应
从 JSON 的
rows取数据,用total翻页 -
4
处理错误
401密钥无效 ·403未购买/无权 ·400参数错误 ·429过频 ·502上游失败
数据集说明
3 / 5SKU-08 能源负荷/功率包
- 源:UCI Individual household electric power consumption
- 类型:timeseries(分钟级)
- 主目标:Global_active_power
- 示例:load_forecast_baseline.py(滞后 + 日历特征)
字段 Schema
4 / 5{
"fields": [
{
"dtype": "datetime64[us]",
"is_label": false,
"is_time": true,
"kind": "datetime",
"name": "timestamp",
"nullable": false,
"nunique": 2075259
},
{
"dtype": "float64",
"is_label": true,
"is_time": false,
"kind": "numeric",
"name": "Global_active_power",
"nullable": true,
"nunique": 4186
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "Global_reactive_power",
"nullable": true,
"nunique": 532
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "Voltage",
"nullable": true,
"nunique": 2837
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "Global_intensity",
"nullable": true,
"nunique": 221
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "Sub_metering_1",
"nullable": true,
"nunique": 88
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "Sub_metering_2",
"nullable": true,
"nunique": 81
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "Sub_metering_3",
"nullable": true,
"nunique": 32
}
],
"format": "timeseries",
"freq_guess": "min",
"label_column": "Global_active_power",
"layout": "single_csv",
"license_hint": "CC BY 4.0",
"source_file": "train.csv",
"source_name": "Individual household electric power consumption (UCI)",
"source_url": "https://archive.ics.uci.edu/dataset/235/individual+household+electric+power+consumption",
"time_column": "timestamp"
}
调用示例
5 / 5路径中的 slug 换成已购商品标识即可。完整说明见 API 文档。
curl -H "X-API-Key: ds_你的密钥" \ "https://www.dataocean.zhixxing.cn/api/v1/data/energy-uci-power/rows?page=1&size=10"
import requests
r = requests.get(
"https://www.dataocean.zhixxing.cn/api/v1/data/energy-uci-power/rows",
headers={"X-API-Key": "ds_你的密钥"},
params={"page": 1, "size": 10},
timeout=30,
)
r.raise_for_status()
print(r.json())
const apiKey = "ds_你的密钥";
const url = new URL("https://www.dataocean.zhixxing.cn/api/v1/data/energy-uci-power/rows");
url.searchParams.set("page", "1");
url.searchParams.set("size", "10");
const resp = await fetch(url, {
headers: { "X-API-Key": apiKey },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const payload = await resp.json();
console.log(payload);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder()
.uri(URI.create("https://www.dataocean.zhixxing.cn/api/v1/data/energy-uci-power/rows?page=1&size=10"))
.header("X-API-Key", "ds_你的密钥")
.GET()
.build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET",
"https://www.dataocean.zhixxing.cn/api/v1/data/energy-uci-power/rows?page=1&size=10", nil)
req.Header.Set("X-API-Key", "ds_你的密钥")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}
using System.Net.Http;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "ds_你的密钥");
var json = await client.GetStringAsync("https://www.dataocean.zhixxing.cn/api/v1/data/energy-uci-power/rows?page=1&size=10");
Console.WriteLine(json);
1 / 5