Strava Analysis Tool Versions Save

A Python tool to analyze and display Strava activity data.

v1.5.0

2 years ago

Features

  • Adds an option to create a heatmap of moving time by activity type. This can be invoked using the command line argument -m or --moving_time_heatmap. (see issue #80).
  • Replaces usage of the HERE CLI with the xyz-spaces-python package, which makes the installation process much simpler and eliminates the need to install Node.js (see issue #82). Updated instructions can be found in the README file.
  • Stores activity data using the native pandas JSON I/O functions, which allows the data to be read and written to the file much faster than before. The data is also now stored directly in memory written to the file if an exception or timeout occurs, which reduces the number of I/O operations as well.

Bug Fixes

None

Known Issues

  • The activity counts and mean activity distance plots will only display time periods during which at least one activity was recorded, which can make the time axes nonlinear. For instance, if no activities were recorded in April 2018, the graphs will skip to the next month instead of correctly displaying 0 activities for April.
  • The commute plots function does not work if a predefined colour palette is specified under the plot_colour_palette variable in config.toml . As a temporary workaround, define a list of desired plot colours in hex format instead.

v1.4.0

3 years ago

Features

  • Adds a TOML configuration file config.toml for all user-configurable parameters (e.g. file paths and the plot colour palette).
  • Implements smarter Strava API retries using the provided REST response headers (thanks to @floriecai),
  • Updates the environment.yml (for Anaconda) and requirements.txt (for Python) dependency files with the latest compatible packages.
  • Adds an option to filter activities within a given date range using the command line arguments --date_range_start and date_range_end (see issue #78).

Bug Fixes

  • Fixes a parsing issue which caused activity names that appear like dates to be incorrectly converted into DateTime objects and eventually throw an exception (see issue #68).
  • Removes the use of the shell, which was causing some inconsistent cross-platform behaviour (see issue #76).
  • Adds proper exit behaviour after an unrecoverable error has been detected (see issue #77).

Known Issues

  • The activity counts and mean activity distance plots will only display time periods during which at least one activity was recorded, which can make the time axes nonlinear. For instance, if no activities were recorded in April 2018, the graphs will skip to the next month instead of correctly displaying 0 activities for April.

v1.3.0

3 years ago

Features

  • Defines a consistent colour palette between plots, which creates a more consistent visual theme.
  • Uses the --stream option when uploading a geo data file via the HERE CLI to significantly reduce upload times (3-4x faster).
  • Exports the activity start times in the geo data file as ISO 8601-compatible strings (these were previously just formatted text strings), which are now natively supported by the HERE CLI and allow activities to be filtered / grouped by date and time in HERE XYZ Studio. This requires version 1.4.0 or upwards of the HERE CLI.

Bug Fixes

  • Checks for an empty DataFrame when generating a set of commute plots (see issue #61).
  • Excludes stationary activity types from the mean activity distance plot (see issue #49).
  • Excludes virtual and indoor activities (which don't contain real geospatial information) from the geo data file (see issues #58 and #44).

Known Issues

  • The activity counts and mean activity distance plots will only display time periods during which at least one activity was recorded, which can make the time axes nonlinear. For instance, if no activities were recorded in April 2018, the graphs will skip to the next month instead of correctly displaying 0 activities for April.

v1.2.0

4 years ago

Features

  • Adds an option to generate a bar plot of activity counts over time. This can be invoked using the command line argument -a or --activity_count_plot.
  • Adds an option to generate a set of plots to visualise commute data. This can be invoked using the command line argument -c or --commute_plots. The following plots are generated:
    • A line plot of the number of commute days per year
    • A line plot of the total and average commuting distance per year
    • A bar plot of the number of commutes per month.
  • Adds an option to generate a bar plot of the mean activity distance over time. This can be invoked using the command line argument -d or --mean_distance_plot.
  • Updates the tool to use Python 3.8. For the Anaconda distribution of Python, the old spec-file.txt has been replaced with a cross-platform environment file environment.yml that can be directly imported into your Anaconda workspace.
  • Renames the main module to strava_analysis_tool.py (previously run.py).

Bug Fixes

  • Checks for an empty DataFrame when generating summary and commute statistics (see issue #22).
  • Checks for an empty polyline string when generating a geo data file (see issue #31).
  • Parses the formatted tables returned by release 1.1.0+ of the HERE CLI (see issue #35).

Known Issues

  • The activity counts and mean activity distance plots will only display time periods during which at least one activity was recorded, which can make the time axes nonlinear. For instance, if no activities were recorded in April 2018, the graphs will skip to the next month instead of correctly displaying 0 activities for April.

v1.1.0

4 years ago

The project is now open-sourced under the GPL v3 license, which can be found here.

Features

  • Adds an option to refresh the existing activity data by re-requesting it from Strava (see issue #14). This can be invoked using the command line argument -r or --refresh_data.
  • Adds an option to export the geospatial activity data as a file in GeoJSON format (the file was previously always generated). This can be invoked using the command line argument -g or --export-geo-data.
  • Adds an option to export and upload the geospatial activity to the HERE XYZ mapping platform, which can be used to produce an interactive map of the activities in a similar fashion to the paid 'personal heatmaps' feature on Strava. This can be invoked using the command line argument -gu or --export-upload-geo-data. Note that this feature requires installation of the HERE CLI as described in the README file.

Bug Fixes

None

Known Issues

None

v1.0.0

4 years ago

This is the initial release of the Strava Analysis Tool, containing the most minimal basic functionality.

Features

  • Obtains detailed data for all Strava activities and stores it locally as a file in JSON format.
  • Displays the following basic statistics, grouped by activity type:
    • Total and average distance
    • Total and average moving time
    • Total and average elevation gain
    • Average speed
  • Displays the following basic statistics for all activities tagged as commutes, grouped by activity type:
    • Number of commutes
    • Total and average commute distance
    • Total and average commute time
  • Exports the geospatial data from all activities as a file in GeoJSON format, which can be uploaded to an online mapping platform (e.g. HERE XYZ) to create an interactive activity map (similar to the paid 'personal heatmaps' feature on Strava).

Bug Fixes

None

Known Issues

None