Libraries and some tools for creating engaging visualization from location history data.
Most easily extracted from Google Takeout.
The implemented visualizations help showing how your year went in relation to a anchor location, think home/work. This lets you easily identify days where you stayed home, worked or were on a trip!
In this example, we see a week long trip in the middle of the year and a 3 month trip towards the end of the year.
-
Visit https://takeout.google.com/ and request downloading location history data.
-
Wait for data to be ready.
-
Download data, then run script directly on the archive downloaded, for example
go run .\cmd/takeout_to_chart/main.go --input=.\takeout.zip --anchors=2014-01-01,10.0,10.0:2016-02-01,20.0,20.0
The parser is a non-trivial piece of code. Consider using it as library in your own project:
import "github.com/panmari/locationhistory/internal/reader"
// ...
r, err := reader.OpenFile(*input)
if err != nil {
log.Fatalf("Error when reading %s: %v", *input, err)
}
decoded, err := reader.DecodeJson(r)
if err != nil {
log.Fatalf("Error when decoding %s: %v", *input, err)
}
// do something interesting with `decoded`