Where was I?

I love travelling, follow my trail!

Zoom in the map to see the data points in more detail, and click each location to display relevant information.

About the project

Why?

Because I like to travel, I wanted to be able to keep track of my whereabouts.
This was also an additional opportunity for me to practice JavaScript and map visualization in general.

I started collecting my location data in April 2016 while in Istanbul, Turkey, during my Erasmus Exchange Program. With time, you'll be able to follow my travels around the world :)

How?

I will briefly describe the methodology used to produce the result shown above.
If you're interested, please feel free to reach me and I will provide more details.

  1. Collecting my location data:
  2. My location data comes from OpenPaths. This app uploads location data from your mobile device to their website. You can then access it at will, through a dedicated API or simply by exporting it as a CSV or JSON file.

    I was particularly convinced by this service as it really gives you the control of your data: you own your data, it is secure and protected and no one else can access it unless you explicitly grant them permission.

    As they rightfully put it: "The data you store with OpenPaths is your data. Thousands of commercial services and platforms make use of your location, but some also mine or sell that data for other purposes. Additionally, they typically do not share the raw data with a very important individual — you. With OpenPaths, your data are encrypted, so no one can access it."

  3. Preparing and cleaning the data:
  4. The raw data previously collected would be uninterpretable if presented "as is". So I had to do some simple data cleaning and preparation for it to be more valuable.

    To begin with, I enriched my dataset with 'city' and 'country' information for each stored location. Indeed, it initially only contained timestamps, latitude and longitude coordinates.
    I did this using the Google Maps API that allows you to request address data from a coordinate pair. I wrote a Python script to automate the process.

    Next, I chose to simplify my dataset by reducing the number of location data points, concerned that too many points would affect readability. Displaying a large number of points would also trouble the map rendering, which is done on-the-fly and client-side in JavaScript.
    I applied the Ramer–Douglas–Peucker (RDP) algorithm, which allows keeping only spatially-representative points. The results were highly satisfying as I was able to reduce the size of my data set by about 90%! Again, this was done using a Python script.

  5. Displaying the data:
  6. For the map visualization of my location data, I chose to use Leaflet, a powerful open-source JavaScript library for interactive maps.



I must conclude with a big THANK YOU to Geoff Boeing, a PhD candidate in urban planning at UC Berkeley, whose tutorials were very helpful and from which my project is largely inspired. I invite you to check his richly documented blog: http://geoffboeing.com/