交通流量时序包(METR-LA)
真实开源数据集封装(SKU-09):METR-LA 洛杉矶环路检测器速度矩阵(约 207 传感器 × 5 分钟间隔)。交付宽表 train.csv(含 mean_speed)+ 邻接矩阵;样例为前若干时间步。
提供商: 平台自营
交付形态:文件包
适用场景
1 / 5场景说明
适用于:
1
城市路网速度短期预测基线
2
时空图模型(GNN)输入与邻接实验
3
矩阵可视化 / 缺失检测教学
不适用于:替代实时交管 API,或声称覆盖全城非高速路段。
使用指南
2 / 5通过统一 API 拉取数据(全站接口相同,仅替换 slug)。
-
1
获取凭证
登录 → 购买 → 在 申请 API Key 签发密钥(仅显示一次)
-
2
发起请求
GET /api/v1/data/transport-metr-la/rows?page=1&size=10,Header:X-API-Key -
3
解析响应
从 JSON 的
rows取数据,用total翻页 -
4
处理错误
401密钥无效 ·403未购买/无权 ·400参数错误 ·429过频 ·502上游失败
数据集说明
3 / 5SKU-09 交通流量时序包(METR-LA)
- 源:METR-LA 速度矩阵(GitHub 镜像 hazdzz/dcrnn_data)
- 类型:timeseries(宽表传感器矩阵)
- 标签便利列:mean_speed;另含 wam 邻接
- 示例:traffic_forecast_baseline.py
字段 Schema
4 / 5{
"entity_columns": [
"773869",
"767541",
"767542",
"717447",
"717446",
"717445",
"773062",
"767620",
"737529",
"717816",
"765604",
"767471",
"716339",
"773906",
"765273",
"716331",
"771667",
"716337",
"769953",
"769402",
"769403",
"769819",
"769405",
"716941",
"717578",
"716960",
"717804",
"767572",
"767573",
"773012",
"773013",
"764424",
"769388",
"716328",
"717819",
"769941",
"760987",
"718204",
"718045",
"769418",
"768066",
"772140",
"773927",
"760024",
"774012",
"774011",
"767609",
"769359",
"760650",
"716956",
"769831",
"761604",
"717495",
"716554",
"773953",
"767470",
"716955",
"764949",
"773954",
"767366",
"769444",
"773939",
"774067",
"769443",
"767750",
"767751",
"767610",
"773880",
"764766",
"717497",
"717490",
"717491",
"717492",
"717493",
"765176",
"717498",
"717499",
"765171",
"718064",
"718066",
"765164",
"769431",
"769430",
"717610",
"767053",
"767621",
"772596",
"772597",
"767350",
"767351",
"716571",
"773023",
"767585",
"773024",
"717483",
"718379",
"717481",
"717480",
"717486",
"764120",
"772151",
"718371",
"717489",
"717488",
"717818",
"718076",
"718072",
"767455",
"767454",
"761599",
"717099",
"773916",
"716968",
"769467",
"717576",
"717573",
"717572",
"717571",
"717570",
"764760",
"718089",
"769847",
"717608",
"767523",
"716942",
"718090",
"769867",
"717472",
"717473",
"759591",
"764781",
"765099",
"762329",
"716953",
"716951",
"767509",
"765182",
"769358",
"772513",
"716958",
"718496",
"769346",
"773904",
"718499",
"764853",
"761003",
"717502",
"759602",
"717504",
"763995",
"717508",
"765265",
"773996",
"773995",
"717469",
"717468",
"764106",
"717465",
"764794",
"717466",
"717461",
"717460",
"717463",
"717462",
"769345",
"716943",
"772669",
"717582",
"717583",
"717580",
"716949",
"717587",
"772178",
"717585",
"716939",
"768469",
"764101",
"767554",
"773975",
"773974",
"717510",
"717513",
"717825",
"767495",
"767494",
"717821",
"717823",
"717458",
"717459",
"769926",
"764858",
"717450",
"717452",
"717453",
"759772",
"717456",
"771673",
"772167",
"769372",
"774204",
"769806",
"717590",
"717592",
"717595",
"772168",
"718141",
"769373"
],
"fields": [
{
"dtype": "datetime64[us]",
"is_label": false,
"is_time": true,
"kind": "datetime",
"name": "timestamp",
"nullable": false,
"nunique": 34272
},
{
"dtype": "float64",
"is_label": true,
"is_time": false,
"kind": "numeric",
"name": "mean_speed",
"nullable": false,
"nunique": 31913
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "773869",
"nullable": false,
"nunique": 1089
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "767541",
"nullable": false,
"nunique": 620
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "767542",
"nullable": false,
"nunique": 968
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "717447",
"nullable": false,
"nunique": 1252
},
{
"dtype": "float64",
"is_label": false,
"is_time": false,
"kind": "numeric",
"name": "717446",
"nullable": false,
"nunique": 1374
}
],
"fields_note": "schema.fields lists timestamp, mean_speed, and first 5 of 207 sensor id columns",
"files": {
"train.csv": "wide speed matrix + mean_speed (mph-like loop speeds)",
"vel_metr_la.csv": "original upstream matrix",
"wam_metr_la.csv": "graph / adjacency companion"
},
"format": "timeseries",
"freq_guess": "5min",
"label_column": "mean_speed",
"layout": "metr_la_matrix",
"license_hint": "METR-LA / DCRNN research data \u2014 verify redistribution terms before commercial sale",
"sensor_count": 207,
"source_file": "vel_metr_la.csv",
"source_name": "METR-LA (DCRNN; hazdzz/dcrnn_data mirror)",
"source_url": "https://github.com/hazdzz/dcrnn_data",
"time_column": "timestamp"
}
调用示例
5 / 5路径中的 slug 换成已购商品标识即可。完整说明见 API 文档。
curl -H "X-API-Key: ds_你的密钥" \ "https://www.dataocean.zhixxing.cn/api/v1/data/transport-metr-la/rows?page=1&size=10"
import requests
r = requests.get(
"https://www.dataocean.zhixxing.cn/api/v1/data/transport-metr-la/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/transport-metr-la/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/transport-metr-la/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/transport-metr-la/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/transport-metr-la/rows?page=1&size=10");
Console.WriteLine(json);
1 / 5