A complete explanation of this code can be found on my website. This program takes a series of gpx files and outputs an html file containing an interactive heatmap from gps data.
Install Dependencies
$ python3 -m pip install -r requirements.txt
Configure environment
$ MY_GOOGLE_API_KEY="..."
$ cp config-example.ini config.ini
$ sed -i "s/####/$MY_GOOGLE_API_KEY/g" config.ini
$ cat config.ini
[GOOGLE]
API_KEY = <your API key should be here>
Show help:
$ python3 heatmap.py --help
Usage: heatmap.py [OPTIONS]
Options:
--output TEXT Specify the name of the output file.
Defaults to `map`
--input TEXT Specify an input folder. Defaults to `gpx`
--filter [running|cycling|walking]
Specify a filter type. Defaults to no filter
--help Show this message and exit.
Examples:
$ python3 heatmap.py
$ python3 heatmap.py --input gpx --output map
- Garmin users can use garminexport to export GPX data.
- Strava users can follow Strava's instructions to export GPX data
Note: GPSBabel tool may help you convert from file formats such as .tcx
to .gpx
files