Skip to content

Visualize your Google Location History with Leaflet and the Leaflet heatmap plugin

License

Notifications You must be signed in to change notification settings

tgxn/location-history

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Location History visualized

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.

Demo of my location history

Google Location History visualized

What it does

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.

How to use

  1. Download and unzip this project. Alternatively: Clone this project in Git.
  2. 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.
  3. Get your location history from Google Takeout
  4. 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.
  5. Install node.js on your machine.
  6. Go to your favorite shell and run the command node convert.js inside the project folder.
  7. Open the index.html and enjoy.

ToDos

  • 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

About

Visualize your Google Location History with Leaflet and the Leaflet heatmap plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%