Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ scripts/simulation/__pycache__/Agents.cpython-35.pyc
**/comb_network_nodes.csv
**/osm_ped_network_edges.csv
**/osm_ped_network_nodes.csv
**/fw_result.json
4 changes: 2 additions & 2 deletions js/arcs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
opacity: 0.3,
getSourcePosition: d => d.start_latlon,
getTargetPosition: d => d.end_latlon,
getSourceColor: d => colors[d.mode],
getTargetColor: d => colors[d.mode]
getSourceColor: d => colors[0],
getTargetColor: d => colors[0]
});

// map.addLayer(countiesLayer, 'waterway-label');
Expand Down
12 changes: 7 additions & 5 deletions js/trips/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@

animate() {

var loopLength = 4*60*60; // unit corresponds to the timestamp in source data
var animationSpeed = 240; // unit time per second
var loopLength = 16*60*60; // unit corresponds to the timestamp in source data
var animationSpeed = 60*15; // unit time per second

const timestamp = Date.now() / 1000;
const loopTime = loopLength / animationSpeed;

var time = 7*60*60+ Math.round(((timestamp % loopTime) / loopTime) * loopLength);
var time = 5*60*60+ Math.round(((timestamp % loopTime) / loopTime) * loopLength);
console.log(time/3600)
// console.log(time)
var trips_layer = new deck.TripsLayer({
// type: 'TripsLayer',
Expand Down Expand Up @@ -78,8 +79,9 @@
var app;
// const TRIP_DATA_URL ='https://cityio.media.mit.edu/api/table/grasbrook/trips'
// const ARC_DATA_URL = 'http://localhost:7777/abm_service/Hamburg/arcs/0';
const TRIP_DATA_URL ='https://cityio.media.mit.edu/api/table/corktown/trips'
const GRID_DATA_URL ='https://cityio.media.mit.edu/api/table/mocho/site_geojson'
// const TRIP_DATA_URL ='https://cityio.media.mit.edu/api/table/corktown/trips'
const TRIP_DATA_URL ='sample_trips.json'
// const GRID_DATA_URL ='https://cityio.media.mit.edu/api/table/mocho/site_geojson'
//

const colors = [[255, 0, 0], [0, 0, 255], [0, 255, 0], [255, 255, 0]];
Expand Down
Loading