Deck.gl: How does the trip-routes in the examples load data ?

Created on 24 Jan 2017  路  7Comments  路  Source: visgl/deck.gl

Dig into this demo and also read the code for a long time, still can't figure out where the taxi route data is and how does this demo load data. Could anyone explain? Thanks!

question

Most helpful comment

@Pessimistress If the scripts have private APIs in them it would still be really helpful to see the process - if the routing portion is a private uber thing I can swap in something that uses the mapbox routing API.

All 7 comments

@Pessimistress @apercu who have worked most on the demo

All credit goes to @Pessimistress, but I think I can tell you the data comes from this file, is requested in this component and the data decoded in the loadData action. Correct me if I'm wrong ;)

@Apercu Is the script for creating that file anywhere in the repo?

Don't think so

@jjdblast the trips data is loaded from this txt and processed with this worker. The extra effort is mostly for optimizing loading speed (compression), and visual flare (create a seamless loop), but has nothing to do with the data format that the TripsLayer consumes. Eventually the data is an array of trips, each trip containing an array of turn points in the form of [longitude, latitude, timestamp].
It's easier to see if you inspect the vis store state on the demo page.

@contra The raw data went through a pipeline of several scripts that perform routing, aggregation, sampling, and then compress with the encoded polyline format. Some of them use private APIs and are tuned for this specific dataset, so I figure there's little reuse value.

@Pessimistress If the scripts have private APIs in them it would still be really helpful to see the process - if the routing portion is a private uber thing I can swap in something that uses the mapbox routing API.

Cool method and thanks for explanations !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mathieudelvaux picture mathieudelvaux  路  4Comments

TareqAlqutami picture TareqAlqutami  路  3Comments

jacklam718 picture jacklam718  路  4Comments

rjimenezda picture rjimenezda  路  3Comments

mayteio picture mayteio  路  3Comments