A Python tool for tracking and visualising Renshuu learning progress.
I wanted to track my Japanese learning consistency and see my progress over time in a visual way. Since Renshuu provides an API, I built this tool to automatically collect my daily study data and create visualisations.
- Renshuu account with API access
- Python 3.9+
- uv package manager (
pip install uv
)
- Daily Activity Tracking: Fetch your daily study metrics from Renshuu API.
- Calendar Heatmaps: GitHub-style activity visualisation for different study categories.
- Current Progress Bars: Snapshot of your progress across all JLPT levels.
- Time Evolution of Progress: Multi-panel line charts showing progression over time.
Since my data log is quite small and plotting packages typically feed on Pandas DataFrames, I could have chosen Pandas all over, but I love the syntax of Polars... so I use Polars for data processing and convert to Pandas only for plotting compatibility.
After running the scripts, you will find plots like:
Note: This project uses uv as a lightweight package manager and script runner.
Install it viapip install uv
if not already available.
git clone https://github.com/flloaers/renshuu-activity-tracker.git
cd renshuu-activity-tracker
uv sync
This automatically creates a virtual environment (
.venv/
) and installs all dependencies.
Create a .env
file in the config/
folder containing the following variables:
REN_API_KEY=your_personal_api_key
API_BASE_URL=https://api.renshuu.org/v1
LOG_FILE_PATH=data/renshuu_logs.jsonl
PLOTS_DIR=plots
When logged in the Renshuu website, you can find your API key via the Resources menu.
uv run python scripts/fetch_data.py
This fetches your study logs and stores them in the
data/
folder.
uv run python scripts/generate_plots.py
This generates calendar heatmaps, current progress bars, and multi-panel progress charts in the
plots/
folder.
├── config/ # Settings, configurations, and .env file
├── src/ # Core modules
| ├── data_fetcher.py # API calls and logging
| ├── data_processor.py # Data processing with Polars
| └── visualizer.py # Plot generation
├── scripts/ # Main entry points
| ├── fetch_data.py # Data collection
| └── generate_plots.py # Visualisation generation
├── data/ # Study logs
├── plots/ # Generated visualisations
├── pyproject.toml # Project configuration and dependencies
├── uv.lock # Locked dependency versions (auto-generated)
├── requirements.txt # Alternative pip-compatible dependencies
└── README.md
- API Key Issues: Ensure your key is correctly set in the
.env
file. - Missing Directories:
data/
andplots/
are created automatically by the scripts if they do not exist. - Import Errors: Run
uv sync
inside the project folder to install all required dependencies.
Linux/macOS (crontab): Create a wrapper script for reliable cron execution.
Create scripts/run_daily.sh
:
#!/bin/bash
export PATH="$PATH:/home/username/.local/bin"
cd /full/path/to/your/renshuu-activity-tracker
uv run python scripts/fetch_data.py
Make executable and add to crontab:
chmod +x scripts/run_daily.sh
crontab -e
# Add: 0 20 * * * /full/path/to/your/renshuu-activity-tracker/scripts/run_daily.sh
Windows (Task Scheduler): Set up a daily task to run the fetch_data.py
script.
Issues and pull requests welcome! This is a learning project, so feedback is appreciated.
MIT License - feel free to use and modify!