25

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
    Aug 12, 2018 at 8:55

6 Answers 6

16

No, Google Maps doesn't let you do that. It frustrated me as well, so I've written a python script that does just that.

You can find it here: https://github.com/matthieuheitz/google-data-analyses/blob/master/get_visit_times.py

You give it the point of interest (latitude/longitude), a date range, and you get what you want!


A brief overview of what is involved, if you have not used Python before:

  1. Install Python 3 (should already be there for Mac and Linux. For Windows, see here)

  2. Install numpy (pip3 install numpy, or Windows guide)

  3. Edit get_visit_times.py with the basic Python editor with your:

    a. Location of your Google Location History JSON file

    b. Desired date range with dates in the format YYYY,M,D

    c. Point of Interest (Use the "right-click > What's here" feature on Google maps to get the GPS coordinates, and paste into the Python script)

    d. Timestamp grouping (output detail verbosity)

  4. Run the script (in a terminal: python3 get_visit_times.py)

An example of the output (with medium detail (level 2), and the timeframe set to one day) is:

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
2
  • is there any way this could be done on a Mac and if so is there a list of steps I could follow?
    – lozflan
    Jul 18, 2021 at 9:41
  • I think Python is pre-installed on Mac, so step 1 is taken care of. For step 2, you can open a terminal, and run pip3 install numpy Then you can follow step 3 and 4.
    – matthieu
    Jul 19, 2021 at 20:37
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

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

1
  • This one is pretty neat. Thanks
    – sehe
    Jan 28, 2021 at 21:55
0

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
    Nov 28, 2021 at 13:11
0

There is a new tool for extracting visits from Google Location History data. It doesn't just rely on Google's estimate of places visited, but uses its own spatio-temporal analysis. You can download the resulting list of visited locations in spreadsheets (CSV or Excel) or various vector formats.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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