aboutsummaryrefslogtreecommitdiff
path: root/visualizer/extractor/train_poi.py
diff options
context:
space:
mode:
Diffstat (limited to 'visualizer/extractor/train_poi.py')
-rwxr-xr-xvisualizer/extractor/train_poi.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/visualizer/extractor/train_poi.py b/visualizer/extractor/train_poi.py
new file mode 100755
index 0000000..a4ccbca
--- /dev/null
+++ b/visualizer/extractor/train_poi.py
@@ -0,0 +1,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))