Francesco Castaldi Brand EmblemF. CASTALDI
Cycling

Strava Data Analysis: From Dashboard to Python

PUBLISHED: 2026-08-07|READ TIME: 5 MINS|AUTHOR: FRANCESCO CASTALDI
Strava Data Analysis Python
FIGURE: Strava Data Analysis Python

Freeing Your Data

Strava offers a great dashboard, but if you want to do a deep and non-standard analysis (e.g., correlating your PRs on climbs with hours of sleep or outside temperature), you need to export your data and analyze it with Python.

Exporting the Archive

Go to *Settings -> My Account -> Get Started (Download or delete your account)* and request the full data package. After a few hours, you will receive a ZIP containing the activities.csv file.

[ NOTE ]
The activities.csv file contains hundreds of columns, including max speed, cumulative elevation gain, Suffer Score, and basic weather data.

Data Cleaning with Pandas

Importing into Pandas requires converting distances and times, which Strava often saves in meters and seconds:

import pandas as pd
import matplotlib.pyplot as plt

# Load dataset df = pd.read_csv('activities.csv')

# Filter only road bike rides rides = df[df['Activity Type'] == 'Ride'].copy()

# Conversions (Meters -> Km) rides['Distance_km'] = rides['Distance'] / 1000 rides['Elevation_Gain_m'] = rides['Elevation Gain']

# Calculate approximate VAM (Average Ascent Speed) rides['VAM'] = rides['Elevation_Gain_m'] / (rides['Moving Time'] / 3600) `

With these few scripts, you can create custom Heatmaps or statistically understand in which month of the year you reach your peak form (e.g., calculating the average monthly VAM).

[ ← BACK TO ALL ARTICLES ][ BACK TO HOME → ]
FC Emblem[ F.C. ]
GitHub|LinkedIn|Email
© 2026