CenterOfLife renders Google Maps location history data in a visually appealing and meaningful way. This script processes your KML-encoded location history data, improves visibility of the individual traces, and plots this data into an SVG file. The result is a map of where you have been, densely and accurately showing the paths you traveled and the places that you have seen.
Applied processing includes:
I used this script to design myself a T-Shirt featuring my own location history within my neighborhood. The steps were pretty simple:
Post-processing: Select interesting area, fade out boundaries.
Pre-print editing: Invert colors, overlay with a little 'glow'.
Production: Upload to T-Shirt printer's website and configure. I used Spreadshirt to print mine.
Final result: Happy. The print turned out a little brighter and with fewer shades, but overall the result is really great.
Thanks to a clearance granted by my employer, I can provide this script as open source software. To render your own location history, just take the following steps:
center_of_life.py
with appropriate parameters.python center_of_life.py <in.kml> <out.svg> [<options>]
Options:
-x
, --width
: With of the bounding box of the resulting SVG image. Auto-determined by height if not set. Defaults to 5000 if height is also undefined.-y
, --height
: Height of the bounding box of the resulting SVG image. Auto-determined by width if not set.-f
, --from
: North-west corner of the focus area in degrees, in the form Lon:Lat. Defaults to -180:-90 (off the shores of Alaska).-t
, --to
: South-east corner of the focus area in degrees, in the form Lon:Lat. Defaults to 180:90 (to Australia, and far beyond).-d
, --denoise
: Denoising weight. Up to this many points will be skipped whenever this shortens the path.You typically want to set -f
, -t
, and -d
. While -f
and -t
steer the visible area in the plot, -d
is useful to denoise zoom-ins, for which paths would normally be all blurred into each other. As a general rule of thumb, I use -d 4
for villages, -d 3
for towns, -d 2
for regions, -d 1
for states/countries, and -d 0
for continents and larger.
These are the invocations I used to generate some of my plots:
python center_of_life.py history.kml europe.svg -f 6.65:45.75 -t 12:51.65 -d 0
python center_of_life.py history.kml switzerland.svg -f 5.5:45.5 -t 10.5:48 -d 1
python center_of_life.py history.kml switzerland_east.svg -f 8.2:47 -t 9.8:47.8 -d 2
python center_of_life.py history.kml zurich.svg -f 8.45:47.3 -t 8.65:47.45 -d 3