Skip to content

Latest commit

 

History

History
63 lines (53 loc) · 3.88 KB

dev_log.md

File metadata and controls

63 lines (53 loc) · 3.88 KB

Plan

  • 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

Backlog and wishlist

  1. Option to color Each trajectory is by estimated speed

Log

2023/10/7

  1. Initialize the project and the development plan.
  2. 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.

2023/10/25

  1. Decide the following:
    1. implementation framework: Python.
    2. Graphing Libraries: plotly. It can interface with mapbox directly (with a token) and has built-in animation functionality.
    3. TCX data process: pyworkout-toolkit can parse .TCX files to Pandas DataFrame.
  2. Update Development Plan

2023/11/04

  1. Start implementing the pipeline in the script StaticVisualization.ipynb
  2. Realize pyworkout-toolkit does not parse each data point. Switch to python-tcxparser for reading the .tcx files.
  3. Progress: read one .tcx file and plot the trace on Mapbox map.

2023/11/11

  1. Read all files in the Data folder and store them into big numpy arrays
  2. Plot traces on Mapbox and color each trace by the index of data
  3. The color is handled by a dict structure for discrete colormap as px.line_mapbox does not support continuous colormap.

2023/11/21

  1. Formatting Mapbox plot for better visualization, include {height, width, zoom}
  2. Try out different coloring styles. Settle on 'dark' map with reversed 'sunset' colormap
  3. Put numpy data in to Pandas dataframe

2023/12/01 - 12/04

  1. 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.
  2. To output plotly as image file, need kaleido package. However, it somehow needs to be downgraded.
  3. Turns out, plotly output image with orca is more efficient in this case.
  4. Implemented pngs to gif via PIM and get the animation.gif

2023/12/10

  1. Start cleaning up by creating utilities.py to streamline the process.

2023/12/16

  1. Move the settings in scripts to config.yaml file.
  2. Clean up readme file and write up documents.
  3. Found another python-based (tcxreader)[https://github.com/alenrajsp/tcxreader]