All Projects → ethanopp → Fitly

ethanopp / Fitly

Licence: mit
Self hosted web analytics for endurance athletes

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Fitly

Dashr
Dash for R - An R interface to the Dash ecosystem for creating analytic web applications
Stars: ✭ 337 (+418.46%)
Mutual labels:  plotly-dash, dash, data-visualization, plotly
Slapdash
Boilerplate for bootstrapping scalable multi-page Dash applications
Stars: ✭ 225 (+246.15%)
Mutual labels:  plotly-dash, dash, data-visualization, plotly
Dash Docs
📖 The Official Dash Userguide & Documentation
Stars: ✭ 338 (+420%)
Mutual labels:  plotly-dash, dash, data-visualization, plotly
Dash
Analytical Web Apps for Python, R, Julia, and Jupyter. No JavaScript Required.
Stars: ✭ 15,592 (+23887.69%)
Mutual labels:  plotly-dash, dash, data-visualization, plotly
Dash Table
A First-Class Interactive DataTable for Dash
Stars: ✭ 382 (+487.69%)
Mutual labels:  plotly-dash, dash, data-visualization, plotly
Dash.jl
Dash for Julia - A Julia interface to the Dash ecosystem for creating analytic web applications in Julia. No JavaScript required.
Stars: ✭ 248 (+281.54%)
Mutual labels:  plotly-dash, dash, data-visualization, plotly
Plotly.js
Open-source JavaScript charting library behind Plotly and Dash
Stars: ✭ 14,268 (+21850.77%)
Mutual labels:  plotly-dash, data-visualization, plotly
Crypto Whale Watching App
Python Dash app that tracks whale activity in cryptocurrency markets.
Stars: ✭ 389 (+498.46%)
Mutual labels:  plotly-dash, dash, plotly
Socialsentiment
Sentiment Analysis application created with Python and Dash, hosted at socialsentiment.net
Stars: ✭ 402 (+518.46%)
Mutual labels:  plotly-dash, plotly, dashboards
Dash Oil And Gas Demo
Dash Demo App - New York Oil and Gas
Stars: ✭ 156 (+140%)
Mutual labels:  dash, data-visualization, plotly
Hexapod Robot Simulator
A hexapod robot simulator built from first principles
Stars: ✭ 577 (+787.69%)
Mutual labels:  plotly-dash, dash, plotly
Dash Cytoscape
Interactive network visualization in Python and Dash, powered by Cytoscape.js
Stars: ✭ 309 (+375.38%)
Mutual labels:  plotly-dash, dash, plotly
dash-mantine-components
Plotly Dash components based on Mantine React Components
Stars: ✭ 263 (+304.62%)
Mutual labels:  plotly, dash, plotly-dash
Dash Sample Apps
Open-source demos hosted on Dash Gallery
Stars: ✭ 2,090 (+3115.38%)
Mutual labels:  plotly-dash, dash, plotly
2019-nCoV-dash
新型冠状病毒(2019-nCoV)肺炎(COVID-19)疫情展示
Stars: ✭ 13 (-80%)
Mutual labels:  plotly, dash, plotly-dash
Plotly express
Plotly Express - Simple syntax for complex charts. Now integrated into plotly.py!
Stars: ✭ 633 (+873.85%)
Mutual labels:  plotly-dash, data-visualization, plotly
Dash Stock Tickers Demo App
Dash Demo App - Stock Tickers
Stars: ✭ 108 (+66.15%)
Mutual labels:  dash, data-visualization, plotly
dash-admin
CLI tool for initiating dash boilerplate
Stars: ✭ 22 (-66.15%)
Mutual labels:  plotly, dash, plotly-dash
dash-redis-celery-periodic-updates
Demo apps now maintained in https://github.com/plotly/dash-enterprise-docs
Stars: ✭ 47 (-27.69%)
Mutual labels:  plotly, dash, plotly-dash
dash-flexbox-grid
Wrapper around react-flexbox-grid for Plotly Dash
Stars: ✭ 19 (-70.77%)
Mutual labels:  plotly, dash, plotly-dash

Fit.ly

Web analytics for endurance athletes Image description Image description Image description Image description Image description Image description Image description Image description Image description

Special thanks to Slapdash for helping organize! https://github.com/ned2/slapdash

Installation Methods

Docker (Recommended)

docker create --name=fitly \
    --restart unless-stopped \
    -e MODULE_NAME=src.fitly.app \
    -e VARIABLE_NAME=server \
    -e TZ=America/New_York \
    -e TIMEOUT=1200 \
    -e DASH_DEBUG=true \
    -p 8050:80 \
    -v <local mount path>:/app/config \
    ethanopp/fitly:latest

Python IDE

After cloning/downloading the repository, install Fit.ly into your environment:

$ pip install -e PATH_TO_fitly

Configuring Your App

Edit the config.ini.example file on your local mount path with your settings (more information below) and change the name of the file to config.ini.

Required Data Sources

Strava

Copy your client key and secret into your config.ini file.

In your strava settings (https://www.strava.com/settings/api) set the autorization callback to 127.0.0.1:8050?strava. All other fields you can update as you'd like.

Optional data sources

Some charts will not work unless these data sources are provided, or until new data sources are added that can pull similar data

Oura

The oura connections is currently required to generate the home page.

In addition to the home page, data points from oura will be use to make performance analytics more accurate. If oura data is not provided, performance analytics will rely on statically defined metrics in the athlete table (i.e. resting heartrate)

Create a developer account at https://cloud.ouraring.com/oauth/applications

Copy your client key and secret into your config.ini file.

Set the redirect URI to: http://127.0.0.1:8050/settings?oura

Withings

Sign up for a withings developer account here: https://account.withings.com/partner/dashboard_oauth2

In addition to the home page, data points from withings will be use to make performance analytics more accurate. If withings data is not provided, performance analytics will rely on statically defined metrics in the athlete table (i.e. weight)

Set the redirect URI to: http://127.0.0.1:8050/settings?withings

Copy your client key and secret into your config.ini file.

Stryd

Pull critical power (ftp) from Stryd. Since Stryd does not share their proprietary formula for calculating CP, we just pull the number rather than trying to recalculate it ourselves.

Enter username and password into config.ini file.

Peloton

Fitly does not pull workout data directly from peloton, strava is the main hub for our workout data (so sync peloton directly to strava).

For those working out to peloton classes, but not necessarily recording their data via the peloton device (using stryd pod on tread, using wahoo fitness trainer with peloton digital app, etc.), fitly will match workouts started around the same time to workouts published to strava, and update the titles of the strava workout with the peloton class name.

If using Oura, HRV recommendations can be used to auto-bookmark new classes on your peloton device daily. Class types to be bookmarked can be configured on the settings page (i.e. on days where HRV recommendation is "Low" effort, auto bookmark some new "Running" workouts of the class type "Fun Run", "Endurance Run", "Outdoor Fun Run", and "Outdoor Endurance Run")

Image description

Enter username and password into config.ini file.

Fitbod & Nextcloud

Fitbod allows exporting your data via the mobile app (Log > Settings icon > Export workout data)

Export your fitbod file to a nextcloud location, and provide that nextcloud location in your config.ini for fit.ly to incorporate into the dashboards.

Spotify

The spotify connections is currently required to generate the music page.

Fitly can keep a history of every song you listen to on spotify and analyze your listenind behavior (skipped, fast forwarded, rewound ,etc.) to determine song likeablity. Listening behavior can then be analyzed by activity type and intensity (i.e what music do you listen to during high intensity runs), clustered into music type (K-means cluster on spotify audio features) and playlists can be automatically generated with recommended music for your next recommended workout.

Create a developer account here: https://developer.spotify.com/dashboard/

Set the redirect URI to: http://127.0.0.1:8050/settings?spotify

Copy your client ID and secret into your config.ini file.

Dashboard startup

Navigate to http://127.0.0.1:8050/pages/settings

Enter the password from your config.ini [settings] password

Connect account buttons on top left of screen. Each successful authentication should save your tokens to the api_tokens table in your database.

Click the 'Refresh' button to pull data

Dashboard startup tips for python IDE users

Installing this package into your virtualenv will result into the development executable being installed into your path when the virtualenv is activated. This command invokes your Dash app's run_server method, which in turn uses the Flask development server to run your app. The command is invoked as follows:

$ run-fitly-dev

The script takes a couple of arguments optional parameters, which you can discover with the --help flag. You may need to set the port using the --port parameter. If you need to expose your app outside your local machine, you will want to set --host 0.0.0.0.

Hosting your application externally (docker compose with nginx)

version: '3'
services:
  letsencrypt:
    image: linuxserver/letsencrypt
    container_name: letsencrypt 
    cap_add:
      - NET_ADMIN
    restart: always
    ports:
      - "80:80"
      - "443:443"
    environment:
      - TZ=America/New_York
      - EMAIL=<your email>
      - URL=<website.com>
      - SUBDOMAINS=fit # this would give a website like fit.website.com
    volumes:
      - <host config dir>:/config
  fitly:
    image: ethanopp/fitly:latest
    container_name: fitly
    restart: always
    depends_on:
      - letsencrypt
    ports:
      - "8050:80"
    environment:
      - MODULE_NAME=src.fitly.app
      - VARIABLE_NAME=server
      - TZ=America/New_York
      - TIMEOUT=1200
      - DASH_DEBUG=true
    volumes:
      - <host config dir>:/app/config
      - <path to letsencrypt host config dir>/keys:/app/keys

NGINX (subdomain example)

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name fit.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /login;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_fitly fitly;
        proxy_pass http://$upstream_fitly:80;
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].