File size: 1,291 Bytes
e035379
 
 
 
 
 
2c26667
 
e035379
 
 
 
 
 
 
 
 
 
64f7d4d
e035379
 
 
64f7d4d
e035379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# 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.