百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

strava_calendar

> 编程语言
开源

使用 matplotlib 从 Strava 数据中生成可视化效果

99 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

使用 matplotlib 从 Strava 数据中生成可视化效果

Strava Calendar

A project to make beautiful visualizations from Strava data. Heavily inspired by the wonderful R library by Markus Volz.

Install

python
pip install git+git://github.com/colcarroll/strava_calendar.git

Use

First download your data from Strava (see below for how). The last step gives you a zip_path to the archive with all the data. This is quite slow the first time you run it for a zip file and year (~5mins), but quite fast after that (~5s).

python
from strava_calendar import plot_calendar

plot_calendar(zip_path=zip_path, year=2018)

You can control how many columns there are, the spacing between months and columns, and the label in the top left:

python
plot_calendar(zip_path=zip_path, year=2017, n_cols=6, month_gap=1.5, col_gap=1, label='')

You can also plot a single column of weeks, which is pleasant.

python
plot_calendar(zip_path=zip_path, year=2017, n_cols=1)

If you want to write more custom code, you can give that a shot, too:

python
import datetime

import matplotlib.pyplot as plt

from strava_calendar import Plotter, get_data

data = get_data(zip_path, 'running', datetime.datetime(2018, 1, 1), datetime.datetime(2019, 1, 1))

plotter = Plotter(data)

fig, ax = plt.subplots(figsize=(9, 6))

fig, ax, offset = plotter.plot_month(year=2018, month=6, fig=fig, ax=ax)
ax.text(0, offset + 4.2, 'Weeee!', fontdict={'fontsize': 32, 'fontweight': 'heavy'}, alpha=0.5)

See also!

Downloading your data is a bit of a pain. You migh as well try out this awesome project while you're visualizing your year!

Bulk export from Strava

The process for downloading data is also described on the Strava website:

  1. After logging into Strava, select "Settings" from the main drop-down menu at top right of the screen.
  2. Select "My Account" from the navigation menu to the left of the screen.
  3. Under the "Download or Delete Your Account" heading, click the "Get Started" button.
  4. Under the "Download Request", heading, click the "Request Your Archive" button. Be careful not to delete your account here!
  5. The archive takes a while to be sent. Download the zipped file to a location whose path you know.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言