A Byte of my 2.2-lb Brain

Just sharing stuff…

Hypothetical Taxi Movements in MMla

Sharing with you this personal project I’ve been working on with the help of my friend Ed. Recently, I’ve been learning JavaScript, D3, and Leaflet.

Here, I show the visualization of hypothetical taxi trips I created (from data generation to viz). The visualization was mostly coded by Ed, which I revised a bit (mostly for the style). All the points (origin and destination) are, of course, arbitrary. The trips were all randomly generated, in both space (from NAIA Terminal 2 to some hotel/hostel/apartment in Metro Manila) and time.

On the synthetic data generation, below I share the steps I took. I wrote all necessary scripts in Python.

  1. Write code that parses through OpenStreetMap and identifies all hotels/hostels/motels/apartments in Metro Manila.
  2. Write code that queries MapQuest (via its public API) for directions from NAIA terminal 2 to all identified buildings/amenities (from item 1).
  3. Write code that creates a geojson file that contains (randomly generated) origin-destination pairs, routes (LineString), pick-up times, and drop-off times. The geojson file is then fed to the viz platform.


The visualization is inspired by ImageWork’s NYC holiday taxi viz, which was inspired by Chris Wong’s NYC Taxis: A Day in the Life. Both have provided their code (at least part of them) for those who are interested in implementing the same viz. Ed and I studied their implementations.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


This entry was posted on August 14, 2016 by in Blog, Geek, Philippines, Uncategorized and tagged , , , , , , , , .
%d bloggers like this: