Skip to content

Instantly share code, notes, and snippets.

@e-n-f
Last active July 7, 2017 10:45
Show Gist options
  • Save e-n-f/b690bf26249028c8c26b to your computer and use it in GitHub Desktop.
Save e-n-f/b690bf26249028c8c26b to your computer and use it in GitHub Desktop.
NYC taxi with datamaps
#!/bin/sh
for i in trip_data_*.csv.zip
do
unzip -c $i
done |
tr -d '\015' |
awk -F, '{print $12 "," $11 " 1:0"; print $14 "," $13 " 1:1"}' |
/data2/data/github/datamaps/encode -z19 -m1 -o nyc-taxi-all
/data2/data/github/datamaps/enumerate -b40.458,-74.590,41.131,-73.494 -z16 nyc-taxi-all/ |
xargs -L1 -P8 sh -c '/data2/data/github/datamaps/render -xs1 -C0:240:1:30 -p2 -B 18:.004378:1.23 -G 0.3 $1 $2 $3 $4 | /data2/data/github/pngquant/pngquant 64 > nyc-taxi.tiles/$2/$3/$4.png' blah
/data2/data/github/mbutil/mb-util nyc-taxi.tiles nyc-taxi.mbtiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment