Benj-samurai commited on
Commit
146b204
·
2 Parent(s): 7b8bf24 1e3f43a

Merge branch 'main' of https://huggingface.co/datasets/Benj-samurai/strava_dataset

Browse files
Files changed (1) hide show
  1. README.md +91 -0
README.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Strava Master & Weekly Summary Dataset
2
+
3
+ Personal Strava export processed on **2025-05-04**
4
+ Provides per-activity master table and weekly aggregations with intensity metrics.
5
+
6
+ ---
7
+
8
+ ## Files
9
+
10
+ | File | Rows | Description |
11
+ |------|------|-------------|
12
+ | `strava_master_enhanced.parquet` | ~N | 1 row = 1 activity, cleaned & enriched |
13
+ | `weekly_sport.parquet` | ~N | Weekly totals by sport (Run/Ride/Swim …) |
14
+ | `weekly_category.parquet` | ~N | Weekly totals by intensity zone |
15
+
16
+ *(rows will auto-update, no needに手入力可か削除でもOK)*
17
+
18
+ ---
19
+
20
+ ## Column definitions (master)
21
+
22
+ | Column | `dtype` | Description |
23
+ |--------|---------|-------------|
24
+ | `activity_id` | `int64` | Unique Strava activity ID |
25
+ | `name` | `string` | Activity title on Strava |
26
+ | `sport` | `category` | Sport type (Run / Ride / Swim / Walk / … ) |
27
+ | `date` | `datetime64[ns]` | Local start time |
28
+ | `distance_km` | `float32` | Distance (metres → **km**) |
29
+ | `elapsed_hr` | `float32` | Elapsed time (sec → **h**; incl. stops) |
30
+ | `moving_hr` | `float32` | Moving time (sec → **h**) |
31
+ | `elevation_gain_m` | `float32` | Positive elevation gain (m) |
32
+ | `elevation_loss_m` | `float32` | Negative elevation (descent, m) |
33
+ | `average_speed_kph` | `float32` | Moving speed (km h-¹) |
34
+ | `max_speed_kph` | `float32` | Max speed (km h-¹) |
35
+ | `average_hr` | `float32` | Avg heart-rate (bpm); *NaN* if no sensor |
36
+ | `max_hr` | `int16` | Max heart-rate (bpm) |
37
+ | `average_cadence` | `float32` | Avg cadence (rpm); bike-runs mixed |
38
+ | `max_cadence` | `int16` | Max cadence (rpm) |
39
+ | `intensity_level` | `float32` | Avg HR ÷ **LTHR (165 bpm)** → 0.50–1.10 |
40
+ | `training_category` | `category` | HR zone label: `Z1-2`, `Z3`, `Z4`, `Z5`, `NoHR` |
41
+ | `trimp` | `float32` | Banister TRIMP = `moving_hr × intensity_level × 50` |
42
+ | `pace_min_per_km` | `float32` | Pace (min km-¹); *NaN* for non-run sports |
43
+ | `commute` | `boolean` | Marked as commute on Strava |
44
+ | `gear` | `string` | Bike / Shoes used (if set) |
45
+ | `calories_kcal` | `float32` | Calories reported by Strava |
46
+ | `weather` | `string` | Weather summary (if available) |
47
+ | `temperature_c` | `float32` | Avg temperature (°C) |
48
+ | `relative_effort` | `Int32` | Strava Relative Effort score |
49
+ | `filename` | `string` | Original FIT/GPX filename (metadata only) |
50
+ | `gpx_path` | `string | None` | Path to GPX in `routes/` (not included if `None`) |
51
+
52
+ > **Note**
53
+ > * All numeric time/ distance columns are converted to SI units (hours & kilometres) for easy aggregation.
54
+ > * Empty sensor data (e.g. HR-less activities) are stored as **`NaN`** so they don’t skew means.
55
+ > * `training_category` bins: Z1-2 < 0.79, Z3 < 0.89, Z4 < 0.95, Z5 ≥ 0.95 of LTHR.
56
+ > * `gpx_path` points to a GeoJSON-converted route if the original GPX was processed; raw GPS files are **not** in the repo for privacy.
57
+
58
+
59
+ ---
60
+
61
+ ## Processing pipeline
62
+
63
+ 1. **Header translation** : JP CSV → EN headers (custom script)
64
+ 2. **Unit conversion** : distance m→km, time s→h
65
+ 3. **Intensity & TRIMP** : LTHR = 165 bpm, zones Z1-2/3/4/5
66
+ 4. **Weekly aggregation** via pandas `groupby`
67
+
68
+ Full code is available in `notebooks/` and `make_dataset.py` inside the GitHub repo.
69
+
70
+ ---
71
+
72
+ ## Usage example
73
+
74
+ ```python
75
+ from datasets import load_dataset
76
+ ds = load_dataset("Benj-samurai/strava_dataset",
77
+ data_files="strava_master_enhanced.parquet")
78
+ df = ds["train"].to_pandas()
79
+ print(df.head())
80
+ ```
81
+
82
+ ## License
83
+
84
+ Data © <Yuki Asai> 2025 — released under CC BY-NC 4.0.
85
+ Commercial use forbidden. Remove GPS data before public redistribution.
86
+
87
+ ## Privacy notes
88
+
89
+ - **Raw FIT/GPX files are _not_ included.**
90
+ - **No exact home coordinates**
91
+ All activity start points are shifted by ≥ 200 m to obscure the true home location.