30

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.

1
  • 2
    did you ever get this figured out?
    – ashleedawg
    Commented Aug 12, 2018 at 8:55

6 Answers 6

22

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:

  1. Install Python 3. It should be pre-installed be installed for Mac and Linux.
    See here for Windows

  2. Install NumPy. For Linux use

    pip3 install numpy
    

    For Windows, see this SO answer: "Installing Numpy on Windows")

  3. Download your Location History with Google Takeout in JSON format and extract the file from the archive to a directory.
    Google Takeout Location History

  4. In the basic Python editor or similar, edit get_visit_times.py with the following:

    1. The location of your Google Location History JSON file

    2. Your desired date range in YYYY,M,D format.

    3. Point of Interest. Use right-click > What's here in Google Maps to get the GPS coordinates, then paste them into the Python script.

    4. Specify timestamp grouping (output detail verbosity)

  5. Run the script in a terminal:

    python3 get_visit_times.py
    
  6. 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
    
0
7

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.

5
  • 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.
    – blearyeye
    Commented Feb 8, 2017 at 19:46
  • The problem is probably file size. It's 291MB.
    – blearyeye
    Commented Feb 8, 2017 at 20:14
  • Worked for me with a 387 MB json file Commented Oct 17, 2018 at 19:50
  • It's a good website, but I feel that a lot of it is not working properly (time filters for example)
    – matthieu
    Commented Apr 12, 2019 at 0:36
  • also, the name of that site is more than a little ironic
    – sehe
    Commented Jan 28, 2021 at 21:28
4

You could use the Timeline exporter Google Chrome plugin. It enables you to view, filter and export your Google timeline data.

0
3

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

2

Maybe the Elcomsoft Cloud eXplorer can do it.

Its mentioned in this article Google Timeline: How Law Enforcement Can Use Google Data.

1
  • Interesting. But $2000 for the license? Wow.
    – blearyeye
    Commented Nov 28, 2021 at 13:11
0

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.