- Gather running data from the NRC app.
- Generate map style on mapbox
- Basic visualization pipeline
- Test visualization process of plotly with mapbox
- Decide how to handle data (preprocess and save to one big dataframe)
- Setup scripts for static visualization
- format mapbox to have a better view
- Generate static image for the whole training trace
- animation
- Test animation process of plotly. It turned out unsuitable in this use case as there are too many frames.
- Generating each frame of the animation by plotly and save them as .png.
- Create .gif from .png images of animation frames.
- Packaging
- Clean up code
- utility functions
- configuration file
- Document write up
- Clean up code
- Option to color Each trajectory is by estimated speed
- Initialize the project and the development plan.
- Figure out how to export data from NRC. Strava provides an easy way for data exportation, and NRC provides synchronization to Strava starting from September 2023. All new running records can be synced to Strava once the setting is done in the NRC app. However, all history records cannot be synced currently, and NRC can not export the data in its app and requires third-party software. At the moment, SyncMyTracks on Android does the work.
- Decide the following:
- implementation framework: Python.
- Graphing Libraries: plotly. It can interface with mapbox directly (with a token) and has built-in animation functionality.
- TCX data process: pyworkout-toolkit can parse .TCX files to Pandas DataFrame.
- Update Development Plan
- Start implementing the pipeline in the script
StaticVisualization.ipynb
- Realize pyworkout-toolkit does not parse each data point. Switch to python-tcxparser for reading the .tcx files.
- Progress: read one .tcx file and plot the trace on Mapbox map.
- Read all files in the Data folder and store them into big numpy arrays
- Plot traces on Mapbox and color each trace by the index of data
- The color is handled by a
dict
structure for discrete colormap aspx.line_mapbox
does not support continuous colormap.
- Formatting Mapbox plot for better visualization, include {height, width, zoom}
- Try out different coloring styles. Settle on 'dark' map with reversed 'sunset' colormap
- Put numpy data in to Pandas dataframe
- Found that plotly is not suitable for directly animating such large amount of frames. Switch to separated approach: save each frame as .png and make .gif afterward.
- To output plotly as image file, need
kaleido
package. However, it somehow needs to be downgraded. - Turns out, plotly output image with
orca
is more efficient in this case. - Implemented pngs to gif via
PIM
and get the animation.gif
- Start cleaning up by creating utilities.py to streamline the process.
- Move the settings in scripts to
config.yaml
file. - Clean up readme file and write up documents.
- Found another python-based (tcxreader)[https://github.com/alenrajsp/tcxreader]