1
0
Fork
You've already forked TidyTuesday
0
  • R 65.5%
  • SCSS 12.8%
  • JavaScript 11.4%
  • Shell 6.8%
  • Lua 3.4%
  • Other 0.1%
gnoblet 2856024e10
All checks were successful
Build and Deploy Quarto Website / build-and-deploy (push) Successful in 1m33s
style: unify card hover with pill hover — accent scrim, text, and 2px border
2026年07月06日 14:10:09 +02:00
.forgejo/workflows ci: simplify workflow — render only, drop R/Python setup (all posts frozen) 2026年06月29日 13:23:49 +02:00
_extensions/quarto-ext/fontawesome
_freeze
fonts
posts chore: update post images 2026年06月26日 09:08:52 +02:00
renv
scripts chore: add pre-commit hook and fish shell setup to setup-dev.sh 2026年06月29日 13:23:58 +02:00
.gitignore
.Rprofile
_quarto.yml fix: escape @ in site title so pandoc doesn't parse it as a citation 2026年07月06日 13:07:01 +02:00
distrobox.ini
index.qmd feat: redesign site — dark editorial theme, masonry gallery, hover overlays 2026年07月06日 13:04:53 +02:00
main.py
new-viz-from-template.R feat: rewrite new-viz-from-template and template.qmd to work out of the box 2026年06月29日 13:58:46 +02:00
pyproject.toml
README.md docs: update README — render workflow, pre-commit hook, simplified CI 2026年06月29日 13:24:05 +02:00
rproject.toml chore: add AddFonts dep, fix project name, update rv.lock 2026年06月29日 13:58:51 +02:00
rv.lock chore: add AddFonts dep, fix project name, update rv.lock 2026年06月29日 13:58:51 +02:00
setup-dev.sh chore: add woff2 dep, rv --version and rv init to setup-dev.sh 2026年06月29日 13:58:57 +02:00
styles.scss style: unify card hover with pill hover — accent scrim, text, and 2px border 2026年07月06日 14:10:09 +02:00
template.qmd feat: rewrite new-viz-from-template and template.qmd to work out of the box 2026年06月29日 13:58:46 +02:00
uv.lock

TidyTuesday

A collection of visualizations for Tidy Tuesdays, built as a Quarto website with R and Python support.

Website

Visit the live website: here

Local Development (Fedora 42 distrobox)

The recommended local setup uses a distrobox container based on Fedora 42.

One-time container setup

# Create the container
distrobox-assemble distrobox.ini
# Enter it and run the setup script
# (installs rig, R, rv, uv, Quarto, fish, pre-commit hook + syncs packages)
distrobox enter tidytuesday -- bash setup-dev.sh

Daily workflow

# Enter the container (opens fish shell)
distrobox enter tidytuesday
# Preview the site
quarto preview

What gets installed in the container

Tool Purpose
rig Installs R 4.5.2
rv R package management (rproject.toml)
uv Python package management (pyproject.toml)
Quarto Site rendering
fish Default shell in the container

Adding or updating a post

All posts use freeze: true — their rendered outputs are cached in _freeze/ and committed to the repo. When you create or update a post:

# 1. Render locally to update the freeze cache
quarto render
# 2. Stage both the post and its freeze entry
git add posts/YEAR/week_N/ _freeze/posts/YEAR/week_N/
# 3. Commit
git commit

A pre-commit hook (installed by setup-dev.sh) enforces this: it will abort the commit if a staged .qmd file is missing its updated _freeze/ entry.

Creating new visualizations

Use the included script to generate a new post from the template:

# Minimal (uses defaults):
Rscript new-viz-from-template.R 2025年01月07日 "Coffee Analysis"
# With metadata flags:
Rscript new-viz-from-template.R \
 -c "ggplot2, tidyverse" \
 -u "R, ggplot2, tidyverse" \
 -k "ggplot2, dplyr, tidyr" \
 -f week01.png \
 2025年01月07日 "Coffee Analysis"
# Help:
Rscript new-viz-from-template.R -h

Arguments:

  • date: Date in YYYY-MM-DD format
  • title: Title for the analysis (quote if it contains spaces)
  • -c: Comma-separated categories (default: "TidyTuesday")
  • -u: Comma-separated tools used
  • -k: Comma-separated key libraries (default: "ggplot2, dplyr")
  • -f: Image filename (default: weekNN.png)

Project Structure

├── .forgejo/workflows/ # Forgejo/Codeberg Actions for deployment
├── _freeze/ # Frozen execution outputs (committed)
├── posts/ # Project posts (Quarto)
├── scripts/ # Dev scripts (pre-commit hook)
├── _site/ # Generated website (ignored)
├── rv/ # rv project library (ignored)
├── .venv/ # Python virtual environment (ignored)
├── rproject.toml # R project and package config
├── pyproject.toml # Python project and package config
├── distrobox.ini # Local dev container definition
└── _quarto.yml # Quarto configuration

Deployment

The site is automatically deployed to Codeberg Pages on push to main. Because all posts are frozen, CI only needs Quarto — no R or Python setup required:

  1. Checkout
  2. Install Quarto
  3. quarto render (uses _freeze/ cache)
  4. Deploy to Codeberg Pages

Package Management

  • R packages: Managed by rv (rproject.toml)
  • Python packages: Managed by uv (pyproject.toml)
  • Repository: Fast Linux binaries from p3m.dev

License

This project is open source and available under the MIT License.