Personal Location Data


Visualization

Background

Introduction

When enabled, Google Maps stores personal location data based on phone location history. By law, Google is required to make the data collected available for you at any time. For this lab, I chose to visualize my own location history during March to June of 2020.

I wanted to view my location data through the lens of COVID-19 to see how the pandemic and shutdown impacted my movement. I have had location history as well as real-time location sharing enabled for several years, so I expected the data to be extremely detailed.

Inspiration

My primary inspiration for this project is the Timeline feature within Google Maps. Timeline has 2 views: compound and daily. The compound view shows your historical movement – everywhere you have visited since Google began collecting your data; daily view shows detailed movement throughout a single day. I wanted to create something in between these views, a map that was more granular than a compound view but less detailed than my daily walk to the coffee shop and back.

My secondary inspiration was the New York Times’ The Richest Neighborhoods Emptied Out Most as Coronavirus Hit New York City published in May 2020. I remember reading this article holed up in my Brooklyn apartment and being shocked at the disparities across the city.

Process

Tools

Google Maps – Data source; Google allows you to download your location history, Maps, and My Maps (maps that you have downloaded for offline use)

Open Refine – Data processing; Google location history is exported by the month in JSON files which are incompatible with QGIS, so I used Open Refine to select the relevant data and convert it to CSV files

Sublime Text – Secondary data processing; Used to make edits to the CSV files generated in Open Refine

QGIS – Visualization; I used QGIS to create my location history map

QGIS Cloud – Publishing; QGIS Cloud allows you to host your QGIS project online for free

Methods

After downloading my location history from Google and learning the data was exported in JSON files, I used Open Refine to select just the relevant data. Google Maps collects tracking data and can estimate when you are walking, running, or riding public transportation, but I chose to select only place data. While looking at the data in Open Refine I noticed the format of the latitude and longitude were not supported by QGIS, so I transformed these columns to the correct format by converting them from integers to doubles.

Once I converted the JSON files to CSV, I was able to import them as Delimited Text Layers in QGIS and visualize the coordinates. I also connected Google Maps to QGIS directly. I separated each month as an individual layer and created a heat map layer for each month as well.

Product

Visualization

I published my map to QGIS Cloud here.

Interpretation

The most interesting finding I gleaned from this map was how parallel my movement mirrored the COVID-19 case count in NYC. At a glance by month:

March – The most movement during this month due to travel and commuting to the office prior to city shutdown

April – Peak of the first wave with NYC at the epicenter, very little movement at all, almost all walking distance from my apartment in Prospect Heights

May – More movement in Manhattan as case count declines, almost all Manhattan locations are walking distance from my partner’s apartment in Chelsea

June – More spread out movement in Brooklyn from attending BLM protests throughout the neighborhood

Reflection

I found publishing the map to QGIS Cloud to be the most difficult aspect of this project. While QGIS Cloud does provide step-by-step documentation on how to connect QGIS desktop and publish, some technical limitations remain below the surface. For example, I had 2 similarly named columns in my data table, but due to character limits on column names at conversion, these 2 columns were truncated and resulted in a duplicate column error. Additionally, after publishing to QGIS Cloud, I learned of a licensing issue with Google Maps that prevented it from being displayed. I switched my background layer to OpenStreetMap in order to publish, but I had hoped to use a Google Map to accurately show the locations visited.