forked from chriswhong/nyctaxi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.txt
More file actions
28 lines (12 loc) · 1.16 KB
/
Copy pathnotes.txt
File metadata and controls
28 lines (12 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
The plan:
Each leg of the trip fare/nofare/fare, etc should be its own path in the SVG.
To do this, pass 10 coordinates to the google directions API (figure out how many total legs you have for the day, then generate queries, each with 10 coordinates. Remember coordinate 10 of the first query will be the same as coordinate 1 of the 2nd query)
- results will have 9 "legs". Each leg should correspond to a fare or nofare segment. Each leg will be comprised of steps - you will need to decode and assemble all the steps into one segment. Also assign IDs to the legs.
Tween the stroke-dasharray of the path as in http://bl.ocks.org/KoGor/8163022 but based on the relative time for that segment.
http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&key=API_KEY
To make table:
sqlite3 db
create table trips(medallion text,pickuptime text,dropofftime text,passengers integer,pickupx real,pickupy real,dropoffx real,dropoffy real,fare real,paymenttype text,surcharge real,mtatax real,tip real,tolls real,total real,nextpickuptime text,key integer,trippolyline text,nextpolyline text)
.mode csv
.separator ","
.import something.csv trips