https://github.com/urbica/citibike-nyc
Mapbox GL JS feature state usage example
https://github.com/urbica/citibike-nyc
citibike docker mapbox-gl-js
Last synced: 10 months ago
JSON representation
Mapbox GL JS feature state usage example
- Host: GitHub
- URL: https://github.com/urbica/citibike-nyc
- Owner: urbica
- Created: 2018-06-17T17:11:16.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-06T10:31:24.000Z (almost 7 years ago)
- Last Synced: 2025-03-15T19:37:05.363Z (over 1 year ago)
- Topics: citibike, docker, mapbox-gl-js
- Language: HTML
- Homepage: https://medium.com/@Urbica.co/visualising-large-spatiotemporal-data-in-web-applications-8583cf21907
- Size: 1.08 MB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Citi Bike NYC
Mapbox GL JS feature state usage example.

## Prerequisites
- [Docker](https://www.docker.com/get-docker)
- [Docker Compose](https://docs.docker.com/compose/install/)
## Step 1. Get the source code
```shell
git clone https://github.com/urbica/citibike-nyc.git
cd citibike-nyc
```
## Step 2. Start services
```shell
docker-compose up -d
```
## Step 3. Get trip data
Get Citi Bike trip data and unzip it into the `./data` folder
```shell
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
```shell
docker-compose exec db psql -d db -U postgres -f /scripts/aggregate_trips.sql
```
## Step 4. Review your data
Open [http://localhost:3000](http://localhost:3000/)