civilytics_logo()/make_logo_grob() brand ggplot/grobs, but flextables and
other outputs are rendered to PNG first and can't use them. stamp_logo_png()
is the raster analogue: it resolves the SAME brand asset that make_logo_grob()
uses (via the type/variant switch) and composites it into a corner of an
existing PNG in place, so file-based tables stay visually consistent with
logo-branded plots.
Dependency-free by design — uses only png + grid + grDevices (all already
imported), no magick. Configurable type/variant/position/width/margin;
preserves the image's pixel dimensions. Adds tests (21 assertions).
- Add test verifying .send_webhook() and .send_desktop_notify() use
system2() (not system()) to prevent command injection. This test
reads the function body and asserts system2 is present and
system("...") is absent, so the vulnerability cannot be
reintroduced by accident.
- Add test for beep(type='all') exercising both beep and notify paths.
- #5: Unwrap _brand.yml for Quarto 1.9+ compatibility (remove top-level
brand: wrapper so meta/logo/color/typography are at the top level)
- #1: Add quiet parameter to na_sum() to suppress warnings in loops/pipelines
- #3: Add beep() function for CLI beep, desktop notifications, and webhook
alerts (supports type=beep|notify|webhook|all)
Add theme_civilytics_map(), theme_civilytics_dark_map(), and
theme_civilytics_slide_map() for choropleths — suppress axes, ticks,
gridlines, and axis labels while preserving titles, captions, and legends.
Fix subtitle, caption, and axis text colors in theme_civilytics_dark()
which were inheriting dark ink_2/ink_3 values meant for light backgrounds,
making them hard to read on navy. Now uses navy_200/navy_300 instead.
Supports "bottom-right" (default), "bottom-left", "top-right", and
"top-left". The position controls both horizontal alignment of the logo
grob and whether it is placed above or below the plot.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the 16-color / 3-palette system with the full Civilytics design
system: 53 named colors (full navy, ember, violet ramps plus teal, plum,
moss, brass supporting hues) and 10 visualization palettes (qual,
qual_warm, qual_cool, seq_ember, seq_navy, seq_violet, seq_paper_ink,
div_navy_ember, div_violet_ember).
Enrich theme_civilytics() with grid and paper_bg parameters, add
theme_civilytics_slide() for presentations, and load all four brand fonts
(Inter, Libre Franklin, Source Serif 4, JetBrains Mono).
Add README.Rmd with rendered gallery showing all palettes, theme
variants, grid options, dark/slide modes, facets, and scale usage.
R's |> has higher precedence than +, so parentheses ARE required
around the ggplot chain before piping to civilytics_logo():
(ggplot(df, aes(x, y)) + geom_point() + theme_civilytics()) |>
civilytics_logo()
Updated docs, examples, and pipe test accordingly.
- Replace old civilytics_logo.png/white.png/jpg/pdf with new rebrand
assets: civilytics-wordmark.png, civilytics-wordmark-reverse.png,
civilytics-mark.png, civilytics-mark-reverse.png (all transparent bg)
- make_logo_grob() now accepts type = c("wordmark", "mark") alongside
variant = c("light", "dark") for 4 combinations
- New civilytics_logo() pipe-friendly convenience function:
ggplot(df, aes(x, y)) + geom_point() + theme_civilytics() |>
civilytics_logo()
R's |> has lower precedence than +, so the full ggplot chain pipes
through without parentheses
- Remove old icon/favicon assets no longer used
- Wrap showtext-dependent examples in \dontrun{} to prevent R CMD check
failures in headless PostScript environments
- R/colors.R: civilytics_colors named vector (from --cv-* CSS vars on
civilytics.com), three palettes (main/sequential/diverging),
scale_color_civilytics() and scale_fill_civilytics() for ggplot2
- R/fonts.R: auto-loads Inter + Libre Franklin from Google Fonts via
showtext in .onLoad(); exports civilytics_load_fonts() for manual retry
- R/theme.R: wires ggplot2 4.0 ink/paper/accent params into theme_grey()
base, adds title_family + strip_color params; new theme_civilytics_dark()
using navy_dark background and warm off-white text
- R/logo.R: make_logo_grob(variant) accepts "light"/"dark" to select the
white logo for dark-background compositions
- DESCRIPTION: adds showtext, sysfonts; pins ggplot2 >= 4.0.0
- tests/testthat/test_theme.R: full test suite for colors, palettes,
scales, both theme variants, and logo grob variants