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