- Install node.js and NPM
- Install
csv2geojson
sudo npm install -g csv2geojson
- Get a CSV data dump
wget -O raw.csv http://nextbus.dathub.org/_csv
- Filter it down to a particular bus line, e.g. 1017
# get the header line
head -n1 raw.csv > 1017.csv
# grab the 1017 line info
cat raw.csv | grep '|1017|' >> 1017.csv
- Convert the data to geojson format
# show route as bus stops
csv2geojson 1017.csv > 1017.geojson
# alternatively, show route as line
csv2geojson --line 1017.csv > 1017.geojson
- Copy and paste the geojson data into geojson.io.