---
title: pems-stsgcn
canonical_url: "https://www.modelscope.cn/datasets/Davidham3/pems-stsgcn"
md_url: "https://www.modelscope.cn/datasets/Davidham3/pems-stsgcn.md"
repository: Davidham3/pems-stsgcn
last_updated: 2026-11-04
license: apache-2.0
storage_size: "74 MB"
downloads: 66
stars: 0
---

# pems-stsgcn

> pems-stsgcn - Davidham3 在 ModelScope 开源的数据集。Traffic-flow benchmark datasets used by STSGCN (Spatial-Temporal Synchronous Graph Convolutional Networks, AAAI 2020), repackaged from the original MXNet release (Davidham3/STSGCN, verified against commit 3f825f6)…

Davidham3/pems-stsgcn 是 ModelScope 魔搭社区上的数据集，存储大小 74 MB，采用 apache-2.0 许可。

- **Repository**: Davidham3/pems-stsgcn
- **License**: apache-2.0
- **Storage size**: 74 MB
- **Downloads**: 66
- **Stars**: 0
- **Last updated**: 2026-11-04

Source: https://www.modelscope.cn/datasets/Davidham3/pems-stsgcn

---

# PEMS-STSGCN

Traffic-flow benchmark datasets used by **STSGCN** (*Spatial-Temporal
Synchronous Graph Convolutional Networks*, AAAI 2020), repackaged from the
original MXNet release
([Davidham3/STSGCN](https://github.com/Davidham3/STSGCN), verified against
commit `3f825f6`) into Apache Parquet. 5-minute aggregated road traffic,
predicting the next hour from the past hour.

| Dataset | Timesteps | Sensors | Channels | Interval |
|---|---|---|---|---|
| PEMS03 | 26208 | 358 | flow | 5 min |
| PEMS04 | 16992 | 307 | flow, occupancy, speed | 5 min |
| PEMS07 | 28224 | 883 | flow | 5 min |
| PEMS08 | 17856 | 170 | flow, occupancy, speed | 5 min |

## Files

Each dataset lives in its own folder with three tables:

- `<DS>/<DS>_series.parquet` — one row per timestep; each value column
  (`flow`, `occupancy`, `speed` where available) is a `list<float64>[N]` of
  per-sensor readings, i.e. the original `(T, N, C)` tensor in row-major form.
  Stored as float64: bit-for-bit identical to the original `.npz` (occupancy /
  speed are fractional, so float32 would be lossy; zstd keeps the size low).
- `<DS>/<DS>_edges.parquet` — spatial network edge list (`from_id`, `to_id`,
  `cost` = road distance in metres); node ids index into the sensor axis of the
  series tensor.
- `<DS>/<DS>_sensors.parquet` — maps `node_id` to the original sensor id
  (only where the original release shipped the id list).

## Usage

```python
# zero-code tabular access (the `series` split is a `datasets.Dataset`)
from datasets import load_dataset
ds = load_dataset("your-org/pems-stsgcn", "PEMS04")["series"]

# or tensor-native loading via the stsgcn-torch package:
from stsgcn_torch.hub import load_series, load_edges
data = load_series("PEMS04", source="hf")   # -> (T, N, C) ndarray
edges = load_edges("PEMS04", source="hf")   # -> (M, 3) ndarray
```

Reconstruction is exact: `np.stack([series["flow"]]) == original_npz[..., 0]` bit-for-bit.

## Provenance & license

Code conversion: `scripts/build_hf_dataset.py` of the
`stsgcn_torch` reimplementation; every file is verified bit-for-bit against
the original `.npz` / `.csv` by `scripts/verify_hf_dataset.py`. This packaging
is released under Apache-2.0; the underlying PEMS data originates from the
Caltrans Performance Measurement System (PeMS).
