https://github.com/zacoppotamus/citibikes-ny
https://github.com/zacoppotamus/citibikes-ny
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zacoppotamus/citibikes-ny
- Owner: zacoppotamus
- Created: 2014-07-09T15:52:28.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-03T03:59:45.000Z (over 10 years ago)
- Last Synced: 2025-01-12T18:36:46.688Z (5 months ago)
- Language: JavaScript
- Size: 246 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
NY Citibike Data
---Grab Data
===
Dataset is too big for github so hosting it on [dropbox](https://www.dropbox.com/s/6zuhiprdt043spi/citibikedata.csv). Add it to ./dataset/Installation
===Install dependencies:
```
bower install && npm install
```Start mongoDB process:
```
mongod
```Grunt:
```
grunt serve
```Useful mongoDB commands
===After running
```
mongo
```Import CSV to mongoDB database:
```
mongoimport -d nydata-dev -c trips --type csv --file citibikedata.csv --headerline
```Use a nydata-dev table:
```
use nydata-dev
```Find rows in different collections:
```
db.trips.find({ bikeid : 18940 })
db.trips.find({ "start station name" : "Broadway & E 14 St" })
db.trips.distinct('start station name') // get all different subway stations
db.trips.aggregate([{"$match" : {"start_sname" : "E 3 St & 1 Ave"}}, {"$group" : {"_id" : "$end_sname", "sum" : {"$sum":1} }}, {$sort:{"sum":1}}, {$limit:5} ])
```