RunInsight AI: Understanding Your Running Through Data header image

RunInsight AI: Understanding Your Running Through Data

Published on: January 3, 2025

RunInsight AI is a powerful tool designed to help runners gain a deeper understanding of their performance by analyzing their Strava data in conjunction with environmental factors. This application leverages running metrics, weather data, and AI-powered analysis to provide actionable insights that can optimize your training.

Key Features

  • Performance Metrics: Track key running statistics such as distance, pace, heart rate, elevation gain, and cadence.
  • Environmental Analysis: Understand how temperature, humidity, and air quality impact your performance.
  • Advanced Analytics: Utilize grade-adjusted pace metrics, pace variation analysis, and running consistency patterns to identify areas for improvement.
  • AI Analysis: Leverage Google’s Gemini Pro model for personalized performance insights, environmental impact analysis, and training load observations.

How It Works

RunInsight AI follows a streamlined process to collect, analyze, and visualize your running data:

  1. Data Collection: The application syncs with your Strava account to fetch running activities and retrieves weather data from OpenWeatherMap. All data is stored locally in an SQLite database.
  2. Analysis Features: RunInsight AI calculates performance metrics, analyzes the environmental impact on your running, generates visualizations of trends and patterns, and provides AI-powered insights about your training.
  3. Available Views: The application offers a variety of views to explore your data, including Performance Metrics, Physiological Metrics, Elevation & Cadence Metrics, Environmental Metrics, Inferred Metrics, Deeper Insights, Activity Trends, and AI Analysis.

Getting Started

To get started with RunInsight AI, follow these steps:

  1. Installation: Clone the repository and install the required dependencies:

    git clone https://github.com/surendranb/runinsight-ai.git
    cd runinsight-ai
    pip install -r requirements.txt
  2. Set Up Environment: Create a .env file with your Strava API credentials, OpenWeatherMap API key, and Google Cloud Project Gemini API key:

    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
  3. Run the Application: Run the application using Streamlit:

    streamlit run main.py
  4. Sync the data:

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

Contributing

Contributions to RunInsight AI are welcome! If you’re interested in contributing, please review the project’s code standards and documentation.

View Repository

View the RunInsight AI repository on GitHub