map-runs
Code for creating an HTML map with all runs mapped with runkeeper (or similar). It uses:
Installation
In a Python environment (created with e.g. Conda) and from the repository’s root, run:
pip install .
NB: Tested for Python 3.8, 3.9 & 3.10.
Usage
Instructions for creating your own map
- Either clone locally or download this repo.
- Request your running data from the app you use for tracking runs. In the case of runkeeper, you can do this here (it takes about a week for them to send you your data the first time).
- Place all your
.gpx
files in./gps-data
. Make sure to remove any preexisting files. - Modify the origin of your map (parameters
starting-latitude
&starting-longitude
in./map_runs/map-runs.ini
) to correspond to your hometown. - Follow the installation instructions if you have not done so yet.
- Run locally
./map_runs/map_runs.py
. - Done! your map is now available at
./output-map.html
.
Instructions for keeping your map up to date
These steps are only necessary if you would like to update automatically your map as you get new data with continuous integration (CI). You will need a local Git client + a Github account.
- Fork this repo.
- Follow steps 2-3-4 from the previous instructions.
- Commit+push your changes to the repo.
- Your map will be available in the
gh-pages
branch, at./output-map.html
.
Additional customizations
You can customize your map to your liking by changing any of the parameters in the ./map_runs/map-runs.ini
file. Some considerations for this:
- You can find folium’s options for terrain customization here.
- You can store the
.gpx
files in any folder, as long as you update thedata-path
parameter to that location. - If you change the name of the output map (parameter
output-path
) and you have set up continuous integration, beware that the location of your map in thegh-pages
branch will change accordingly.
Credits
Thanks to Jörg R Schumacher (@eHanseJoerg) for this useful jupyter notebook for plotting routes using the geoJSON format.