aboutsummaryrefslogtreecommitdiff
path: root/visualizer/extractor/train_poi.py
blob: a4ccbcaa507c438cbf863cee1a2103557ba5b240 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python

import os

import data
from data.hdf5 import TaxiDataset
from visualizer import Path


poi = {
    'longest': 1492417
}

if __name__ == '__main__':
    prefix = os.path.join(data.path, 'visualizer', 'Train POI')
    if not os.path.isdir(prefix):
        os.mkdir(prefix)

    d = TaxiDataset('train')
    for (k, v) in poi.items():
        Path(d.extract(v)).save(os.path.join('Train POI', k))