Sensor Graph Data for METR-LA
This directory contains spatial information about the traffic sensors used in the METR-LA dataset.
Files
sensor_locations.csv: Sensor coordinates (latitude, longitude) for 207 sensorsdistances.csv: Pairwise distances between sensors in metersadj_mx.npy: Pre-computed adjacency matrix (207×207) for graph neural networksadj_mx_mapping.json: Metadata and parameters used to generate the adjacency matrix
Usage
import pandas as pd
import numpy as np
# Load sensor locations
locations = pd.read_csv('sensor_graph/sensor_locations.csv')
print(f"Dataset has {len(locations)} sensors")
# Load distances (for custom graph construction)
distances = pd.read_csv('sensor_graph/distances.csv')
# Load pre-computed adjacency matrix
adj_matrix = np.load('sensor_graph/adj_mx.npy')
print(f"Adjacency matrix shape: {adj_matrix.shape}")
Coordinate System
- Coordinates are in WGS84 (latitude, longitude)
- Distances are in meters
- Use this data to construct the adjacency matrix for graph neural networks
Citation
This spatial data is part of the original dataset used in:
Li, Y., Yu, R., Shahabi, C., & Liu, Y. (2018). Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting. ICLR 2018.