| # 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 sensors | |
| - `distances.csv`: Pairwise distances between sensors in meters | |
| - `adj_mx.npy`: Pre-computed adjacency matrix (207×207) for graph neural networks | |
| - `adj_mx_mapping.json`: Metadata and parameters used to generate the adjacency matrix | |
| ## Usage | |
| ```python | |
| 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. | |