Skip to content

surendranb/runinsight-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

V4 - A very light weight version

Please run main.py and not app.py

RunInsight AI πŸƒβ€β™‚οΈ Strava Data Analyzer

RunInsight AI analyzes your Strava running data alongside environmental conditions to help you understand what affects your performance. It combines running metrics, weather data, and AI-powered analysis to provide insights about your training.

✨ What it does now

πŸ“Š Performance Metrics

  • Distance and pace analysis
  • Heart rate monitoring and zones
  • Elevation gain tracking
  • Average and max speed calculations
  • Cadence analysis
  • Calories and effort score tracking

Dashboard

🌑️ Environmental Analysis

  • Temperature and humidity impact
  • Air quality (AQI and PM2.5) tracking
  • Location-based performance comparison
  • Weather condition correlation with performance

Dashboard

πŸ“ˆ Advanced Analytics

  • Grade-adjusted pace metrics
  • Pace variation analysis
  • Running consistency patterns
  • Split-by-split breakdowns
  • Performance trends over time

πŸ€– AI Analysis

  • Performance insights using Google's Gemini Pro model
  • Pattern recognition in your running data
  • Environmental impact analysis
  • Training load observations

Dashboard

What this isn't

  • Process any other activity except running (at this point)
  • Not a full blown coach (yet)

πŸš€ Getting Started

Prerequisites

- Python 3.8+
- Strava account with API access
- OpenWeatherMap API key
- Google Cloud Project with Gemini API key

Installation

  1. Clone and Install
git clone https://github.com/yourusername/runinsight-ai.git
cd runinsight-ai
pip install -r requirements.txt
  1. Set Up Environment Create a .env file:
STRAVA_CLIENT_ID=your_client_id
STRAVA_CLIENT_SECRET=your_client_secret
STRAVA_REFRESH_TOKEN=your_refresh_token
OPENWEATHERMAP_API_KEY=your_api_key
GEMINI_API_KEY=your_gemini_api_key
  1. Run the Application
streamlit run app.py
  1. Sync the data

    1. Soon as you as you hit the sync button go back to the terminal.
    2. Copy the Strava auth URL and paste it in a browser. Log in.
    3. You'll see a 404 page (which is by design). Copy the code from the URL
    4. Paste it back in the terminal to start the sync.

πŸ’» How It Works

  1. Data Collection

    • Syncs with your Strava account to fetch running activities
    • Retrieves weather data from OpenWeatherMap
    • Stores data locally in SQLite database
  2. Analysis Features

    • Calculates performance metrics over various time periods
    • Analyzes environmental impact on your running
    • Generates visualizations of trends and patterns
    • Provides AI-powered insights about your training
  3. Available Views

    • Performance Metrics
    • Physiological Metrics
    • Elevation & Cadence Metrics
    • Environmental Metrics
    • Inferred Metrics
    • Deeper Insights
    • Activity Trends
    • AI Analysis

πŸ”§ Technical Notes

  • Built with Streamlit for the user interface
  • Uses SQLite for local data storage
  • Integrates with Strava and OpenWeatherMap APIs
  • Employs Google's Gemini Pro for AI analysis
  • All processing happens locally on your machine

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


RunInsight AI: Understanding your running through data

About

RunInsight AI πŸƒβ€β™‚οΈ Strava Data Analyzer

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages