Metadata-Version: 2.4
Name: running-analyzer
Version: 0.1.0
Summary: A CLI tool to analyze running data
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: alembic>=1.14.1
Requires-Dist: annotated-types>=0.7.0
Requires-Dist: cfgv>=3.4.0
Requires-Dist: click>=8.1.8
Requires-Dist: distlib>=0.3.9
Requires-Dist: filelock>=3.17.0
Requires-Dist: fitparse>=1.2.0
Requires-Dist: identify>=2.6.7
Requires-Dist: markdown-it-py>=3.0.0
Requires-Dist: mdurl>=0.1.2
Requires-Dist: nodeenv>=1.9.1
Requires-Dist: numpy>=2.2.3
Requires-Dist: platformdirs>=4.3.6
Requires-Dist: plotext>=5.3.2
Requires-Dist: pre-commit>=4.1.0
Requires-Dist: psycopg2>=2.9.10
Requires-Dist: pydantic-core>=2.27.2
Requires-Dist: pydantic>=2.10.6
Requires-Dist: pygments>=2.19.1
Requires-Dist: python-decouple>=3.8
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: rich>=13.9.4
Requires-Dist: ruff>=0.9.6
Requires-Dist: shellingham>=1.5.4
Requires-Dist: sqlalchemy>=2.0.38
Requires-Dist: sqlmodel>=0.0.22
Requires-Dist: typer>=0.15.1
Requires-Dist: typing-extensions>=4.12.2
Requires-Dist: virtualenv>=20.29.2
Description-Content-Type: text/markdown

# 🏃 Running Data Analyzer

A command-line tool for analyzing running data. Manually add data or upload from a CSV or FIT file. Supports basic data insights like distance, pace, and trends over time.

## Features

- 📊 Load and analyze running data from CSV or FIT files.

- 📏 Calculate total distance, average pace, and other key metrics.

- 📈 Identify trends and generate insights from past runs.

- 🖥️ Command-line interface (CLI) for easy use.


## Installation
You can install the Running Data Analyzer from PyPI using `uv`:
```
uv pip install running-data-analyzer
```

---

## 🚀 Usage
Once installed, you can use the CLI command `python -m running_analyzer run` to start the program. Or use `python -m running_analyzer -help` to list avaialable commands.

Using `run` will have the app continually running in the terminal. Use `help` to list out all the commands. 

### Example Output
```
🏃‍♂️ Run Summary:
  Total Runs: 105
  Total Distance: 1601.12 km
  Total Duration: 13437.33 mins
  Average Distance: 15.25 km
  Average Duration: 127.97 mins
  Average Pace: 8.39 min per km

🏆 Best Run:
  2025-03-06: 100.00 km in 35.00 mins (Pace: 0.35)

📏 Longest Run:
  2025-03-06: 100.00 km

📉 Shortest Run:
  2025-02-22: 1.01 km

🐢 Slowest Run:
  2024-12-22: Pace of 11.96 min/km
```

### CSV Format & Getting FIT File from Strava
When importing a CSV file, you should have the following columns:
```
Date,Distance,Unit,Duration (min),Heart Rate,Elevation Gain,Pace,Run Type,Location,Notes
2025-02-15,10.5,km,55,150,200,5:14,Tempo,Park,Good run
2025-02-10,8.0,mi,44,145,180,7:10,Long,Trail,Felt strong
```

Strava Guide: [Exporting Strava Data](https://support.strava.com/hc/en-us/articles/216918437-Exporting-your-Data-and-Bulk-Export)

---

## 🛠️ Tech Stack
- Backend: [Typer](https://typer.tiangolo.com) (CLI framework), [SQLModel](https://sqlmodel.tiangolo.com) (ORM & DB modeling), [PostgreSQL](https://www.postgresql.org) (database), [Alembic](https://pypi.org/project/alembic/) (migrations)
- CLI & Utilities: [Rich](https://rich.readthedocs.io/en/stable/console.html) (console output), [Plotext](https://pypi.org/project/plotext/) (terminal plotting), [NumPy](https://www.google.com/search?client=safari&rls=en&q=numpy&ie=UTF-8&oe=UTF-8&safe=active) (data processing)
- Deployment: [PyPI](https://pypi.org) (package distribution)

## 🔥 Future Features

- 📅 Add support for GPX file imports
- 🏆 More visualizations
- 📝 API integration with Strava/Garmin


## 📄 License

This project is licensed under the MIT License.

## Acknowledgements

- [PyBites PDM Program](https://pybit.es/catalogue/the-pdm-program/)
- [Typer Documentation](https://typer.tiangolo.com)

---
Feel free to suggest any improvements or share your feedback by logging an issue against this repo!
