Shared colour palettes, ggplot2 theme, and scales for the Circadia Lab R ecosystem.
๐ What is circadia?
circadia is the visual identity layer for the Circadia Lab R ecosystem. It provides a consistent set of brand colours, a clean ggplot2 theme, and discrete and continuous scale functions that plug directly into plots produced by zeitR, slumbR, tallieR, syncR, and standalone analysis notebooks.
โจ Features
- ๐จ Five named palettes โ
main(6-colour qualitative),core(4-colour compact),diverging(blue โ antique white โ coral),blues(sequential),warm(sequential) - ๐ฌ Domain colour map โ
domain_colour_for()returns the brand colour for a named data domain ("actigraphy","sleep","circadian","questionnaire","demographics","clinical") - ๐ Discrete scales โ
scale_colour_circadia()andscale_fill_circadia()for categorical data - ๐ Continuous scales โ
scale_colour_circadia_c()andscale_fill_circadia_c()with colour interpolation - ๐ผ
theme_circadia()โ minimal ggplot2 theme with configurable gridlines, Circadia Lab typography, and brand accent colours
๐๏ธ Project Structure
circadia/
โโโ R/
โ โโโ circadia-package.R # package-level documentation
โ โโโ palettes.R # palette definitions and retrieval functions
โ โโโ scales.R # ggplot2 discrete and continuous scales
โ โโโ theme.R # theme_circadia()
โโโ tests/
โ โโโ testthat/
โ โโโ test-palettes.R
โ โโโ test-scales.R
โโโ vignettes/
โ โโโ getting-started.Rmd
โโโ _pkgdown.yml
โโโ DESCRIPTION
โโโ LICENSE
๐ Getting Started
Basic usage
library(circadia)
library(ggplot2)
# Retrieve a palette
circadia_palette("core")
#> deep_blue coral_red amber antique_white
#> "#014370" "#FC544A" "#FFA75D" "#FFECD4"
# Domain colour lookup
domain_colour_for("sleep")
#> sleep
#> "#1B6799"
# Apply theme and scales to a plot
ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) +
geom_point(size = 3) +
scale_colour_circadia() +
theme_circadia()
# Continuous fill scale with the diverging palette
ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
geom_tile() +
scale_fill_circadia_c("warm") +
theme_circadia(grid = "none")๐ฅ Authors
| Role | Name | Affiliation |
|---|---|---|
| Author, maintainer | Lucas Franรงa | Northumbria University |
| Author | Mario Leocadio-Miguel | Northumbria University |
๐ค Related Tools
- โ๏ธ zeitR โ wrist actigraphy analysis and circadian metrics
- ๐ slumbR โ sleep diary processing
- ๐งฎ tallieR โ sociodemographic and questionnaire data
- ๐ syncR โ unified participant-indexed database
- ๐ฌ circadia-bio โ the Circadia Lab GitHub organisation
๐ Licence
Released under the MIT License.
Copyright ยฉ Lucas Franรงa, Mario Leocadio-Miguel, 2025