Merge Data

We join the Bluetooth Travel Time data to the Traffic Volumes. This allows us to use Traffic Volume as a predictor of Travel Time.


In [1]:
import pandas as pd
import numpy as np
bt = pd.read_csv('../data/BLUETH_20150819.traveltime', header=None, names=['t', 'travel time'])
vs = pd.read_csv('../data/VSDATA_20150819.volume', header=None, names=['t', 'volume'])

In [2]:
data = pd.merge(vs, bt, on='t', how='left')
data.head()


Out[2]:
t volume travel time
0 2015-08-19 00:00:00 32 660.0
1 2015-08-19 00:15:00 20 598.0
2 2015-08-19 00:30:00 24 637.5
3 2015-08-19 00:45:00 16 637.5
4 2015-08-19 01:00:00 9 566.0