google-maps-timeline-viewer
google-maps-timeline-viewer copied to clipboard
View your Google Maps Timeline (Location History) data
Google Maps Timeline Viewer
Google announced in 2024 that they would begin storing your Timeline data (ie your Location History) locally on your device, rather than in the cloud on their systems. The desktop version of their timeline viewer was also discontinued, since the data is now on your phone.
If you're like me, you have years worth of timeline data that you want to be able to view. This project does that. It supports the old data format from Google Takeout, as well as the new on-device data format (which you can export from your device to your computer).


Features:
- Supports both Google Takeout data and new (as of late 2024) On-Device data file
- Timeline and map view
- Place info and icons
- Duration of visits ; distance traveled
- Travel modes color-coded
- Direction of travel arrows when clicking a path
- View multiple days at once
- Toggle layers on and off, eg to view only places without the travel paths
- Summary of activities by year/month
Setup procedure:
Get Your Data: Option 1, Google Takeout (for data prior to the change to on-device)
-
Go to Google Takeout:
- Visit Google Takeout.
-
Select Data to Include:
- Click "Deselect all".
- Scroll down and select Location History. (The default format is JSON, which is what we want.)
- Click "Next step".
-
Customize Export Format:
- Choose the delivery method, etc. Doesn't matter what you choose here.
- Click "Create export".
-
Download the Export:
- Once the export is ready, download the file.
- Extract the archive to anywhere you like, eg My Documents.
Get Your Data: Option 2, On-Device data export
- Open the Maps app, go to your Timeline, and click ~~the export icon~~ the three dots in the top right, then "Location & privacy settings". Click where it says "Location is on", then click "Location services". Click "Timeline", then "Export Timeline data". Save the file as "Timeline.json". (On non-English devices, the default file name may be different -- be sure to save the file as "Timeline.json")
- Transfer the JSON file to your computer, and save it anywhere you like, eg My Documents.
Obtain a Google Maps API Key
-
Go to the Google Cloud Console:
- Visit Google Cloud Console.
-
Create a New Project:
- Click on the project drop-down and select "New Project".
- Enter a name for your project and click "Create".
-
Enable APIs:
- In the Cloud Console, go to APIs & Services.
- Search for the following APIs and enable them:
- Maps JavaScript API
- Maps Embed API
- Places API
-
Create API Key:
- Go to APIs & Services > Credentials.
- Click "Create Credentials" and select "API Key".
- Copy the generated API key.
-
Restrict API Key (Optional):
- In the API key's settings, under API restrictions, select "Restrict key" and choose the APIs you enabled.
Final Set Up
-
Download The Google Maps Timeline Viewer:
- Save this project's
timeline.htmlfile anywhere you like, eg My Documents. (Click the timeline.html file, then click on "Raw" in the top-right of the content area. Copy/paste to eg Notepad and save as eg "timeline.html")
- Save this project's
-
Add your API key:
- Open the timeline.html file in a text editor and find the code below, near the top:
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script> - Replace
YOUR_API_KEYwith the key you obtained from the Google Cloud Console, and save.
- Open the timeline.html file in a text editor and find the code below, near the top:
View Your Timeline
- Open the timeline.html File:
- Double-click the file to open it. Supported browsers include Chrome and Microsoft Edge. Firefox will unfortunately not work.
- At the top left of the page, click Choose Folder and navigate to the folder that contains your Timeline data.
- For Google Takeout data: The folder structure should be "Takeout\Location History (Timeline)\Semantic Location History". Once you are within the "Semantic Location History" folder, and see subfolders for each year, click "Select Folder" on the dialog. (Do not navigate into one of the year folders.)
- For On-Device exported data: Simply choose the folder that contains your exported Timeline.json file.
- Use the date picker to choose a date that contains timeline data.