Google Map's Timeline records where I (or at least my phone) has been throughout the day every day. Given a particular location, I'd like to see a list of times when I've been there. To get tax credit for days not spent working in a municipality I need to prove that I was out of the city on each day.
6 Answers
No, Google Maps doesn't let you do that. It frustrated me as well, so I wrote a Python script to do just that.
GitHub Script Link: get_visit_times.py
The script accepts coordinates (latitude/longitude) for a point of interest as well as a date range, and you get what you want!
Overview
Script uses Python and Google Takeout:
Install Python 3. It should be pre-installed be installed for Mac and Linux.
See here for WindowsInstall NumPy. For Linux use
pip3 install numpy
For Windows, see this SO answer: "Installing Numpy on Windows")
Download your Location History with Google Takeout in JSON format and extract the file from the archive to a directory.
In the basic Python editor or similar, edit get_visit_times.py with the following:
The location of your Google Location History JSON file
Your desired date range in
YYYY,M,D
format.Point of Interest. Use right-click > What's here in Google Maps to get the GPS coordinates, then paste them into the Python script.
Specify timestamp grouping (output detail verbosity)
Run the script in a terminal:
python3 get_visit_times.py
Example otput at Medium detail (level 2), with timeframe set to one day:
Loading 'C:\<your folder path>\Location History.json' ... JSON file loaded Extracting relevant data... Total of points: 310779 Number of close points: 72 Point 124834 -- Date: 2018-11-24 00:24:03 -- Distance to POI: 1532m Group of 60 points Point 129468 -- Date: 2018-12-01 02:58:17 -- Distance to POI: 1401m Group of 12 points
You can upload your Google location history (just follow the instructions) to this website: http://theyhaveyour.info/ then you can zoom in to find the location you are interested in and if you click on it you can see the list of the "timepoints" for that location.
-
I tried this. When I opened the LocationHistory.json file on the site it said "Not quite! LocationHistory.json does not look right. Extract LocationHistory.json from your zip file and drop it here." I downloaded the location history twice and opened both on theyhaveyour.info, trying both the .zip and .json files.– blearyeyeCommented Feb 8, 2017 at 19:46
-
The problem is probably file size. It's 291MB.– blearyeyeCommented Feb 8, 2017 at 20:14
-
-
It's a good website, but I feel that a lot of it is not working properly (time filters for example)– matthieuCommented Apr 12, 2019 at 0:36
-
You could use the Timeline exporter Google Chrome plugin. It enables you to view, filter and export your Google timeline data.
https://social.technet.microsoft.com/Forums/en-US/ad13ae2c-d437-4d53-8622-923943938ca4/converting-json-to-csv?forum=winserverpowershell shows a way to do it in PowerShell.
$in = Get-Content -Raw -Path '<input file>.json'
$injson = convertfrom-json $in
$injson.Locations | export-csv locations.csv -notypeinformation
locations.csv has 4 columns: timestampMS, latitudeE7, longitudeE7, accuracy
Maybe the Elcomsoft Cloud eXplorer can do it.
Its mentioned in this article Google Timeline: How Law Enforcement Can Use Google Data.
You can also try this extension Google Takeout Mileage and Timeline Exporter. You'll first have to go to Google Takeout and download your location data. Upload the zip file to the extension. The extension parses the files and lets you export as csv files.