This project helps you generate heatmaps for visualizing your activities. See a Live Demo.
- Exercise Data: Strava activities fetched via the Strava API (requires configuration of account tokens).
- Focus Time: Focused time data exported as CSV from the Forest App.
- Retrieve data from the Strava API.
- Process and store it in the SQLite database.
- Export processed data to JSON format.
- Export the CSV file from the Forest App.
- Process the CSV and convert it into JSON format.
The JavaScript library Heat.js
loads the generated JSON data to create interactive heatmaps.
-
Install the required Python packages:
pip install -r requirements.txt
-
Set up the following configuration files: • config.ini: Configure your data file paths. • .env: Set up your Strava API tokens.
-
Export JSON data using the provided scripts.
The required Python packages for this project are listed in requirements.txt. Make sure to install them before running the project:
pandas requests sqlalchemy python-dotenv
- Configure your settings:
- Define data file paths in config.ini.
- Set up Strava tokens in the .env file.
- Generate JSON files:
- Run the Python scripts to fetch and process the data.
- Export the processed data into JSON format.
- Visualize:
- Use the React project in the heatmap folder to render the heatmaps with the generated JSON data.
- React Integration: The current implementation of Heat.js in React is basic. Further development is needed to make it more generalized and modular.
- Data Processing Pipeline: Improve the data processing flow for a more streamlined and automated pipeline.
- Additional Data Sources: Support more data categories, such as GitHub contributions and other fitness tracking apps.
This project is inspired by yihong0618/running_page, which helps a lot of runners creating their personal running pages.
- Heatmap visualization is powered by Heat.js - JavaScript Heat Map.