urbica / citibike-nyc

Mapbox GL JS feature state usage example

Home Page:https://medium.com/@Urbica.co/visualising-large-spatiotemporal-data-in-web-applications-8583cf21907

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Citi Bike NYC

Mapbox GL JS feature state usage example.

Screenshot

Prerequisites

Step 1. Get the source code

git clone https://github.com/urbica/citibike-nyc.git
cd citibike-nyc

Step 2. Start services

docker-compose up -d

Step 3. Get trip data

Get Citi Bike trip data and unzip it into the ./data folder

curl https://s3.amazonaws.com/tripdata/201805-citibike-tripdata.csv.zip -o ./data/tripdata.zip
unzip ./data/tripdata.zip -d ./data

Insert trip data in the database and aggregate trips by hour

docker-compose exec db psql -d db -U postgres -f /scripts/aggregate_trips.sql

Step 4. Review your data

Open http://localhost:3000