Sam's vanlife explorer (2022 only)

I built this little project to learn some more about Python, data analysis and data presentation. I was lucky enough that Sam From The Past did the work and gathered quite a lot of data without knowing what to do with it.

During most of the trip, I logged my location, my mood, and a picture. I used this data to visualize mostly where I had been, but also how I felt that day and to top it off, a picture that would showcase the highlight of each day, which I posted to Instagram. It was really fun to go back and see how much I did in that year, using data visualisation tools, and some integration with google APIs and instagram.


From a tecnichal perspective, this is how it was built:

For the map data, I used Google's Maps Timeline data which is available to download as a series of JSON files. If the option is activated in your google account, it logs all your movements with coordinates and timestamps, and a bunch of metadata that supports it, like the transport mode, reliability of the coordinates, source of data, etc. Once the data was downloaded, I uploaded all relevant data to a SQL database so it could be read from different sources without having to go through all JSON files and clean-up operations.

For the mood data, I had been logging each day's mood, from a scale of 1 to 7, in a Google Sheets document with a cell for each day of the year. To access this data, I connected to the relevant Google API. Once connected, I fetched the data, cleaned it up and uploaded it to different tables in the previously mentioned SQL database.

For the picture data (which I only started by mid-April), I tried connecting directly to Instagram developer APIs to fetch the picture, but there was too much overhead for such a simple task, so I decided to go the simple way and request a download of my personal data, which includes a copy of the uploaded pictures. Then it was only a matter of writing code that knew what picture to fetch for each day and uploading the local path reference into SQL.

With all this data available to be consumed, either locally or in the SQL database, I used Python and one of it's data visualisation libraries (Bokeh) to build a map that displayed the segments of each day, enriched via a simple JOIN statement with the mood and picture data.


Thanks for checking it out! :)

Use the tools on the upper right corner to zoom in and out of the map!

Some notes:

To Do: