Visualize your Google Location History with Leaflet and the Leaflet heatmap plugin. The node.js application will automatically convert your location data to a suitable format.
The Google location history file has a very peculiar format. To be used with Leaflet, it's necessary to convert the file to different format and calculate the starting point and zoom level for the map. The converted data is saved and can be viewed in a small web application using Open Street Maps as a base layer.
- Download and unzip this project. Alternatively: Clone this project in Git.
- Check if you have a location history. If you have no location history learn about enabling the service – If you don't mind Google getting a lot of private data from you.
- Get your location history from Google Takeout
- Copy your LocationHistory.json to the project folder. Not that the filename is localized. Here in Germany it's named Standortverlauf. Rename your location history file to LocationHistory.json, if it's not alread named that way.
- Install node.js on your machine.
- Go to your favorite shell and run the command
node convert.js
inside the project folder. - Open the index.html and enjoy.
- Add some kind of clustering alogorithm (k-Means?) to reduce the file size. Right now one year of location gatherings is about 9 MB.
- Add support for node arguments, so you can call
node convert.js myfile.json
- Add tests for the automatic LatLongBox calculation
Have fun and use the code for your own projects.
License: MIT