91 Commits
Author SHA1 Message Date
jaredandClaude Sonnet 5.5 b0a7b618a7 docs: record session (#28, #29)
R-CMD-check / R CMD check (push) Successful in 5m9s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:46:05 -04:00
jaredandClaude Sonnet 5.5 119aa7aa0f feat(theme): add a showtext switch to civilytics_load_fonts() for ragg users (#29)
R-CMD-check / R CMD check (push) Successful in 5m7s
civilytics_load_fonts(showtext = getOption("civilytics.showtext", TRUE))
registers the brand fonts and only then turns on showtext, so ragg users can
opt out of its 96 dpi text sizing. The default is unchanged, so existing
reports render as before. The help page documents the ragg path.

Closes #29

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:45:47 -04:00
jaredandClaude Sonnet 5.5 f3ec052144 fix(logo): reserve a logo band in add_logo_ga() instead of a negative margin (#28)
R-CMD-check / R CMD check (push) Successful in 4m38s
add_logo_ga() now gives the logo its own band (logo_height inches) below the
plots, as add_logo() does, and leaves plot margins alone unless margin_param
is given.

Closes #28

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:39:43 -04:00
jaredandClaude Sonnet 5.5 a2a0fce265 docs: refresh status board after branch rename and follow-up issues (#28, #29)
R-CMD-check / R CMD check (push) Successful in 4m53s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:34:35 -04:00
jaredandClaude Sonnet 5.5 7bc547a995 ci(packaging): run check on main after renaming the default branch from master
R-CMD-check / R CMD check (push) Successful in 4m58s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:33:49 -04:00
jaredandClaude Sonnet 5.5 c16e6cec19 docs: record session (#20, #21, #22, #24, #25, #26, #27)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:31:25 -04:00
jaredandClaude Sonnet 5.5 dab960aaf1 docs(packaging): drop the flextable hex-default debt note now that #21 is fixed
AGENTS.md and the roborev project guideline in pm/compass.toml both said
R/flextable.R carries off-brand defaults. It no longer does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:31:15 -04:00
jaredandClaude Sonnet 5.5 dfcad3d0b8 chore(packaging): bump version to 0.3.2 and record fixes in NEWS
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:27:55 -04:00
jaredandClaude Sonnet 5.5 0561df4221 fix(logo): reserve a logo band, keep patchwork panels, and preserve logo aspect (#20)
The logo gets its own band (logo_height inches) instead of negative
margins, so captions are no longer clipped. Patchwork compositions go
through patchworkGrob() so every panel survives. font_scale defaults to 1.
make_logo_grob() sizes by height so the logo keeps its shape on any canvas.

Closes #20

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:27:55 -04:00
jaredandClaude Sonnet 5.5 d6e3ba2fb4 fix(logo): take style_flextable_civilytics() defaults from civilytics_colors (#21)
Header, zebra, borders, and footer text now use navy_700, paper_2,
rule_strong, rule, and ink_3 instead of Bootstrap hex values. Tables built
with the defaults change appearance.

Closes #21

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:27:54 -04:00
jaredandClaude Sonnet 5.5 4f697e2d52 fix(quarto): keep slide margins, list numbers, and column widths in civilytics-reveal
Print-to-PDF restores a 32px 56px section padding (full-bleed slides are
left alone), ordered lists get room for two-digit markers, and columns
with a Quarto width keep it while unsized columns stay equal. The default
column gap drops from 3em to 1.5em.

Closes #25
Closes #26
Closes #27

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:27:54 -04:00
jared 76aebe2b49 chore: add CLAUDE.md that imports AGENTS.md
R-CMD-check / R CMD check (push) Successful in 4m46s
Claude Code loads a project's AGENTS.md only when the project has no CLAUDE.md, and then
also loads every AGENTS.md and .claude/AGENTS.md above it, including ~/AGENTS.md and
~/.claude/AGENTS.md. This one-line import keeps the project's instructions to its own
AGENTS.md, matching the other Civilytics repos.
2026-10-11 16:57:02 -04:00
jared 446843bc86 docs: refresh status board for #24
R-CMD-check / R CMD check (push) Successful in 4m11s
2026-08-24 00:24:01 -04:00
jared 04a5ee958b docs: record session
R-CMD-check / R CMD check (push) Successful in 5m11s
Journal entry for the roborev triage session and a regenerated status board.
Adds AGENTS.md and .roborev.toml to the packaging workstream so root-level
config commits attribute to a stream instead of landing unreferenced.
2026-08-24 00:15:09 -04:00
jared cd1af67a3a fix(packaging): exclude scoped chore and docs commits from roborev
The exclusion patterns are substring matches, so `chore:` never matched
`chore(packaging):`. Because the cadence rule in AGENTS.md mandates the
`type(ws):` scope, every chore and docs commit was being reviewed -- job 15
spent a thorough review on a config-only commit. Adds the `chore(` and `docs(`
forms.

Also names pm/compass.toml as authoritative for the review rules, so the
prose copy in AGENTS.md cannot silently drift from the generated
.roborev.toml. Raised by roborev job 15.
2026-08-24 00:13:23 -04:00
jared 496b9ed9ac docs: record session (#21, #22)
Journal entry for the compass init session and the first generated status
board, published as pinned issue #23.
2026-08-23 23:39:35 -04:00
jared 7cad98b434 chore(packaging): initialise compass project tracking
Adds pm/compass.toml with five workstreams (theme, logo, quarto, helpers,
packaging), the journal and decision-record scaffold, and a composed
.roborev.toml carrying nine project-specific review rules derived from the
package's actual conventions.

Also adds AGENTS.md as the cross-tool conventions file, wires project memory
into .agent/memory/ so it travels between machines, and untracks
tests/testthat/Rplots.pdf, which churned on every test run.
2026-08-23 23:33:48 -04:00
jared 2c7c9a6dbc Fix ggplot2 imports and polish utility functions for publication
R-CMD-check / R CMD check (push) Successful in 4m17s
Blocking issue #1: Replace all ggplot2::function() calls with bare
references in R/colors.R, R/logo.R, R/theme.R. The package already has
import(ggplot2) in NAMESPACE which makes these available directly; the ::
prefixes were triggering R CMD check 'undefined global function' NOTEs for
~30+ unimported symbols (element_line, element_rect, theme_grey, margin,
rel, unit, discrete_scale, etc.).

Suggestion #6: Replace class(x) == "character" with "character" %in% class(x)
in R/db.R (countCleanr and simpleCap). The == pattern breaks on S3 objects
with multiple class attributes.

Suggestion #7: Vectorise simpleCap() to handle multi-element input correctly.
Previously strsplit(x, ' ')[[1]] only processed the first element; now uses
unname(vapply()) to capitalise each vector element independently while
preserving the original scalar behaviour (no names attribute on output).

Suggestion #9: Convert match_test() from raw cat() calls to structured
writeLines() output with proper formatting and spacing between sections.
2026-08-09 14:35:09 -04:00
jared 6051e4bb5c Remove vendored headshots and add proportion CI tests
R-CMD-check / R CMD check (push) Successful in 4m37s
- Remove Knowles_Headshot_2019_good.jpg and Knowles_Headshot_2019_prisma.jpg
  from inst/img/ — personal headshot should not be distributed with the package
- Update plot_jpeg() roxygen example to use a generic placeholder instead of
  the removed headshot path; regenerate man/plot_jpeg.Rd accordingly
- Add comprehensive testthat coverage for clopper_pearson(), z_univariate(),
  waldInterval(), and agresti_coull_interval() in tests/testthat/test_propint.R

The propint module previously had zero tests. New tests cover: return types,
formula correctness (cross-validated against binom.test()), edge cases
(0/n and n/n), interval validity, confidence level behavior, and sign/direction
of z-scores.
2026-08-09 13:53:08 -04:00
jared 9dea017381 Merge pull request 'fix: resolve locked namespace binding in civilytics_load_fonts() and default theme to transparent background' (#19) from kodor/fix-18-fonts-and-theme into master
R-CMD-check / R CMD check (push) Successful in 4m25s
Reviewed-on: #19
2026-08-03 10:46:40 -04:00
kodor 967e7e1111 docs: regenerate roxygen documentation for paper_bg and force params (#19)
R-CMD-check / R CMD check (pull_request) Successful in 4m29s
2026-08-01 21:44:50 -04:00
kodor f32093c662 fix(test): update theme tests for paper_bg=FALSE default (#19)
R-CMD-check / R CMD check (pull_request) Failing after 5m47s
2026-08-01 21:29:44 -04:00
kodor e257180f15 fix: resolve locked namespace binding in civilytics_load_fonts() and default theme to transparent background
R-CMD-check / R CMD check (pull_request) Failing after 4m13s
- Replace .cv_fonts_loaded <<- TRUE with environment-based state
  (.cv_state) to avoid 'locked namespace binding' error (#18)
- Add force=FALSE argument for idempotent font loading with guard check
- Flip theme_civilytics() paper_bg default to FALSE (transparent) (#7)
- Update roxygen docs and examples for both changes
2026-08-01 02:07:09 -04:00
jared 0ef0f310e2 Merge pull request 'fix(brand): use real company name "Civilytics Consulting" in templates' (#17) from fix/brand-name-consulting into master
R-CMD-check / R CMD check (push) Successful in 4m28s
2026-07-09 16:42:18 -04:00
jared 4fb5c488f8 fix(brand): use real company name "Civilytics Consulting" in templates
R-CMD-check / R CMD check (pull_request) Successful in 4m27s
The title-page kicker in the Typst and LaTeX templates was hardcoded to
"Civilytics Research", which is not a real entity — the company is
Civilytics Consulting. Fix the kicker in both templates, and update the
example report/slides that echoed the same non-real name. Bump to 0.3.1.
2026-07-09 16:41:55 -04:00
jared 96dc1c4c6b Merge pull request 'feat(flextable): reusable Civilytics flextable branding helpers' (#16) from feat/flextable-branding into master
R-CMD-check / R CMD check (push) Successful in 4m25s
2026-07-09 16:18:43 -04:00
jared 6ea9265236 Merge pull request 'fix(quarto): repair LaTeX + Typst branded templates (#11 #12 #13 #14)' (#15) from fix/quarto-template-bugs into master
R-CMD-check / R CMD check (push) Successful in 4m13s
2026-07-09 16:18:29 -04:00
jared b9d427eb76 fix(typst): ship template as partials so code blocks render (#12)
R-CMD-check / R CMD check (pull_request) Successful in 3m54s
The single-file `template: civilytics-typst.typ` discarded Quarto's
auto-generated `definitions` partial, so any Typst document containing a
code block failed with `unknown variable: Skylighting`.

Ship the template as Quarto template-partials instead, so Quarto keeps its
definitions (Skylighting + token functions) and syntax-highlighted code
blocks render while the Civilytics branding still applies:

- split civilytics-typst.typ into typst-template.typ (the styling function)
  and typst-show.typ (the show/entry point, keyword-safe [ ] wrapping kept);
  remove the single-file template
- use_civilytics_theme() now copies both partials and prints the
  template-partials usage
- example report.qmd uses template-partials

Verified: a report with an R code block renders with working syntax
highlighting and full branding.
2026-07-09 16:10:15 -04:00
jared a904d2313a fix(quarto): repair LaTeX + Typst branded templates
R-CMD-check / R CMD check (pull_request) Successful in 3m56s
- LaTeX: capture pandoc's \subtitle into \thesubtitle so subtitled PDFs
  compile; suppress the default \maketitle/abstract so only the branded
  title page renders (no double title); drop the unused tikz dependency
  from the title partial (#13)
- LaTeX: stop requiring a "Source Serif 4 SemiBold" face that the setup
  never installs; use the family's native Bold weight (#14)
- Typst: wrap title/subtitle/date in [ ] so text containing Typst keywords
  ("for"/"in") no longer breaks compilation (#12)
- Fix footer URL civilytics.consulting -> civilytics.com in the LaTeX and
  Typst templates and the slides example (#11)
- Bump version to 0.3.0
2026-07-09 15:57:47 -04:00
jared 761a72da18 Merge pull request 'feat(logo): add stamp_logo_png() for branding file-based (PNG) outputs' (#9) from feat/stamp-logo-png into master
R-CMD-check / R CMD check (push) Successful in 3m51s
Reviewed-on: #9
2026-06-22 16:59:52 -04:00
jared 4f51a49903 feat(flextable): add reusable Civilytics flextable branding helpers
R-CMD-check / R CMD check (pull_request) Successful in 4m20s
Generalize the flextable brand styling and "export to PNG + stamp logo"
pattern repeated across Civilytics projects into two small functions:

- style_flextable_civilytics(): applies only the visual brand (header
  fill/color, body font/size, zebra striping guarded for <2 rows,
  borders, footer styling, fixed layout) to an already-structured
  flextable. Every value is an overridable parameter; zebra toggles
  striping. Structure (labels, headers, widths, alignment, footer text)
  stays with the caller.
- save_branded_flextable_png(): exports a styled flextable to PNG via
  ragg::agg_png() sized to the table plus extra_height headroom, then
  optionally stamps the logo via stamp_logo_png() (... forwarded).

flextable, officer, and ragg are added to Suggests (not Imports) to keep
the base install light; both functions reference them fully qualified and
guard with requireNamespace() + an install hint. Real round-trip tests
cover styling, 1-row idempotence, PNG export, and extra_height.
2026-06-22 16:53:37 -04:00
jared 5fc8155965 feat(logo): add stamp_logo_png() to brand file-based PNG outputs
R-CMD-check / R CMD check (pull_request) Successful in 3m53s
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).
2026-06-22 16:33:08 -04:00
jared 41162597cf Merge pull request 'Fix issues #1, #3, #5: misc improvements' (#6) from fix/issues-1-3-5-misc-improvements into master
R-CMD-check / R CMD check (push) Successful in 4m25s
R-CMD-check / R CMD check (pull_request) Successful in 4m6s
Reviewed-on: #6
2026-06-04 14:04:44 -04:00
jared 2a74ec2bd3 test: add security regression test and beep(type='all') coverage
R-CMD-check / R CMD check (pull_request) Successful in 3m53s
- 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.
2026-06-04 13:48:21 +00:00
jared 366ac39fac fix: replace system() with system2() to prevent command injection in beep notifications
R-CMD-check / R CMD check (pull_request) Successful in 3m50s
Use system2() with separate args instead of shell-interpolated system()
calls in .send_desktop_notify() and .send_webhook(). This eliminates
command injection risk when msg, status, url, or payload contain shell
metacharacters.
2026-06-04 13:17:06 +00:00
jared fc8bf1866b Fix beep.Rd Rd syntax errors (remove invalid \char escape)
R-CMD-check / R CMD check (pull_request) Successful in 4m44s
2026-06-03 19:11:19 +00:00
jared 75b9a73165 Fix CI warnings: add jsonlite dep, flush.console import, Rd docs
R-CMD-check / R CMD check (pull_request) Failing after 1m13s
- Add jsonlite to Imports (used by beep() webhook)
- Add importFrom(utils, flush.console) to NAMESPACE
- Update na_sum.Rd to include quiet parameter
- Create beep.Rd documentation
2026-06-03 19:08:48 +00:00
jared 2f1cdcde52 Fix issues #1, #3, #5: misc improvements
R-CMD-check / R CMD check (pull_request) Failing after 4m43s
- #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)
2026-06-03 19:01:30 +00:00
jared 136c53643c feat: add Quarto themes and templates (revealjs, HTML, PDF, Typst)
R-CMD-check / R CMD check (push) Successful in 3m52s
Integrate Civilytics Reveal.js slide extension, HTML/PDF/Typst document
themes, and _brand.yml into the package under inst/quarto/. Three new
helper functions (use_civilytics_revealjs, use_civilytics_theme,
use_civilytics_brand) copy assets into a user's Quarto project. Logos
are stored once in inst/img/ and distributed at install time.
2026-05-20 09:39:27 -06:00
jared 41fe2b6170 fix: use full-bleed background rect instead of opaque logo grob
R-CMD-check / R CMD check (push) Successful in 4m4s
The previous fix applied the plot's background to the logo grob
directly, which made it opaque and covered caption/axis text that
overlaps into the logo area via negative margins.

Instead, wrap the entire arrangeGrob composition in a grobTree with
a background rectGrob behind it. This fills transparent areas (logo
strip, padding gaps) with the plot's background color while keeping
the logo grob itself transparent so overlapping text remains visible.
2026-05-19 22:12:03 -06:00
jared ac8e3eb60e fix: inherit plot background color in logo compositing
R-CMD-check / R CMD check (push) Successful in 3m41s
The logo grob uses theme_void() (transparent background), so when
arrangeGrob() composites it with a dark-themed plot, the logo strip
falls back to the device default (white). Extract the plot's
plot.background fill and apply it to the logo grob before compositing.

Fixes the issue where theme_civilytics_dark(font_size = 16) piped to
civilytics_logo(variant = "dark") would show a light background in
the logo/caption area.
2026-05-19 16:47:36 -06:00
jared 98e0949d27 feat: add map theme variants and fix dark theme text readability
R-CMD-check / R CMD check (push) Successful in 3m48s
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.
2026-05-19 16:07:42 -06:00
jaredandClaude Opus 4.6 328d9d2fd6 feat: add position argument to civilytics_logo() for corner placement
R-CMD-check / R CMD check (push) Successful in 3m37s
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>
2026-05-19 15:44:18 -06:00
jared 95b8ba1da4 fix: revert font_size default to 14pt, keep DPI fix
R-CMD-check / R CMD check (push) Successful in 3m37s
2026-05-19 15:11:27 -06:00
jared f134621df5 fix: bump base font_size to 16pt and drop fig.retina for readable README
R-CMD-check / R CMD check (push) Successful in 3m33s
The old fig.retina=2 at 150 DPI rendered PNGs at 2x resolution that
GitHub markdown can't use, making text appear half its intended size.
Switching to 96 DPI without retina produces images at their natural
display size. Combined with the base font bump (14 → 16pt), titles
and labels now render with proper editorial presence.
2026-05-19 14:40:48 -06:00
jared 31d3e2886d feat: bump title sizes, add font_scale to logo functions, ship SVGs
R-CMD-check / R CMD check (push) Successful in 3m36s
- Change rel_large default from 16/14 to 20/14 (~1.43x) to match the
  Civilytics editorial design system. Subtitle now renders at 1.0x base
  instead of 0.86x.
- Switch axis.text to rel() sizing so all text elements cascade from the
  root font_size, enabling uniform scaling.
- Add font_scale parameter (default 1.1) to civilytics_logo(),
  add_logo(), and add_logo_ga() — inflates text by ~10% before
  arrangeGrob composition to compensate for viewport shrinkage.
- Ship SVG logo variants (mark, wordmark, pulse) in inst/img/ for
  Quarto/HTML templates.
- Add "Maintaining brand assets" section to README documenting inst/img/
  file inventory and update workflow.
- Document full font size hierarchy in theme_civilytics() roxygen.
2026-05-19 12:51:23 -06:00
jared 34622ccf88 fix: use remotes::install_git() for Gitea installation instructions
R-CMD-check / R CMD check (push) Successful in 3m37s
2026-05-19 10:46:32 -06:00
jared f9b51cc558 fix: use light-variant mark in logo example to match light logo area
R-CMD-check / R CMD check (push) Successful in 3m42s
2026-05-19 10:43:52 -06:00
jared 875251068a docs: add rendered logo examples to README gallery
R-CMD-check / R CMD check (push) Successful in 3m38s
Show three logo use cases: wordmark on a light plot, compact mark on a
dark plot, and multi-plot layout with a shared logo via add_logo_ga().
2026-05-19 10:39:12 -06:00
jared 515bae8685 feat: expand color system to 53 colors/10 palettes, add grid/slide themes, and README gallery
R-CMD-check / R CMD check (push) Successful in 3m41s
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.
2026-05-19 10:35:32 -06:00
jared 099fff1d1d fix: correct pipe precedence docs — |> binds tighter than +
R-CMD-check / R CMD check (push) Successful in 2m46s
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.
2026-05-17 22:54:53 -06:00
jared 7371069379 feat: rebrand logos with wordmark/mark variants and pipe-friendly API
R-CMD-check / R CMD check (push) Successful in 2m39s
- 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
2026-05-17 22:42:40 -06:00
jared 3a6f20b723 ci: bump rocker container to r-ver:4.6 for ggplot2 4.0 CRAN snapshot
R-CMD-check / R CMD check (push) Successful in 2m55s
2026-05-17 10:41:50 -06:00
jared c93c469267 feat: add brand color system, showtext fonts, and dark theme
R-CMD-check / R CMD check (push) Failing after 1m39s
- 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
2026-05-17 10:36:59 -06:00
jared 2d70d9aecf fix: clean up theme.R and logo.R before restyling
R-CMD-check / R CMD check (push) Successful in 1m45s
theme.R:
- Remove deprecated legend.text.align and legend.title.align (ggplot2 3.5.0)
- Remove stale @importFrom graphics plot (unused in theme function)

logo.R:
- Fix make_logo_grob() spurious two-row data frame (drop aes/data from canvas)
- Fix add_logo_ga() caption measurement always using first plot; now uses max
  across all plots with captions
- Fix add_logo_ga() ncol hardcoded to 2; now uses length(plot_list)
- Fix add_logo_ga() widths silently ignored in nrow > 1 path; now warns
- Replace deprecated qplot() in examples with ggplot() equivalents
- Fix native = T -> TRUE in plot_jpeg()
2026-05-17 10:01:35 -06:00
jared bf6f7cc480 fix: use globalVariables for state.abb/state.name, regenerate docs
R-CMD-check / R CMD check (push) Successful in 1m36s
@importFrom does not work for base R lazy data objects — replaced with
utils::globalVariables() in the package file to suppress the R CMD check
NOTE. Removed the invalid @importFrom datasets tag from utils.R.

Also commits all man/ and NAMESPACE changes from devtools::document().
2026-05-17 09:36:59 -06:00
jared b84fc2f7d0 fix: resolve all R CMD check errors and notes
R-CMD-check / R CMD check (push) Failing after 1m32s
- Wrap get_fips/get_stabbr examples in dontrun (tidycensus is Suggests)
- Add .gitea to .Rbuildignore (hidden dir note)
- Add importFrom(datasets, state.abb/state.name) for postcode_lookup
- Remove LazyData: true (no data/ directory)
2026-05-17 09:30:01 -06:00
jared d17a4fbc7c ci: use rocker container with shell git checkout
R-CMD-check / R CMD check (push) Failing after 2m13s
Replace actions/checkout@v4 (JS action, requires Node.js) with plain git
commands using the auto-injected gitea.token for auth. This lets the workflow
run entirely inside rocker/r-ver:4.4 without any Node.js dependency.
2026-05-17 09:15:24 -06:00
jared 53299c7e88 ci: run on host runner, install R from CRAN PPA
R-CMD-check / R CMD check (push) Failing after 10m49s
Remove container directive — rocker/r-ver has no Node.js so actions/checkout
(a JS action) fails with exit 127. Install R 4.x from the official CRAN
Ubuntu PPA on the host runner instead.
2026-05-17 09:12:37 -06:00
jared 38cdaa8ea7 ci: replace Jenkins with Gitea Actions, modernize DESCRIPTION
R-CMD-check / R CMD check (push) Failing after 3s
- Add real R CMD check workflow via Gitea Actions (rocker/r-ver:4.4)
- Remove Jenkinsfile and demo workflow
- Modernize DESCRIPTION: Authors@R, R >= 4.1.0, URL/BugReports fields,
  move tidycensus from Imports to Suggests, testthat edition 3
- Fix agresti_coull_interval: correct implementation, export it
- Convert get_fips/get_stabbr to use requireNamespace for tidycensus
- Remove civilytics:: self-reference in rnh()
2026-05-17 09:05:45 -06:00
Jared Knowles 01c9d1c796 test actions
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 36s
Gitea Organization/civilyticsR/pipeline/head This commit looks good
2025-04-04 11:51:19 -04:00
jared b59cbeb9b6 Merge pull request 'fix proportion ci calc and theme' (#2) from feature-prop_int into master
Gitea Organization/civilyticsR/pipeline/head This commit looks good
Reviewed-on: #2
2024-09-19 16:17:32 -04:00
jared f3f13fcfe5 fix message unicode
Gitea Organization/civilyticsR/pipeline/head This commit looks good
2024-09-19 16:14:30 -04:00
jared 962f8ea6b7 add rounding utilities
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2024-09-19 14:32:43 -04:00
jared f4a4ee85a7 fix doco
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
Gitea Organization/civilyticsR/pipeline/pr-master There was a failure building this commit
2024-08-09 15:34:39 -04:00
jared 82b8db7f84 fix proportion ci calc and theme
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2024-08-09 15:05:59 -04:00
Jared Knowles 4f49ae6d5a dockerfile edits
Gitea Organization/civilyticsR/pipeline/head This commit looks good
2023-07-20 15:44:17 -04:00
Jared Knowles e27ff481c1 fix docker build agent to have correct geo dependencies installed
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2023-07-20 15:08:16 -04:00
Jared Knowles 91dceb9c1c somehow licenses are important
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2023-07-20 14:57:08 -04:00
Jared Knowles c6079eb515 working build
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2023-07-20 14:51:04 -04:00
Jared Knowles 0ad87eb333 fix dockerfile
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2023-07-20 14:18:02 -04:00
Jared Knowles ac63932a31 add additional functions
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2023-07-20 11:48:42 -04:00
Jared Knowles 9acebb5133 unit test match funs
Gitea Organization/civilyticsR/pipeline/head This commit looks good
2023-07-19 17:37:18 -04:00
Jared Knowles a0b4abdb9e add code coverage
Gitea Organization/civilyticsR/pipeline/head This commit looks good
2022-10-31 12:39:13 -04:00
Jared Knowles f0133e32b7 typo
Gitea Organization/civilyticsR/pipeline/head This commit looks good
2022-10-16 19:31:42 -04:00
Jared Knowles 91dad76526 cleanup tests and build
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 19:30:05 -04:00
Jared Knowles a02e72e618 get dockerfile requirements right
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 19:20:20 -04:00
Jared Knowles 4a2cd9e1dd refresh doco
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 19:17:38 -04:00
Jared Knowles f50290ba40 nest stages
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 19:15:33 -04:00
Jared Knowles 8b8dd50de3 fill out testing
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 19:08:06 -04:00
Jared Knowles 34cc4a5c1a update dockerfile
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 18:59:48 -04:00
Jared Knowles 6f4ccc0d4e convert makefile to jenkinsfile
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 18:58:22 -04:00
Jared Knowles 920098e18d remove uneeded git dependency
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 18:45:37 -04:00
Jared Knowles c004628682 typo
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 18:42:09 -04:00
Jared Knowles f2dca18041 typo
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 18:41:14 -04:00
Jared Knowles 72afbaeefa dockerfile version
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 18:38:10 -04:00
Jared Knowles d061c4e802 configure jenkinsfile better
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 18:19:39 -04:00
Jared Knowles 904ca1dbc8 typos
Gitea Organization/civilyticsR/pipeline/head Something is wrong with the build of this commit
2022-10-16 18:08:53 -04:00
Jared Knowles 1550c2cb5b rockstar test
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 18:07:42 -04:00
Jared Knowles b44a254029 fix jenkinsfile parse
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 17:58:08 -04:00
Jared Knowles 399cb7101d make file test
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
2022-10-16 17:56:27 -04:00
145 changed files with 10907 additions and 949 deletions

No files matched your search

+8
View File
@@ -1,4 +1,12 @@
^.*\.Rproj$ ^.*\.Rproj$
^\.Rproj\.user$ ^\.Rproj\.user$
^\.github$ ^\.github$
^\.gitea$
^README\.Rmd$ ^README\.Rmd$
^NEWS\.md$
^Makefile$
^Dockerfile$
^\.claude$
^\.playwright-mcp$
^civilytics-site\.png$
^Rplots\.pdf$
View File
Whitespace-only changes.
+53
View File
@@ -0,0 +1,53 @@
name: R-CMD-check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
name: R CMD check
runs-on: ubuntu-latest
container: rocker/r-ver:4.6
steps:
# Plain git checkout — no Node.js required, works in any container.
# gitea.token is automatically injected by the runner for auth.
- name: Check out code
env:
REPO_TOKEN: ${{ gitea.token }}
run: |
apt-get update -qq && apt-get install -y --no-install-recommends git
git config --global --add safe.directory "$PWD"
git init
git remote add origin \
"https://oauth2:${REPO_TOKEN}@gitea.civilytics.org/${{ gitea.repository }}.git"
git fetch --depth=1 origin "${{ gitea.sha }}"
git checkout FETCH_HEAD
- name: Install system dependencies
run: |
apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libcairo2-dev \
libjpeg-dev \
libpng-dev \
libfontconfig1-dev \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libtiff5-dev
- name: Install R dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Run R CMD check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning")
shell: Rscript {0}
+7
View File
@@ -2,3 +2,10 @@
.Rhistory .Rhistory
.RData .RData
.Ruserdata .Ruserdata
.compass-cache/
# roborev snapshots
/.roborev/
# Test run debris
tests/testthat/Rplots.pdf
tests/testthat/_problems/
+64
View File
@@ -0,0 +1,64 @@
# roborev configuration, initialised by compass.
# Reviews are queued to a background daemon -- they never block a commit.
post_commit_review = 'commit'
# Scoped conventional commits (`chore(packaging):`) do not contain `chore:`,
# and this repo's cadence rule mandates the scope -- so both forms are listed.
excluded_commit_patterns = ['WIP', 'chore:', 'chore(', 'docs:', 'docs(', 'Merge ']
review_guidelines = '''
# --- compass:begin (generated -- edit the sources, not this) ---
- Prefer returning new values to mutating arguments in place. A function that edits
its caller's object is a bug waiting for a second caller.
- Validate at system boundaries -- user input, API responses, file contents, config.
Fail fast with a message naming the field and the file.
- Never swallow an error. Handle it or let it propagate; a bare catch that continues
is worse than a crash.
- No hardcoded secrets, tokens, or credentials, and no secrets in log output or error
messages.
- Parameterise every query. String-built SQL is a defect even when the input looks safe.
- Keep functions under roughly 50 lines and files under roughly 400. Flag nesting
deeper than four levels.
- No magic numbers or hardcoded paths -- name them as constants or read them from config.
- New behaviour needs a test. A bug fix needs a test that fails without the fix.
- Prose a person reads -- an issue title or body, a journal entry, a decision record,
the narrative on the status board -- names the action or the thing, not the shape of
the machinery. Flag "gate", "seam", "surface area", "load-bearing", "first-class",
"primitive", "blast radius". A project's own defined vocabulary is not the target.
- Use the native pipe `|>`, not magrittr `%>%`.
- snake_case for objects and functions; UPPER_SNAKE for constants. Never use `.` as a
word separator in a function name -- it collides with S3 dispatch.
- Validate arguments at the top of exported functions with `stopifnot()` or an explicit
check, and say which argument was wrong.
- Never `setDT()`, `set()`, or otherwise modify by reference a data.table the caller
still owns. `as.data.table()` copies; use it.
- Prefer `vapply()` to `sapply()` -- `sapply()` silently returns a list when the type
varies, which turns a type error into a downstream mystery.
- Use `seq_len(n)` / `seq_along(x)`, never `1:n`, which iterates backwards when n is 0.
- Compare strings with `==` only after checking for NA; use `identical()` for scalars
where NA would be wrong.
- Do not call `library()` inside package or module files; attach packages in scripts and
test helpers only.
- Namespace-qualify calls into other packages (`stats::sd`) in code that is sourced.
- Every exported function needs roxygen with `@param` for each argument (type, meaning,
and why the default is what it is) and `@return`. Add `@examples` for exported API.
- Declare dependencies in DESCRIPTION. Prefer base R or an existing dependency over
adding a new one; a package with zero hard deps is worth keeping that way.
- Signal errors with `stop()` carrying a condition class, so callers can catch the kind
rather than matching on message text.
- Keep internals internal. Export only what a user needs; an accidentally exported
helper becomes an API you have to keep.
- Tests use testthat edition 3. Each test is self-sufficient -- no reliance on state
left by an earlier test or on a fixture built elsewhere in the file.
- Prefer duplication in tests over a helper that hides what is being asserted.
- Brand colors come from `civilytics_colors`; never write a hex literal in theme, scale, logo, or table code.
- No tidyverse dependency. Imports is base R plus ggplot2, grid/gridExtra, png/jpeg, stringr, stringdist, showtext/sysfonts, jsonlite. Reject dplyr, purrr, magrittr, tibble, and data.table; use base R idioms.
- NAMESPACE is roxygen-generated. Declare imports with `@importFrom` in the roxygen block and re-run roxygen; never hand-edit NAMESPACE.
- Themes default to a transparent background (`paper_bg = FALSE`) so plots composite onto any Quarto, Reveal, or Typst background. Making an opaque background the default is a regression, not a preference.
- Theme functions thread `ink`/`paper`/`accent` into ggplot2 4.0's base-theme parameters rather than setting element colors ad hoc. ggplot2 >= 4.0 is a hard dependency, so use S7 `@` property access on plot and theme objects, not `$`.
- User-facing progress goes through `message()` so callers can suppress it. No `cat()` or `print()` in package code.
- Nothing personal or client-identifying is vendored into `inst/` -- brand assets only. Version 0.3.2 removed headshots for exactly this reason.
- The camelCase exports (`countCleanr`, `dbSafeNames`, `simpleCap`, `waldInterval`, `countDots`, `countNA`, `findDots`, `nvals`) are frozen public API; do not rename them. New functions are snake_case.
- `R/theme.R` and `R/logo.R` are long by design -- one file per surface, with dense roxygen. File length is not a finding in this package; flag a single function over roughly 80 lines instead.
# --- compass:end ---
'''
+92
View File
@@ -0,0 +1,92 @@
# AGENTS.md
`civilytics` is the house R package for Civilytics Consulting: a ggplot2 brand theme
system, curated palettes, logo composition, Quarto/Typst/Reveal templates, and
data-wrangling helpers for public-sector analysis. It is a library other projects
depend on, so a breaking change here breaks reports that are already published.
## Project tracking
This repo is managed with compass. `pm/compass.toml`
defines the workstreams; `pm/JOURNAL.md` records sessions; `pm/decisions/` holds
numbered, immutable decision records. Ask compass where things stand rather than
reading the config back.
Workstreams (the `ws/` label on every issue):
| `ws/` | covers |
|---|---|
| `theme` | `R/theme.R`, `R/colors.R`, `R/fonts.R` — themes, palettes, font loading |
| `logo` | `R/logo.R`, `R/flextable.R`, `inst/img/` — logo and branded output |
| `quarto` | `R/quarto.R`, `inst/quarto/` — HTML, PDF, Typst, Reveal templates |
| `helpers` | `R/utils.R`, `R/prop_conf.R`, `R/join_utilities.R`, `R/db.R`, `R/notifications.R` |
| `packaging` | `DESCRIPTION`, `NAMESPACE`, `Makefile`, `Dockerfile`, `.gitea/workflows/` |
## Commit cadence
One coherent unit per commit, subject line:
```
type(ws): subject (#N)
```
`type` is one of `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, `perf`, `ci`.
`ws` is a workstream id from the table above. `#N` is the issue, when there is one.
## Conventions
`pm/compass.toml` is authoritative for these rules. Its `[roborev]
project_guidelines` are composed into `.roborev.toml`, so change them there and
re-run compass rather than editing `.roborev.toml` by hand. The prose below is the
same rules stated for a human reader; if the two ever disagree, `pm/compass.toml`
wins.
**Dependencies.** Base R plus ggplot2 (>= 4.0), grid/gridExtra, png/jpeg, stringr,
stringdist, showtext/sysfonts, jsonlite. No tidyverse: no dplyr, purrr, magrittr,
tibble, or data.table. Prefer an existing dependency or base R over adding one —
this package is installed into other people's environments.
**Brand colors** live in `civilytics_colors` and nowhere else. Never write a hex
literal in theme, scale, logo, or table code.
**Themes** default to a transparent background (`paper_bg = FALSE`) so plots
composite onto any Quarto, Reveal, or Typst background. Thread `ink`, `paper`, and
`accent` into ggplot2 4.0's base-theme parameters rather than setting element colors
one at a time. ggplot2 >= 4.0 is a hard dependency, so use S7 `@` property access on
plot and theme objects, not `$`.
**Naming.** New functions are snake_case. The camelCase exports (`countCleanr`,
`dbSafeNames`, `simpleCap`, `waldInterval`, `countDots`, `countNA`, `findDots`,
`nvals`) are frozen public API — do not rename them.
**Documentation.** Roxygen generates both `man/` and `NAMESPACE`. Declare imports
with `@importFrom` in the roxygen block; never hand-edit `NAMESPACE`. Every exported
function needs `@param` for each argument and `@return`; exported API needs
`@examples`. Re-run roxygen in the same commit as the code change — compass files
documentation debt when code moves and its `man/` pages do not.
**Output.** User-facing progress goes through `message()` so callers can suppress it.
No `cat()` or `print()` in package code.
**Assets.** Nothing personal or client-identifying is vendored into `inst/` — brand
assets only. Version 0.3.2 removed headshots for exactly this reason.
## Testing
testthat edition 3, one file per source file (`tests/testthat/test_theme.R` etc.).
Tests are self-sufficient: no reliance on state left by an earlier test. New
behaviour needs a test; a bug fix needs a test that fails without the fix.
```zsh
make check # R CMD check --no-manual against a built tarball
Rscript -e 'devtools::test()'
```
CI runs `R CMD check` on `rocker/r-ver:4.6` via `.gitea/workflows/check.yaml` for
every push and PR to `main`.
## Release
Bump `Version` in `DESCRIPTION` and add a `NEWS.md` entry under **New features**,
**Bug fixes**, or **Internal**. `NEWS.md` is the changelog; compass tracks the work
that led to it, not the release itself.
+1
View File
@@ -0,0 +1 @@
@AGENTS.md
+32 -14
View File
@@ -1,24 +1,42 @@
Package: civilytics Package: civilytics
Type: Package Type: Package
Title: Utilities Functions for Civilytics Title: Brand Themes, Color Palettes, and Utility Functions for Civilytics
Version: 0.1.0 Version: 0.3.2
Author: Jared E. Knowles <jared@civilytics.com> Authors@R:
Maintainer: Jared E. Knowles <jared@civilytics.com> person("Jared", "E. Knowles", email = "jared@civilytics.com",
Description: House R functions for Civilytics Consulting LLC role = c("aut", "cre"))
This package implements a variety of useful functions for creating and Description: Provides a complete ggplot2 brand theme system for Civilytics
branding analyses produced by Civilytics Consulting LLC. Consulting LLC, including editorial light, dark, and slide-optimized themes;
License: LICENSE 10 curated color palettes for qualitative, sequential, and diverging data;
logo composition utilities; Quarto themes for HTML reports, PDF, Typst, and
Reveal.js presentations; and data-wrangling helpers for public-sector
analysis.
License: LGPL (>= 3)
URL: https://gitea.civilytics.org/Civilytics/civilyticsR
BugReports: https://gitea.civilytics.org/Civilytics/civilyticsR/issues
Depends: Depends:
R (>= 2.15.1) R (>= 4.1.0)
Imports: Imports:
ggplot2, ggplot2 (>= 4.0.0),
jpeg, jpeg,
jsonlite,
png, png,
stringr, stringr,
gridExtra, gridExtra,
grid grid,
stringdist,
showtext,
sysfonts
Encoding: UTF-8 Encoding: UTF-8
LazyData: true
Suggests: Suggests:
testthat testthat (>= 3.0.0),
RoxygenNote: 7.1.1 tidycensus,
quarto,
flextable,
officer,
patchwork,
ragg,
withr
Config/testthat/edition: 3
Config/roxygen2/version: 8.0.0
RoxygenNote: 7.3.3
+27
View File
@@ -0,0 +1,27 @@
# [Choice] R version: 4, 4.2, 4.1, 4.0
ARG VARIANT=4.2
# [Choice] Base image. Minimal (r-ver), tidyverse installed (tidyverse), or full image (binder): rocker/r-ver, rocker/tidyverse, rocker/binder
ARG BASE_IMAGE=rocker/r-ver
FROM ${BASE_IMAGE}:${VARIANT}
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo \
libcurl4-gnutls-dev \
libxml2-dev \
libcairo2-dev \
libxt-dev \
libjpeg-dev \
libpng-dev \
openjdk-11-jdk \
libssl-dev \
libssh2-1-dev \
libudunits2-dev \
libgdal-dev \
libgeos-dev \
libproj-dev \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /var/lib/shiny-server/bookmarks/shiny
RUN install2.r ggplot2 jpeg png stringr gridExtra grid testthat covr tidycensus stringdist
+163
View File
@@ -0,0 +1,163 @@
GNU Lesser General Public License
=================================
_Version 3, 29 June 2007_
_Copyright © 2007 Free Software Foundation, Inc. &lt;<http://fsf.org/>&gt;_
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
### 0. Additional Definitions
As used herein, “this License” refers to version 3 of the GNU Lesser
General Public License, and the “GNU GPL” refers to version 3 of the GNU
General Public License.
“The Library” refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An “Application” is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A “Combined Work” is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the “Linked
Version”.
The “Minimal Corresponding Source” for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The “Corresponding Application Code” for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
### 1. Exception to Section 3 of the GNU GPL
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
### 2. Conveying Modified Versions
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
* **a)** under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
* **b)** under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
### 3. Object Code Incorporating Material from Library Header Files
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
* **a)** Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
* **b)** Accompany the object code with a copy of the GNU GPL and this license
document.
### 4. Combined Works
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
* **a)** Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
* **b)** Accompany the Combined Work with a copy of the GNU GPL and this license
document.
* **c)** For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
* **d)** Do one of the following:
- **0)** Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
- **1)** Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that **(a)** uses at run time
a copy of the Library already present on the user's computer
system, and **(b)** will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
* **e)** Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option **4d0**, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option **4d1**, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
### 5. Combined Libraries
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
* **a)** Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
* **b)** Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
### 6. Revised Versions of the GNU Lesser General Public License
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License “or any later version”
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
+26
View File
@@ -0,0 +1,26 @@
# h/t to @jimhester and @yihui for this parse block:
# https://github.com/yihui/knitr/blob/dc5ead7bcfc0ebd2789fe99c527c7d91afb3de4a/Makefile#L1-L4
# Note the portability change as suggested in the manual:
# https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Writing-portable-packages
PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION`
PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION`
all: check
build: install_deps
R CMD build .
check: build
R CMD check --no-manual $(PKGNAME)_$(PKGVERS).tar.gz
install_deps:
Rscript \
-e 'if (!requireNamespace("remotes")) install.packages("remotes")' \
-e 'remotes::install_deps(dependencies = TRUE)'
install: build
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
clean:
@rm -rf $(PKGNAME)_$(PKGVERS).tar.gz $(PKGNAME).Rcheck
+49 -1
View File
@@ -1,34 +1,82 @@
# Generated by roxygen2: do not edit by hand # Generated by roxygen2: do not edit by hand
export(beep)
export(add_logo) export(add_logo)
export(add_logo_ga) export(add_logo_ga)
export(agresti_coull_interval)
export(civilytics_colors)
export(civilytics_load_fonts)
export(civilytics_logo)
export(civilytics_pal)
export(civilytics_palette)
export(civilytics_palettes)
export(clopper_pearson)
export(countCleanr) export(countCleanr)
export(countDots) export(countDots)
export(countNA) export(countNA)
export(dbSafeNames) export(dbSafeNames)
export(findDots) export(findDots)
export(get_fips)
export(get_png) export(get_png)
export(get_stabbr)
export(grade_level_to_num) export(grade_level_to_num)
export(has_caption) export(has_caption)
export(make_logo_grob) export(make_logo_grob)
export(match_test)
export(measure_caption) export(measure_caption)
export(na_sum)
export(na_zero) export(na_zero)
export(nvals) export(nvals)
export(outersect)
export(perturb_count)
export(plot_jpeg) export(plot_jpeg)
export(postcode_lookup)
export(pretty_count) export(pretty_count)
export(pretty_per) export(pretty_per)
export(race_short_names) export(race_short_names)
export(random_round)
export(rnh)
export(round_to_nearest_half)
export(safe_max) export(safe_max)
export(safe_ratio)
export(save_branded_flextable_png)
export(scale_color_civilytics)
export(scale_fill_civilytics)
export(simpleCap) export(simpleCap)
export(stamp_logo_png)
export(star_subs) export(star_subs)
export(style_flextable_civilytics)
export(theme_civilytics) export(theme_civilytics)
export(theme_civilytics_dark)
export(theme_civilytics_dark_map)
export(theme_civilytics_map)
export(theme_civilytics_slide)
export(theme_civilytics_slide_map)
export(trim_max)
export(use_civilytics_brand)
export(use_civilytics_revealjs)
export(use_civilytics_theme)
export(waldInterval)
export(z_gap_test)
export(z_univariate)
import(ggplot2) import(ggplot2)
importFrom(ggplot2,annotation_custom)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,theme) importFrom(ggplot2,theme)
importFrom(graphics,plot) importFrom(ggplot2,theme_void)
importFrom(grDevices,dev.off)
importFrom(grDevices,png)
importFrom(graphics,rasterImage) importFrom(graphics,rasterImage)
importFrom(grid,grid.draw) importFrom(grid,grid.draw)
importFrom(grid,grid.newpage)
importFrom(grid,grid.raster)
importFrom(grid,rasterGrob) importFrom(grid,rasterGrob)
importFrom(gridExtra,arrangeGrob) importFrom(gridExtra,arrangeGrob)
importFrom(jpeg,readJPEG) importFrom(jpeg,readJPEG)
importFrom(png,readPNG) importFrom(png,readPNG)
importFrom(stats,qbeta)
importFrom(stats,qnorm)
importFrom(stats,runif)
importFrom(stringdist,stringsim)
importFrom(stringr,str_count) importFrom(stringr,str_count)
importFrom(utils,flush.console)
+46
View File
@@ -0,0 +1,46 @@
# civilytics 0.3.2
## New features
- `civilytics_logo()` and `add_logo()` gain `logo_height` (inches, default `0.5`),
the height of a band reserved for the logo.
- `civilytics_load_fonts()` gains `showtext` (default `getOption("civilytics.showtext", TRUE)`), so ragg
users can register the brand fonts without turning on showtext, which draws text
at a third of its size on a 300 dpi ragg device. The default is unchanged (#29).
- `patchwork` is now a suggested package, used when a patchwork composition is
passed to `civilytics_logo()`.
- Added comprehensive test coverage for the `prop_conf` module, including
correctness checks against `binom.test()` for Clopper-Pearson intervals and
formula-based verification for Wald and Agresti-Coull intervals.
## Bug fixes
- `civilytics_logo()` / `add_logo()` now render every panel and the
`plot_annotation()` of a patchwork composition. They previously drew only the
last panel (#20).
- The logo now sits in its own reserved band instead of pulling the plot down with
negative margins, so captions are no longer clipped at the bottom edge and the
layout no longer depends on whether showtext is active (#20).
- `add_logo_ga()` gets the same reserved logo band (`logo_height`) and no longer
pulls the plots down with a negative margin. `margin_param` still overrides the
bottom margin when given (#28).
- The logo keeps its own aspect ratio on any canvas. `make_logo_grob()` used to
stretch it to a fixed fraction of the plot width, so its shape changed with
the canvas and it was already about 1.5 times too wide at 11 by 7 inches (#20).
- `font_scale` now defaults to `1` in `civilytics_logo()`, `add_logo()` and
`add_logo_ga()`. The old default of `1.1` enlarged the base text by 10% whenever
a logo was added. Pass `font_scale = 1.1` to keep the old sizes (#20).
- `style_flextable_civilytics()` defaults now come from `civilytics_colors`
instead of Bootstrap hex values: header `navy_700`, zebra `paper_2`, outer
border `rule_strong`, inner border `rule`, footer text `ink_3`. Tables built
with the defaults change appearance (#21).
- `civilytics-reveal`: PDF output keeps slide margins, ordered-list numbers no
longer clip at the left edge, and Quarto column widths (`.column width="60%"`)
are honored. Columns without a width stay equal, and the default gap is now
`1.5em` (#25, #26, #27).
- Removed vendored headshot images (`Knowles_Headshot_2019_good.jpg`,
`Knowles_Headshot_2019_prisma.jpg`) from `inst/img/` to prevent personal
photos from being distributed with the package. The `plot_jpeg()` example
now references a generic placeholder path instead of a specific headshot.
## Internal
- Renamed `LICENSE.md` to `LICENSE` for R packaging convention compliance so
that the LGPL-3 license ships correctly with built tarballs.
+40
View File
@@ -0,0 +1,40 @@
#' @description
#' Provides a complete ggplot2 brand theme system for Civilytics Consulting,
#' including editorial light, dark, and slide-optimized themes; 10 curated
#' color palettes; logo composition; and data-wrangling helpers for
#' public-sector analysis.
#'
#' @section Themes:
#' \itemize{
#' \item [theme_civilytics()] -- editorial theme with warm paper background
#' \item [theme_civilytics_dark()] -- navy background variant
#' \item [theme_civilytics_slide()] -- transparent background, larger text
#' }
#'
#' @section Color palettes:
#' \itemize{
#' \item [civilytics_colors] -- 53 named brand colors
#' \item [civilytics_palettes] -- 10 visualization palettes
#' \item [civilytics_palette()] -- extract colors by palette name
#' \item [scale_color_civilytics()] / [scale_fill_civilytics()] -- ggplot2 scales
#' }
#'
#' @section Quarto templates:
#' \itemize{
#' \item [use_civilytics_revealjs()] -- install Reveal.js slide extension
#' \item [use_civilytics_theme()] -- install HTML/PDF/Typst document theme
#' \item [use_civilytics_brand()] -- install brand.yml only (Quarto 1.5+)
#' }
#'
#' @keywords internal
#' @importFrom stats qbeta
#' @importFrom stats qnorm
"_PACKAGE"
## usethis namespace: start
## usethis namespace: end
NULL
# state.abb and state.name are lazy data from the datasets package (base R).
# They cannot be imported via @importFrom -- suppress the R CMD check NOTE here.
utils::globalVariables(c("state.abb", "state.name"))
+295
View File
@@ -0,0 +1,295 @@
#' Civilytics brand colors
#'
#' A named character vector of all Civilytics brand colors, matching the CSS
#' custom properties in the Civilytics design system (`--cv-*` variables).
#' Includes full ramps for navy, ember, and violet, plus supporting hues
#' (teal, plum, moss, brass) and semantic status colors.
#'
#' @format A named character vector of hex color codes.
#' @export
#'
#' @examples
#' civilytics_colors["ink"]
#' civilytics_colors[c("navy_600", "ember_600", "teal_600")]
civilytics_colors <- c(
# Neutrals — warm paper -> civic ink
paper = "#FAF7F2",
paper_2 = "#F2EDE4",
paper_3 = "#E6DFD1",
rule = "#D6CEBD",
rule_strong = "#B8AE97",
ink = "#0E1A2B",
ink_2 = "#2B3A52",
ink_3 = "#5A6A82",
ink_4 = "#8C97AB",
# Navy — civic authority (primary brand blue)
navy_900 = "#0E1A2B", navy_800 = "#132339", navy_700 = "#1A2E4A",
navy_600 = "#22406A", navy_500 = "#2E5590", navy_400 = "#4A74B0",
navy_300 = "#7A9BCA", navy_200 = "#B3C6E0", navy_100 = "#DDE6F2",
navy_50 = "#EEF3FA",
# Ember — warm orange accent
ember_900 = "#451A00", ember_800 = "#6B2B00", ember_700 = "#923D00",
ember_600 = "#C25311", ember_500 = "#DB6C25", ember_400 = "#EA8A49",
ember_300 = "#F2A976", ember_200 = "#F8C8A3", ember_100 = "#FBE0C6",
ember_50 = "#FDF1E4",
# Violet — extended supporting
violet_900 = "#19102E", violet_800 = "#2A1B4D", violet_700 = "#3D2A6B",
violet_600 = "#5C3A8A", violet_500 = "#7556A8", violet_400 = "#9A7EC2",
violet_300 = "#BDA8DA", violet_200 = "#DCD0EC", violet_100 = "#F1ECF8",
# Supporting — muted editorial hues for data viz
teal_600 = "#1F6F70", teal_300 = "#7CB3B3", teal_100 = "#D3E6E6",
plum_600 = "#6B3A5E", plum_300 = "#B392A7", plum_100 = "#E7DAE1",
moss_600 = "#4A6B2F", moss_300 = "#9CB47D", moss_100 = "#DEE8CF",
brass_600 = "#B8751C", brass_100 = "#F9E6C8",
# Semantic status colors
success = "#4A6B2F",
warning = "#9A5F18",
danger = "#A6271D",
info = "#2E5590"
)
#' Civilytics visualization palettes
#'
#' Named list of curated color palettes for data visualization. Qualitative
#' palettes use distinct hues for categorical data; sequential palettes ramp
#' through a single hue for ordered data; diverging palettes fan out from a
#' neutral midpoint.
#'
#' @format A named list of character vectors of hex color codes.
#'
#' @section Qualitative (categorical data):
#' \describe{
#' \item{`qual`}{7 distinct hues: navy, ember, plum, violet, red, teal, ink-3}
#' \item{`qual_warm`}{Warm-leaning: ember, red, magenta, plum, violet}
#' \item{`qual_cool`}{Cool-leaning: navy, violet, plum, teal}
#' }
#'
#' @section Sequential (ordered/continuous data):
#' \describe{
#' \item{`seq_ember`}{Light to dark ember (9 stops)}
#' \item{`seq_navy`}{Light to dark navy (9 stops)}
#' \item{`seq_violet`}{Light to dark violet (9 stops)}
#' \item{`seq_paper_ink`}{Paper through ember/plum to ink (8 stops, good for heatmaps)}
#' }
#'
#' @section Diverging (data with a meaningful midpoint):
#' \describe{
#' \item{`div_navy_ember`}{Navy <-> paper <-> ember (9 stops)}
#' \item{`div_violet_ember`}{Violet <-> paper <-> ember (9 stops)}
#' }
#'
#' @export
#'
#' @examples
#' names(civilytics_palettes)
#' civilytics_palettes[["qual"]]
civilytics_palettes <- list(
# -- Qualitative --
qual = c(
"#22406A",
"#C25311",
"#6B3A5E",
"#3D2A6B",
"#A6271D",
"#1F6F70",
"#5A6A82"
),
qual_warm = c(
"#C25311",
"#A6271D",
"#923D00",
"#B8366B",
"#6B3A5E",
"#DB6C25",
"#3D2A6B"
),
qual_cool = c(
"#22406A",
"#3D2A6B",
"#6B3A5E",
"#1F6F70",
"#2E5590",
"#7556A8",
"#5A6A82"
),
# -- Sequential --
seq_ember = c(
"#FDF1E4", "#FBE0C6", "#F8C8A3", "#F2A976",
"#EA8A49", "#DB6C25", "#C25311", "#923D00", "#451A00"
),
seq_navy = c(
"#EEF3FA", "#DDE6F2", "#B3C6E0", "#7A9BCA",
"#4A74B0", "#2E5590", "#22406A", "#1A2E4A", "#0E1A2B"
),
seq_violet = c(
"#F1ECF8", "#DCD0EC", "#BDA8DA", "#9A7EC2",
"#7556A8", "#5C3A8A", "#3D2A6B", "#2A1B4D", "#19102E"
),
seq_paper_ink = c(
"#FAF7F2", "#F8C8A3", "#EA8A49", "#C25311",
"#A6271D", "#6B3A5E", "#3D2A6B", "#0E1A2B"
),
# -- Diverging --
div_navy_ember = c(
"#0E1A2B", "#22406A", "#4A74B0", "#B3C6E0",
"#FAF7F2",
"#F8C8A3", "#EA8A49", "#C25311", "#6B2B00"
),
div_violet_ember = c(
"#19102E", "#3D2A6B", "#7556A8", "#BDA8DA",
"#FAF7F2",
"#F8C8A3", "#EA8A49", "#C25311", "#6B2B00"
)
)
#' Get colors from a Civilytics palette
#'
#' Returns a character vector of hex codes from a named Civilytics palette.
#' For qualitative palettes, colors beyond the palette length recycle with a
#' warning. For sequential and diverging palettes, colors are interpolated
#' via [grDevices::colorRampPalette()].
#'
#' @param name Character. Palette name. See `names(civilytics_palettes)`.
#' @param n Integer or `NULL`. Number of colors to return. If `NULL`, returns
#' all defined stops.
#' @param reverse Logical. Reverse the palette order. Default `FALSE`.
#'
#' @return A character vector of hex color codes.
#' @export
#'
#' @examples
#' civilytics_palette() # all 7 qualitative colors
#' civilytics_palette("seq_navy", n = 5) # 5-stop navy ramp
#' civilytics_palette("div_navy_ember", n = 11, reverse = TRUE)
civilytics_palette <- function(name = "qual", n = NULL, reverse = FALSE) {
pal <- civilytics_palettes[[name]]
if (is.null(pal)) {
stop(
"'", name, "' is not a valid palette. Choose from: ",
paste(names(civilytics_palettes), collapse = ", "),
call. = FALSE
)
}
if (reverse) pal <- rev(pal)
if (is.null(n)) return(pal)
if (startsWith(name, "qual")) {
if (n > length(pal)) {
warning(
"Requested ", n, " colors from '", name, "' palette (max ",
length(pal), "); recycling.",
call. = FALSE
)
pal <- rep_len(pal, n)
}
return(pal[seq_len(n)])
}
grDevices::colorRampPalette(pal)(n)
}
#' Civilytics palette function (closure)
#'
#' Returns a closure `function(n)` suitable for passing to
#' [discrete_scale()] or similar scale constructors.
#'
#' @param name Character. Palette name. See `names(civilytics_palettes)`.
#' @param reverse Logical. Reverse the palette order. Default `FALSE`.
#'
#' @return A function that takes integer `n` and returns `n` hex color codes.
#' @export
#'
#' @examples
#' pal_fn <- civilytics_pal("qual")
#' pal_fn(4)
civilytics_pal <- function(name = "qual", reverse = FALSE) {
function(n) civilytics_palette(name, n = n, reverse = reverse)
}
#' Civilytics color scale for ggplot2
#'
#' Applies a Civilytics brand palette to the `colour` aesthetic.
#'
#' @param palette Character. Palette name. Defaults to `"qual"`.
#' @param discrete Logical. `TRUE` (default) for categorical data; `FALSE`
#' for a continuous gradient via [scale_color_gradientn()].
#' @param reverse Logical. Reverse the palette order. Default `FALSE`.
#' @param ... Additional arguments passed to the ggplot2 scale function.
#'
#' @return A ggplot2 scale object.
#' @export
#'
#' @examples
#' library(ggplot2)
#' ggplot(mpg, aes(displ, hwy, colour = class)) +
#' geom_point() +
#' scale_color_civilytics()
#'
#' ggplot(mpg, aes(displ, hwy, colour = cty)) +
#' geom_point() +
#' scale_color_civilytics("seq_navy", discrete = FALSE)
scale_color_civilytics <- function(palette = "qual", discrete = TRUE,
reverse = FALSE, ...) {
if (discrete) {
discrete_scale(
"colour",
palette = civilytics_pal(palette, reverse = reverse),
...
)
} else {
pal <- civilytics_palette(palette, reverse = reverse)
scale_color_gradientn(
colours = grDevices::colorRampPalette(pal)(256),
...
)
}
}
#' Civilytics fill scale for ggplot2
#'
#' Applies a Civilytics brand palette to the `fill` aesthetic.
#'
#' @param palette Character. Palette name. Defaults to `"qual"`.
#' @param discrete Logical. `TRUE` (default) for categorical data; `FALSE`
#' for a continuous gradient via [scale_fill_gradientn()].
#' @param reverse Logical. Reverse the palette order. Default `FALSE`.
#' @param ... Additional arguments passed to the ggplot2 scale function.
#'
#' @return A ggplot2 scale object.
#' @export
#'
#' @examples
#' library(ggplot2)
#' ggplot(mpg, aes(class, fill = class)) +
#' geom_bar() +
#' scale_fill_civilytics()
#'
#' ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
#' geom_tile() +
#' scale_fill_civilytics("seq_ember", discrete = FALSE)
scale_fill_civilytics <- function(palette = "qual", discrete = TRUE,
reverse = FALSE, ...) {
if (discrete) {
discrete_scale(
"fill",
palette = civilytics_pal(palette, reverse = reverse),
...
)
} else {
pal <- civilytics_palette(palette, reverse = reverse)
scale_fill_gradientn(
colours = grDevices::colorRampPalette(pal)(256),
...
)
}
}
+10 -9
View File
@@ -19,7 +19,7 @@
#' @return a numeric column of data #' @return a numeric column of data
#' @export #' @export
countCleanr <- function(x){ countCleanr <- function(x){
if(class(x) == "character"){ if ("character" %in% class(x)) {
x[x == "None not reported"] <- "0" x[x == "None not reported"] <- "0"
x[x == "Not applicable"] <- NA x[x == "Not applicable"] <- NA
x <- as.numeric(x) x <- as.numeric(x)
@@ -37,8 +37,6 @@ countCleanr <- function(x){
#' #'
#' @return the names of columns in the dataframe with one or more entries equal to "." #' @return the names of columns in the dataframe with one or more entries equal to "."
#' @export #' @export
#'
#' @examples
findDots <- function(data){ findDots <- function(data){
return(names(data)[lapply(data, countDots) > 0]) return(names(data)[lapply(data, countDots) > 0])
@@ -49,9 +47,8 @@ findDots <- function(data){
#' @param x a character vector #' @param x a character vector
#' #'
#' @return #' @return
#' An integer counting the number of "." occurences in a vector
#' @export #' @export
#'
#' @examples
countDots <- function(x){ countDots <- function(x){
len <- length(x[x == "." & !is.na(x)]) len <- length(x[x == "." & !is.na(x)])
totlen <- length(x) totlen <- length(x)
@@ -65,8 +62,6 @@ countDots <- function(x){
#' #'
#' @return a vector the same length as the input vector with clean names #' @return a vector the same length as the input vector with clean names
#' @export #' @export
#'
#' @examples
dbSafeNames <- function(names) { dbSafeNames <- function(names) {
names = gsub('[^a-z0-9]+','_',tolower(names)) names = gsub('[^a-z0-9]+','_',tolower(names))
names = make.names(names, unique = TRUE, allow_ = TRUE) names = make.names(names, unique = TRUE, allow_ = TRUE)
@@ -115,8 +110,14 @@ nvals <- function(x){
#' my_string <- c("Happy school", "Easy school", "cool School", "big school") #' my_string <- c("Happy school", "Easy school", "cool School", "big school")
#' simpleCap(my_string) #' simpleCap(my_string)
simpleCap <- function(x) { simpleCap <- function(x) {
stopifnot(class(x) == "character") stopifnot("character" %in% class(x))
s <- strsplit(x, " ")[[1]]
# Vectorised over elements of x — each element is capitalised independently.
# unname() strips names inherited from the input vector so the output
# matches the original scalar behaviour (no names attribute).
unname(vapply(x, function(word) {
s <- strsplit(word, " ")[[1]]
paste(toupper(substring(s, 1, 1)), substring(s, 2), paste(toupper(substring(s, 1, 1)), substring(s, 2),
sep = "", collapse = " ") sep = "", collapse = " ")
}, character(1)))
} }
+177
View File
@@ -0,0 +1,177 @@
#' Apply the Civilytics brand styling to a flextable
#'
#' Applies *only* the visual Civilytics brand to an already-structured
#' [flextable::flextable()] — header fill and color, body font and size,
#' zebra striping, borders, footer styling, and a fixed table layout. The
#' caller remains responsible for table *structure*: labels
#' ([flextable::set_header_labels()]), header/title lines
#' ([flextable::add_header_lines()]), column widths ([flextable::width()]),
#' alignment ([flextable::align()]), and footer text
#' ([flextable::add_footer_lines()]). This separation keeps styling reusable
#' across projects while leaving content decisions where they belong.
#'
#' `flextable`, `officer`, and `ragg` are Suggested (not Imported) to keep the
#' base install light, so this function errors with an install hint if
#' `flextable` is unavailable.
#'
#' @param ft A [flextable::flextable()] object.
#' @param header_bg Character. Header background fill. Default
#' `civilytics_colors[["navy_700"]]`.
#' @param header_color Character. Header text color. Default `"white"`.
#' @param title_fontsize Numeric. Font size for the first header line (the
#' title row, `i = 1`). Default `14`.
#' @param body_fontsize Numeric. Body font size. Default `11`.
#' @param font_name Character. Font family applied to all parts. Default
#' `"Arial"`.
#' @param zebra Logical. Apply alternating-row striping to even body rows.
#' Default `TRUE`. Safely skipped for tables with fewer than two body rows.
#' @param zebra_bg Character. Fill color for striped (even) body rows.
#' Default `civilytics_colors[["paper_2"]]`.
#' @param outer_border_color Character. Outer border color. Default
#' `civilytics_colors[["rule_strong"]]`.
#' @param outer_border_width Numeric. Outer border width. Default `1`.
#' @param inner_border_color Character. Inner horizontal border color (body).
#' Default `civilytics_colors[["rule"]]`.
#' @param inner_border_width Numeric. Inner horizontal border width. Default
#' `0.5`.
#' @param footer_fontsize Numeric. Footer font size (applied only if a footer
#' part exists). Default `9`.
#' @param footer_color Character. Footer text color. Default
#' `civilytics_colors[["ink_3"]]`.
#'
#' @return The styled [flextable::flextable()] object.
#' @export
#' @seealso [save_branded_flextable_png()] to export the styled table to a
#' logo-stamped PNG.
#' @examples
#' \dontrun{
#' library(flextable)
#' ft <- flextable(head(mtcars)) |>
#' add_header_lines("Motor Trend Cars") |>
#' add_footer_lines("Source: mtcars") |>
#' style_flextable_civilytics()
#' }
style_flextable_civilytics <- function(ft,
header_bg = civilytics_colors[["navy_700"]],
header_color = "white",
title_fontsize = 14,
body_fontsize = 11,
font_name = "Arial",
zebra = TRUE,
zebra_bg = civilytics_colors[["paper_2"]],
outer_border_color = civilytics_colors[["rule_strong"]],
outer_border_width = 1,
inner_border_color = civilytics_colors[["rule"]],
inner_border_width = 0.5,
footer_fontsize = 9,
footer_color = civilytics_colors[["ink_3"]]) {
if (!requireNamespace("flextable", quietly = TRUE)) {
stop("Install 'flextable' to use this function.", call. = FALSE)
}
if (!requireNamespace("officer", quietly = TRUE)) {
stop("Install 'officer' to use this function.", call. = FALSE)
}
# Header: navy fill, white bold text, larger title line.
ft <- flextable::bg(ft, bg = header_bg, part = "header")
ft <- flextable::color(ft, color = header_color, part = "header")
ft <- flextable::bold(ft, part = "header")
ft <- flextable::fontsize(ft, i = 1, size = title_fontsize, part = "header")
# Body: readable size, brand font across all parts.
ft <- flextable::fontsize(ft, size = body_fontsize, part = "body")
ft <- flextable::font(ft, fontname = font_name, part = "all")
# Zebra striping on even body rows, guarded for tables with < 2 rows.
nrow_body <- flextable::nrow_part(ft, part = "body")
if (zebra && nrow_body >= 2) {
ft <- flextable::bg(ft, i = seq(2, nrow_body, 2), bg = zebra_bg,
part = "body")
}
# Borders: outer frame on all parts, light horizontal rules in the body.
ft <- flextable::border_outer(
ft,
border = officer::fp_border(color = outer_border_color,
width = outer_border_width),
part = "all"
)
ft <- flextable::border_inner_h(
ft,
border = officer::fp_border(color = inner_border_color,
width = inner_border_width),
part = "body"
)
# Footer styling — only if the table actually has a footer part.
if (flextable::nrow_part(ft, part = "footer") > 0) {
ft <- flextable::fontsize(ft, size = footer_fontsize, part = "footer")
ft <- flextable::color(ft, color = footer_color, part = "footer")
}
flextable::set_table_properties(ft, layout = "fixed")
}
#' Save a branded flextable to a logo-stamped PNG
#'
#' Exports a styled [flextable::flextable()] to a PNG via
#' [ragg::agg_png()] (sized to the table's own dimensions plus a little
#' headroom for the logo), then optionally stamps the Civilytics logo onto the
#' file with [stamp_logo_png()] so file-based tables stay visually consistent
#' with [civilytics_logo()]-branded plots.
#'
#' `ragg` and `flextable` are Suggested (not Imported); this function errors
#' with an install hint if either is unavailable.
#'
#' @param ft A [flextable::flextable()] object, typically already styled with
#' [style_flextable_civilytics()].
#' @param path Character. Output PNG path. Returned invisibly.
#' @param logo Logical. Stamp the Civilytics logo onto the saved PNG via
#' [stamp_logo_png()]. Default `TRUE`.
#' @param res Numeric. Output resolution in PPI passed to [ragg::agg_png()].
#' Default `300`.
#' @param extra_height Numeric. Additional height in inches added to the
#' table's natural height to leave room for the stamped logo. Default `0.4`.
#' @param ... Additional arguments forwarded to [stamp_logo_png()] (e.g.
#' `type`, `variant`, `position`, `width_frac`, `margin_frac`).
#'
#' @return `path`, invisibly.
#' @export
#' @seealso [style_flextable_civilytics()] to apply the brand styling, and
#' [stamp_logo_png()] for the underlying logo compositing.
#' @examples
#' \dontrun{
#' library(flextable)
#' ft <- flextable(head(mtcars)) |>
#' add_footer_lines("Source: mtcars") |>
#' style_flextable_civilytics()
#' save_branded_flextable_png(ft, "table.png")
#' save_branded_flextable_png(ft, "table.png", position = "bottom-left")
#' knitr::include_graphics("table.png")
#' }
save_branded_flextable_png <- function(ft, path, logo = TRUE, res = 300,
extra_height = 0.4, ...) {
if (!requireNamespace("flextable", quietly = TRUE)) {
stop("Install 'flextable' to use this function.", call. = FALSE)
}
if (!requireNamespace("ragg", quietly = TRUE)) {
stop("Install 'ragg' to use this function.", call. = FALSE)
}
d <- flextable::flextable_dim(ft)
ragg::agg_png(path, width = d$width, height = d$height + extra_height,
units = "in", res = res)
on.exit(grDevices::dev.off(), add = TRUE)
plot(ft)
if (logo) {
# dev.off() must run before stamp_logo_png() re-reads the file. Flush the
# device now and clear the on.exit handler so it does not fire twice.
grDevices::dev.off()
on.exit()
stamp_logo_png(path, ...)
}
invisible(path)
}
+85
View File
@@ -0,0 +1,85 @@
# Font family name constants used as defaults in theme functions.
# These match the --cv-font-* CSS custom properties on www.civilytics.com.
CV_FONT_DISPLAY <- "Libre Franklin" # headings / display text
CV_FONT_SANS <- "Inter" # axis text, legends, UI elements
CV_FONT_SERIF <- "Source Serif 4" # body prose / editorial long-form
CV_FONT_MONO <- "JetBrains Mono" # code, data tables, numeric callouts
# Mutable package state held in an environment so the binding itself stays
# locked (R locks all namespace bindings at load time) while the contents
# remain writable. See https://adv-r.hadley.nz/environments.html#environments-as-containers
.cv_state <- new.env(parent = emptyenv())
.cv_state$fonts_loaded <- FALSE
#' Load Civilytics brand fonts
#'
#' Downloads Inter, Libre Franklin, Source Serif 4 and JetBrains Mono from
#' Google Fonts via [sysfonts::font_add_google()], then, unless
#' `showtext = FALSE`, calls [showtext::showtext_auto()] so that all graphics
#' devices render text with those fonts. This is called automatically when the
#' package loads; use this function to retry if the initial load failed (e.g.,
#' the machine was offline at load time).
#'
#' Subsequent calls within the same session are no-ops unless `force = TRUE`.
#'
#' **Using ragg.** [showtext::showtext_auto()] draws text at 96 dpi whatever the
#' device resolution, so on a `ragg::agg_png(res = 300)` device text comes out
#' at about a third of its requested size. For ragg, set
#' `options(civilytics.showtext = FALSE)` before loading the package, or call
#' `showtext::showtext_auto(FALSE)` afterwards. The brand fonts must then be
#' installed on the system, because ragg reads system fonts rather than the
#' ones registered through sysfonts.
#'
#' @param force Logical. If `TRUE`, reload fonts even if they were already
#' loaded in this session. Default `FALSE`.
#' @param showtext Logical. Turn on [showtext::showtext_auto()] after
#' registering the fonts. Default is `getOption("civilytics.showtext", TRUE)`.
#'
#' @return Invisibly returns `TRUE` if fonts were loaded, `FALSE` if skipped
#' (already loaded and `force = FALSE`).
#' @export
#'
#' @examples
#' \dontrun{
#' civilytics_load_fonts()
#'
#' # For ragg devices: register the fonts but leave showtext off
#' civilytics_load_fonts(force = TRUE, showtext = FALSE)
#' }
civilytics_load_fonts <- function(force = FALSE,
showtext = getOption("civilytics.showtext", TRUE)) {
if (!is.logical(showtext) || length(showtext) != 1L || is.na(showtext)) {
stop("`showtext` must be a single TRUE or FALSE.", call. = FALSE)
}
if (.cv_state$fonts_loaded && !force) return(invisible(FALSE))
sysfonts::font_add_google("Inter", family = "Inter")
sysfonts::font_add_google("Libre Franklin", family = "Libre Franklin")
sysfonts::font_add_google("Source Serif 4", family = "Source Serif 4")
sysfonts::font_add_google("JetBrains Mono", family = "JetBrains Mono")
if (showtext) showtext::showtext_auto()
.cv_state$fonts_loaded <- TRUE
invisible(TRUE)
}
.onLoad <- function(libname, pkgname) {
tryCatch(
civilytics_load_fonts(),
error = function(e) {
# Store the failure so .onAttach can surface a message to the user.
options(.civilytics_fonts_failed = TRUE)
}
)
}
.onAttach <- function(libname, pkgname) {
if (isTRUE(getOption(".civilytics_fonts_failed"))) {
packageStartupMessage(
"[civilytics] Brand fonts (Inter, Libre Franklin, Source Serif 4, ",
"JetBrains Mono) could not be loaded from Google Fonts. ",
"Charts will fall back to system fonts. ",
"Call civilytics_load_fonts() once you have an internet connection."
)
}
}
+52
View File
@@ -0,0 +1,52 @@
# Join utilities
#' Test the join between two sets of identifiers
#'
#' @param x A vector of identifiers to check against `y`.
#' @param y A vector of identifiers to look for a match in.
#' @param distinct Logical. Should duplicate values of `x` and `y` be removed
#' before testing? Default is `TRUE`.
#'
#' @return Invisibly returns `NULL`; prints a formatted summary of match
#' statistics to the console via [writeLines()].
#' @export
#'
#' @examples
#' x <- LETTERS
#' y <- c(letters, LETTERS)
#' match_test(x, y)
match_test <- function(x, y, distinct = TRUE) {
if (distinct) {
x <- unique(x)
y <- unique(y)
}
# TODO: DO not report 100% if there is even 1 mismatch
xiny <- sum(x %in% y)
total_x <- length(x)
pct_x <- round(100 * xiny / total_x, 2)
yinx <- sum(y %in% x)
total_y <- length(y)
pct_y <- round(100 * yinx / total_y, 2)
header <- if (distinct) "Distinct Matches" else "All Values"
lines <- c(
paste0("**** ", header, " ****"),
"",
"X in Y",
sprintf("Of the %d X values, %d (%s%%) were matched.",
total_x, xiny, format(pct_x, nsmall = 2)),
strrep("*", 40),
"",
"Y in X",
sprintf("Of the %d Y values, %d (%s%%) were matched.",
total_y, yinx, format(pct_y, nsmall = 2)),
strrep("*", 38)
)
writeLines(lines)
invisible(NULL)
}
+339 -58
View File
@@ -9,11 +9,14 @@
#' @importFrom jpeg readJPEG #' @importFrom jpeg readJPEG
#' @importFrom graphics rasterImage #' @importFrom graphics rasterImage
#' @examples #' @examples
#' img <- system.file("img","Civilytics Consulting Logo.jpg",package="civilytics") #' \dontrun{
#' # Supply a path to your own JPEG file
#' img <- "my_photo.jpg"
#' plot_jpeg(img) #' plot_jpeg(img)
#' }
plot_jpeg <- function(path, add=FALSE, upscale = TRUE) plot_jpeg <- function(path, add=FALSE, upscale = TRUE)
{ {
jpg = readJPEG(path, native = T) # read the file jpg = readJPEG(path, native = TRUE) # read the file
res = dim(jpg)[2:1] # get the resolution, [x, y] res = dim(jpg)[2:1] # get the resolution, [x, y]
if (upscale){ if (upscale){
res <- res * 3 res <- res * 3
@@ -30,13 +33,10 @@ plot_jpeg <- function(path, add=FALSE, upscale = TRUE)
#' #'
#' @param filename a character with file path to a png file #' @param filename a character with file path to a png file
#' #'
#' @return #' @return a plotted rasteGrob of a png image
#' @export #' @export
#' @importFrom png readPNG #' @importFrom png readPNG
#' @importFrom grid rasterGrob #' @importFrom grid rasterGrob
#'
#' @examples
#'
get_png <- function(filename) { get_png <- function(filename) {
grid::rasterGrob(png::readPNG(filename), interpolate = TRUE) grid::rasterGrob(png::readPNG(filename), interpolate = TRUE)
} }
@@ -44,34 +44,78 @@ get_png <- function(filename) {
#' Add a logo to a ggplot2 object #' Add a logo to a ggplot2 object
#' #'
#' @param plot a ggplot2 grob #' The logo gets its own band of reserved height (`logo_height`, in inches)
#' @param logo a logo grob created by make_logo_grob() #' below or above the plot, so it cannot overlap the plot's caption or push
#' @param margin_param a numeric specifying what margin to add or subtract to align the logo #' anything off the canvas. Patchwork compositions are converted with
#' [patchwork::patchworkGrob()] so every panel and the
#' [patchwork::plot_annotation()] survive.
#' #'
#' @return #' @param plot a ggplot2 object, or a patchwork composition
#' @param logo a logo grob created by make_logo_grob()
#' @param margin_param Optional numeric. Replaces the plot margin (in points)
#' on the side next to the logo. `NULL` (default) leaves the plot's margins
#' alone.
#' @param font_scale Numeric. Multiplicative scaling factor applied to the
#' base text size before composing. Default `1` leaves typography unchanged.
#' @param position Character. Corner placement for the logo: `"bottom-right"`
#' (default), `"bottom-left"`, `"top-right"`, or `"top-left"`. Controls
#' whether the logo is placed above or below the plot.
#' @param logo_height Numeric. Height in inches of the band reserved for the
#' logo. Default `0.5`.
#'
#' @return a grob with a logo attached to it ready to plot
#' @importFrom ggplot2 theme #' @importFrom ggplot2 theme
#' @importFrom gridExtra arrangeGrob #' @importFrom gridExtra arrangeGrob
#' @export #' @export
#' add_logo <- function(plot, logo, margin_param = NULL, font_scale = 1,
#' @examples position = c("bottom-right", "bottom-left",
add_logo <- function(plot, logo, margin_param = NULL) { "top-right", "top-left"),
if(has_caption(plot)) { logo_height = 0.5) {
# convert the caption size to a negative number and on the "pt" scale position <- match.arg(position)
# p1$theme$plot.caption$size * 1.1 at_top <- grepl("top", position)
# Count the number of lines, which is this + 1 is_patchwork <- inherits(plot, "patchwork")
# For each line, we can add a certain negative space to align the logo
cap_lines <- measure_caption(plot) # Capture the plot's background color so we can fill the entire composed
if (!is.null(margin_param)) { # grob with it. The logo grob stays transparent (theme_void).
plot <- plot + theme(plot.margin = unit(c(7, 7, margin_param, 7), "pt")) bg_fill <- plot$theme$plot.background$fill
} else {
plot <- plot + theme(plot.margin = unit(c(7, 7, cap_lines * -52, 7), "pt")) if (!is.null(font_scale) && font_scale != 1) {
} base_size <- plot$theme$text$size
} else { if (is.null(base_size)) base_size <- 14
plot <- plot + theme(plot.margin = unit(c(7, 7, -14, 7), "pt")) scaled <- theme(text = ggplot2::element_text(size = base_size * font_scale))
plot <- if (is_patchwork) plot & scaled else plot + scaled
} }
arrangeGrob(plot, logo, heights = c(0.93, 0.1), if (!is.null(margin_param)) {
padding = unit(0.1, "line")) side <- if (at_top) c(margin_param, 7, 7, 7) else c(7, 7, margin_param, 7)
margin <- theme(plot.margin = grid::unit(side, "pt"))
plot <- if (is_patchwork) plot & margin else plot + margin
}
# ggplot_build() on a patchwork builds only its last panel, so convert it
# explicitly before handing it to arrangeGrob().
plot_grob <- if (is_patchwork) patchwork::patchworkGrob(plot) else plot
plot_height <- grid::unit(1, "null")
band_height <- grid::unit(logo_height, "in")
composed <- if (at_top) {
arrangeGrob(logo, plot_grob, heights = grid::unit.c(band_height, plot_height),
padding = grid::unit(0.1, "line"))
} else {
arrangeGrob(plot_grob, logo,
heights = grid::unit.c(plot_height, band_height),
padding = grid::unit(0.1, "line"))
}
# Wrap with a full-bleed background rect so any transparent areas (the
# logo strip, padding gaps) pick up the plot's background color instead
# of the device default (white).
if (!is.null(bg_fill) && !is.na(bg_fill)) {
bg_rect <- grid::rectGrob(gp = grid::gpar(fill = bg_fill, col = NA))
grid::grobTree(bg_rect, composed)
} else {
composed
}
} }
#' Measure a ggplot2 object caption #' Measure a ggplot2 object caption
@@ -84,8 +128,8 @@ add_logo <- function(plot, logo, margin_param = NULL) {
#' @export #' @export
#' #'
#' @examples #' @examples
#' p1 <- qplot(mpg, wt, data = mtcars) #' p1 <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
#' measure_caption(p1) # Should equal 1 since no caption is required #' measure_caption(p1) # Should equal 1 since no caption is present
measure_caption <- function(gg) { measure_caption <- function(gg) {
if (has_caption(gg)) { if (has_caption(gg)) {
stringr::str_count(gg$labels$caption, pattern = "\n") + 1 stringr::str_count(gg$labels$caption, pattern = "\n") + 1
@@ -104,21 +148,26 @@ measure_caption <- function(gg) {
#' @export #' @export
#' #'
#' @examples #' @examples
#' p1 <- ggplot2::qplot(mpg, wt, data = mtcars) #' p1 <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
#' has_caption(p1) # FALSE #' has_caption(p1) # FALSE
has_caption <- function(gg) { has_caption <- function(gg) {
any(names(gg$labels) == "caption") any(names(gg$labels) == "caption")
} }
#' Add a logo to a ggplot2 object #' Add a logo to multiple ggplot2 objects
#' #'
#' @param plot_list a list containing ggplot2 objects #' @param plot_list a list containing ggplot2 objects
#' @param logo a grob containing the logo created with `make_logo_grob` #' @param logo a grob containing the logo created with `make_logo_grob`
#' @param nrow an integer, default = 1, for the number of rows to align the plots in #' @param nrow an integer, default = 1, for the number of rows to align the plots in
#' @param widths an optional vector the same length as plot_list with the widths for each plot #' @param widths an optional vector the same length as plot_list with the widths for each plot
#' @param margin_param a number giving the adjustment up or down to help manually align logo and captions #' @param margin_param Optional number. Replaces the bottom plot margin (in points).
#' `NULL` (default) leaves plot margins alone.
#' @param font_scale Numeric. Multiplicative scaling factor applied to text
#' sizes before composing. Default `1`. See [add_logo()] for details.
#' @param logo_height Numeric. Height in inches of the band reserved for the
#' logo below the plots. Default `0.5`.
#' #'
#' @return #' @return a grid object
#' @note The resulting object needs to be drawn to the screen using grid.draw() #' @note The resulting object needs to be drawn to the screen using grid.draw()
#' @importFrom gridExtra arrangeGrob #' @importFrom gridExtra arrangeGrob
#' @importFrom ggplot2 theme #' @importFrom ggplot2 theme
@@ -126,53 +175,285 @@ has_caption <- function(gg) {
#' @export #' @export
#' #'
#' @examples #' @examples
#' \dontrun{
#' library(ggplot2); library(grid) #' library(ggplot2); library(grid)
#' tmp_plot <- ggplot(mtcars) + aes(x = hp, y = disp) + geom_point() + theme_civilytics() #' tmp_plot <- ggplot(mtcars) + aes(x = hp, y = disp) + geom_point() + theme_civilytics()
#' tmp_logo <- make_logo_grob() #' tmp_logo <- make_logo_grob()
#' plot_and_logo <- add_logo(tmp_plot, tmp_logo) #' plot_and_logo <- add_logo(tmp_plot, tmp_logo)
#' grid.draw(plot_and_logo) #' grid.draw(plot_and_logo)
#' dev.off() #' dev.off()
add_logo_ga <- function(plot_list, logo, nrow = 1, widths = NULL, margin_param = NULL) { #' }
# Change position of logo depending on if plot has a caption add_logo_ga <- function(plot_list, logo, nrow = 1, widths = NULL,
margin_param = NULL, font_scale = 1,
logo_height = 0.5) {
# Capture the background color from the first plot
bg_fill <- plot_list[[1]]$theme$plot.background$fill
if (!is.null(font_scale) && font_scale != 1) {
plot_list <- lapply(plot_list, function(p) {
base_size <- p$theme$text$size %||% 14
p + theme(
text = element_text(size = base_size * font_scale)
)
})
}
# The logo has its own band below the plots, so no margin adjustment is
# needed. `margin_param` still replaces the bottom margin when given.
if (!is.null(margin_param)) { if (!is.null(margin_param)) {
margin <- theme(plot.margin = unit(c(7, 7, margin_param, 7), "pt")) margin <- theme(plot.margin = unit(c(7, 7, margin_param, 7), "pt"))
} else if (any(unlist(lapply(plot_list, has_caption)))) {
cap_lines <- measure_caption(plot_list[[1]]) # measure caption in first plot
margin <- theme(plot.margin = unit(c(7, 7, -7 * sqrt(cap_lines), 7), "pt"))
} else {
margin <- theme(plot.margin = unit(c(7, 7, 7, 7), "pt"))
}
if (nrow > 1) { if (nrow > 1) {
len <- length(plot_list) len <- length(plot_list)
plot_list[[len]] <- plot_list[[len]] + margin plot_list[[len]] <- plot_list[[len]] + margin
} else { } else {
plot_list <- lapply(plot_list, "+", margin) plot_list <- lapply(plot_list, "+", margin)
} }
if (nrow != 1) {
hold <- arrangeGrob(grobs = plot_list, nrow = nrow, ncol = 1, widths = widths)
} else {
hold <- arrangeGrob(grobs = plot_list, nrow = 1, ncol = 2, widths = widths)
} }
arrangeGrob(hold, logo, heights = c(0.93, .07)) if (nrow != 1) {
if (!is.null(widths)) warning("`widths` is ignored when `nrow > 1`")
hold <- arrangeGrob(grobs = plot_list, nrow = nrow, ncol = 1)
} else {
hold <- arrangeGrob(grobs = plot_list, nrow = 1, ncol = length(plot_list), widths = widths)
}
composed <- arrangeGrob(
hold, logo,
heights = grid::unit.c(grid::unit(1, "null"), grid::unit(logo_height, "in"))
)
if (!is.null(bg_fill) && !is.na(bg_fill)) {
bg_rect <- grid::rectGrob(gp = grid::gpar(fill = bg_fill, col = NA))
grid::grobTree(bg_rect, composed)
} else {
composed
}
} }
#' Get a Civilytics Logo grob #' Get a Civilytics Logo grob
#' #'
#' @return a gg object which contains the logo file stored as a Grob suitable for manipulating in #' Returns a ggplot object containing the Civilytics logo as a rasterGrob,
#' grid #' ready to compose with plots via [add_logo()], [add_logo_ga()], or the
#' pipe-friendly [civilytics_logo()].
#'
#' @param type Character. `"wordmark"` (default) uses the full wordmark.
#' `"mark"` uses the compact C-pulse icon only.
#' @param variant Character. `"light"` (default) uses the dark logo for light
#' backgrounds. `"dark"` uses the reverse (light) logo for dark backgrounds
#' (pairs with [theme_civilytics_dark()]).
#' @param position Character. Corner placement for the logo: `"bottom-right"`
#' (default), `"bottom-left"`, `"top-right"`, or `"top-left"`. Controls
#' horizontal alignment of the logo grob.
#'
#' @return A ggplot object (class `"gg"`) containing the logo grob.
#' @export #' @export
#' @import ggplot2 #' @importFrom ggplot2 ggplot theme_void annotation_custom
#' @examples #' @examples
#' logo <- make_logo_grob() #' logo <- make_logo_grob() # wordmark, light
#' class(logo) # gg #' logo <- make_logo_grob("mark", "dark") # mark, dark
make_logo_grob <- function() { #' logo <- make_logo_grob(position = "bottom-left") # left-aligned
logo_grob <- ggplot(mapping = aes(x = 0:1, y = 1)) + #' class(logo) # "gg" "ggplot"
make_logo_grob <- function(type = c("wordmark", "mark"),
variant = c("light", "dark"),
position = c("bottom-right", "bottom-left",
"top-right", "top-left")) {
type <- match.arg(type)
variant <- match.arg(variant)
position <- match.arg(position)
img_file <- switch(
paste(type, variant, sep = "_"),
wordmark_light = "civilytics-wordmark.png",
wordmark_dark = "civilytics-wordmark-reverse.png",
mark_light = "civilytics-mark.png",
mark_dark = "civilytics-mark-reverse.png"
)
align_left <- grepl("left", position)
# Give the raster a height only, so grid derives its width from the image's
# own aspect ratio, then pin it to the corner. The logo is the same shape on
# any canvas width.
logo <- grid::rasterGrob(
png::readPNG(system.file("img", img_file, package = "civilytics")),
x = if (align_left) grid::unit(7, "pt") else grid::unit(1, "npc") - grid::unit(7, "pt"),
just = if (align_left) "left" else "right",
height = grid::unit(1, "npc"),
interpolate = TRUE
)
ggplot() +
theme_void() + theme_void() +
annotation_custom(get_png(system.file("img", "civilytics_logo.png", annotation_custom(logo, xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf)
package="civilytics")), xmin= 0.7, xmax = 1)
logo_grob
} }
#' Add a Civilytics logo to a ggplot (pipe-friendly)
#'
#' A convenience wrapper that creates the logo grob and attaches it to a
#' corner of the plot in one call. Designed for use with the base pipe `|>`.
#'
#' **Important:** R's `|>` has *higher* precedence than `+`, so you must
#' wrap the ggplot chain in parentheses before piping:
#'
#' ```
#' (ggplot(mpg, aes(displ, hwy)) +
#' geom_point() +
#' theme_civilytics()) |>
#' civilytics_logo()
#' ```
#'
#' @param plot A ggplot object.
#' @param type Character. `"wordmark"` (default) or `"mark"`. Passed to
#' [make_logo_grob()].
#' @param variant Character. `"light"` (default) or `"dark"`. Passed to
#' [make_logo_grob()].
#' @param position Character. Corner placement for the logo: `"bottom-right"`
#' (default), `"bottom-left"`, `"top-right"`, or `"top-left"`.
#' @param margin_param Numeric or `NULL`. Manual margin adjustment passed to
#' [add_logo()].
#' @param font_scale Numeric. Multiplies the plot's base text size before
#' composing. Default `1` leaves typography unchanged.
#' @param logo_height Numeric. Height in inches of the band reserved for the
#' logo. Default `0.5`.
#'
#' @return A grob (from [gridExtra::arrangeGrob()]) ready to draw with
#' [grid::grid.draw()].
#' @export
#'
#' @examples
#' \dontrun{
#' library(ggplot2); library(grid)
#'
#' # Pipe usage — parentheses required around the ggplot chain
#' (ggplot(mpg, aes(displ, hwy)) +
#' geom_point() +
#' theme_civilytics()) |>
#' civilytics_logo() |>
#' grid.draw()
#'
#' # Top-right placement
#' (ggplot(mpg, aes(displ, hwy)) +
#' geom_point() +
#' theme_civilytics()) |>
#' civilytics_logo(position = "top-right") |>
#' grid.draw()
#'
#' # Bottom-left with mark
#' (ggplot(mpg, aes(displ, hwy)) +
#' geom_point() +
#' theme_civilytics()) |>
#' civilytics_logo(type = "mark", position = "bottom-left") |>
#' grid.draw()
#'
#' # Dark theme with mark in top-left
#' (ggplot(mpg, aes(displ, hwy)) +
#' geom_point() +
#' theme_civilytics_dark()) |>
#' civilytics_logo(variant = "dark", type = "mark",
#' position = "top-left") |>
#' grid.draw()
#' }
civilytics_logo <- function(plot,
type = c("wordmark", "mark"),
variant = c("light", "dark"),
position = c("bottom-right", "bottom-left",
"top-right", "top-left"),
margin_param = NULL,
font_scale = 1,
logo_height = 0.5) {
position <- match.arg(position)
logo <- make_logo_grob(type = type, variant = variant, position = position)
add_logo(plot, logo, margin_param = margin_param, font_scale = font_scale,
position = position, logo_height = logo_height)
}
#' Stamp the Civilytics logo onto a saved raster (PNG) image
#'
#' The raster analogue of [civilytics_logo()] for outputs that are already
#' rendered to a file rather than held as a ggplot/grob — e.g. a `flextable`
#' exported to PNG, or any `grDevices::png()` / `ragg::agg_png()` output.
#' Resolves the *same* brand asset that [make_logo_grob()] uses, so file-based
#' tables stay visually consistent with logo-branded plots, and composites it
#' into a corner of the image. Pure base-graphics + grid + png — no new
#' package dependencies.
#'
#' @param path Character. Path to the PNG to stamp. The file is overwritten
#' in place at its original pixel dimensions.
#' @param type Character. `"wordmark"` (default) or `"mark"`. As in
#' [make_logo_grob()].
#' @param variant Character. `"light"` (default, dark logo for light
#' backgrounds) or `"dark"` (reverse logo for dark backgrounds).
#' @param position Character. Corner placement: `"bottom-right"` (default),
#' `"bottom-left"`, `"top-right"`, or `"top-left"`.
#' @param width_frac Numeric. Logo width as a fraction of the image width
#' (default `0.15`). Height follows from the logo's aspect ratio.
#' @param margin_frac Numeric. Padding from the edges as a fraction of the
#' image width (default `0.02`).
#'
#' @return `path`, invisibly.
#' @export
#' @importFrom png readPNG
#' @importFrom grid grid.newpage grid.raster
#' @importFrom grDevices png dev.off
#' @examples
#' \dontrun{
#' # Brand a table exported to PNG so it matches civilytics_logo()-branded plots
#' ragg::agg_png("table.png", width = 8, height = 4, units = "in", res = 200)
#' plot(flextable::flextable(head(mtcars)))
#' dev.off()
#' stamp_logo_png("table.png") # wordmark, bottom-right
#' stamp_logo_png("table.png", type = "mark", position = "bottom-left")
#' }
stamp_logo_png <- function(path,
type = c("wordmark", "mark"),
variant = c("light", "dark"),
position = c("bottom-right", "bottom-left",
"top-right", "top-left"),
width_frac = 0.15,
margin_frac = 0.02) {
type <- match.arg(type)
variant <- match.arg(variant)
position <- match.arg(position)
stopifnot(file.exists(path))
# Same asset selection as make_logo_grob() so files match branded plots.
img_file <- switch(
paste(type, variant, sep = "_"),
wordmark_light = "civilytics-wordmark.png",
wordmark_dark = "civilytics-wordmark-reverse.png",
mark_light = "civilytics-mark.png",
mark_dark = "civilytics-mark-reverse.png"
)
logo_path <- system.file("img", img_file, package = "civilytics")
if (!nzchar(logo_path)) {
stop("Civilytics logo asset not found in the 'civilytics' package: ", img_file)
}
base_img <- png::readPNG(path) # height x width x channels, values in [0, 1]
logo_img <- png::readPNG(logo_path)
h <- dim(base_img)[1]
w <- dim(base_img)[2]
aspect <- dim(logo_img)[1] / dim(logo_img)[2] # logo height / width
# Sizes/margins are expressed relative to image WIDTH, then converted to the
# device's npc units (which scale with the viewport's own width and height).
lw <- width_frac
lh <- width_frac * aspect * (w / h)
mx <- margin_frac
my <- margin_frac * (w / h)
x <- if (grepl("right", position)) 1 - mx else mx
y <- if (grepl("top", position)) 1 - my else my
just <- c(if (grepl("right", position)) "right" else "left",
if (grepl("top", position)) "top" else "bottom")
grDevices::png(path, width = w, height = h, units = "px")
on.exit(grDevices::dev.off(), add = TRUE)
grid::grid.newpage()
grid::grid.raster(base_img, width = 1, height = 1, interpolate = FALSE)
grid::grid.raster(logo_img, x = x, y = y, width = lw, height = lh,
just = just, interpolate = TRUE)
invisible(path)
}
+153
View File
@@ -0,0 +1,153 @@
#' Send a CLI beep / desktop notification
#'
#' Plays an audible beep in the terminal and/or sends a desktop notification
#' when a long-running R script completes or reaches a milestone.
#'
#' @param msg Character. Optional message to include in the notification.
#' When `type = "notify"`, this becomes the notification body.
#' @param type Character. Notification method:
#' - `"beep"` (default): emit a terminal bell character (`\007`).
#' Works in any terminal that supports the bell.
#' - `"notify"`: send a desktop notification via `notify-send` (Linux) or
#' `osascript` (macOS). Falls back to `"beep"` if neither tool is found.
#' - `"webhook"`: POST a JSON payload to a URL. Requires `url` argument.
#' - `"all"`: play beep + send desktop notification (webhook only if `url`
#' is provided).
#' @param url Character. Webhook URL for `type = "webhook"` or `"all"`.
#' A JSON payload is POSTed with keys `message`, `status`, and `timestamp`.
#' @param status Character. Status label for the notification (default `"done"`).
#' Used in the notification title and webhook payload.
#' @param timeout Numeric. Seconds to wait for the webhook POST to complete
#' (default `5`). Ignored for non-webhook types.
#' @param quiet Logical. If `TRUE`, suppress the terminal beep even when
#' `type` includes `"beep"`. Useful for silent background runs.
#'
#' @return Invisible `NULL`.
#'
#' @section Requirements:
#' - `type = "notify"` requires `notify-send` (Linux) or `osascript` (macOS).
#' - `type = "webhook"` requires network access to the provided URL.
#'
#' @section Examples:
#' \preformatted{
#' # Simple terminal beep
#' beep()
#'
#' # Desktop notification with message
#' beep("Analysis complete!", type = "notify")
#'
#' # Send to a webhook (e.g., Slack, Discord, custom endpoint)
#' beep("Job finished", type = "webhook",
#' url = "https://hooks.slack.com/services/...")
#'
#' # Beep + desktop notification
#' beep("Processing done", type = "all")
#' }
#'
#' @export
#'
beep <- function(msg = "done",
type = c("beep", "notify", "webhook", "all"),
url = NULL,
status = "done",
timeout = 5,
quiet = FALSE) {
type <- match.arg(type)
# -- Terminal beep ----------------------------------------------------------
if (!quiet && grepl("beep", type)) {
cat("\007")
flush.console()
}
# -- Desktop notification ---------------------------------------------------
if (grepl("notify", type)) {
.send_desktop_notify(msg, status)
}
# -- Webhook ----------------------------------------------------------------
if (grepl("webhook", type) && !is.null(url)) {
.send_webhook(url, msg, status, timeout)
}
invisible(NULL)
}
# -- Internal helpers ---------------------------------------------------------
#' Send a desktop notification via notify-send or osascript
#'
#' @param msg Message body
#' @param status Status label for the title
#' @keywords internal
.send_desktop_notify <- function(msg, status) {
# Linux: notify-send
if (.has_command("notify-send")) {
system2("notify-send", args = c(status, msg),
stdout = TRUE, stderr = TRUE)
return(invisible(NULL))
}
# macOS: osascript
if (.has_command("osascript")) {
system2("osascript",
args = c("-e",
paste0("display notification \"", msg,
"\" with title \"", status, "\"")),
stdout = TRUE, stderr = TRUE)
return(invisible(NULL))
}
# Neither tool available — silently skip
invisible(NULL)
}
#' POST a JSON payload to a webhook URL
#'
#' @param url Webhook URL
#' @param msg Message body
#' @param status Status label
#' @param timeout Seconds to wait for the request
#' @keywords internal
.send_webhook <- function(url, msg, status, timeout) {
payload <- jsonlite::toJSON(list(
message = msg,
status = status,
timestamp = format(Sys.time(), "%Y-%m-%dT%H:%M:%S%z")
), auto_unbox = TRUE)
# Use curl via system2() for maximum compatibility (no extra R deps).
# system2() passes arguments directly to the executable without shell
# interpolation, avoiding command injection.
if (.has_command("curl")) {
system2("curl",
args = c("-s", "-X", "POST",
"-H", "Content-Type: application/json",
"-d", payload,
url,
"--max-time", as.character(timeout)),
stdout = TRUE, stderr = TRUE)
} else if (.has_command("wget")) {
system2("wget",
args = c("-q", "-O", "/dev/null",
paste0("--post-data=", payload),
paste0("--header=Content-Type: application/json"),
paste0("--timeout=", timeout),
url),
stdout = TRUE, stderr = TRUE)
}
invisible(NULL)
}
#' Check if a command exists on the system PATH
#'
#' @param cmd Command name
#' @return Logical
#' @keywords internal
.has_command <- function(cmd) {
Sys.which(cmd) != ""
}
+92
View File
@@ -0,0 +1,92 @@
# https://github.com/cran/binom/blob/master/R/binom.confint.R
# Consider importing and crediting this code ^^
# https://towardsdatascience.com/five-confidence-intervals-for-proportions-that-you-should-know-about-7ff5484c024f
# https://andrewpwheeler.com/2020/11/30/confidence-intervals-around-proportions/
#' Get a simple Clopper Pearson interval
#'
#' @param num number of successes
#' @param den number of trials
#' @param conf.level default 0.95, set the confidence interval to return
#'
#' @return three values forming the upper and lower bounds of the confidence region and the true value
#' @export
clopper_pearson <- function(num, den, conf.level = 0.95) {
# Same results as binom.test in base R
quant <- (1 - conf.level) / 2
low <- qbeta(quant, num, den-num+1)
hi <- qbeta(1-quant, num+1, den-num)
obs <- num/den
return(c("low" = low, "observed" = obs,"high" = hi))
}
# z_gap_test_v <- Vectorize(z_gap_test,
# SIMPLIFY = TRUE)# we only want to return a scalar
#z_gap_test(a_prop = 0.051, a_count = 2000, b_prop = 0.11, b_count = 100)
#' Calculate a univariate z score by comparing to a population
#'
#' @param unit_prop proportion for the group we are comparing
#' @param global_prop the global proportion
#' @param unit_denom the population size for the group we are comparing
#'
#' @return a z-score
#' @export
#'
#' @examples
#' z_univariate(unit_prop = 0.13, global_prop = 0.11, unit_denom = 2500)
z_univariate <- function(unit_prop, global_prop, unit_denom) {
num <- unit_prop - global_prop
denom <- sqrt(
(global_prop * (1-global_prop))/unit_denom
)
z = num / denom
return(z)
}
#' Calculate a Wald interval
#'
#' @param x the numerator, number of times the event occurs
#' @param n the denominator, the number of trials
#' @param conf.level default 0.95, set the confidence interval to return
#'
#' @return two values forming the upper and lower bounds of the confidence region
#' @export
#'
#' @examples
#' waldInterval(x = 20, n =40) #this will return 0.345 and 0.655
waldInterval <- function(x, n, conf.level = 0.95){
p <- x/n
sd <- sqrt(p*((1-p)/n))
z <- qnorm(c( (1 - conf.level)/2, 1 - (1-conf.level)/2)) #returns the value of thresholds at which conf.level has to be cut at. for 95% CI, this is -1.96 and +1.96
ci <- p + z*sd
names(ci) <- c('lwr', 'upr')
return(ci)
}
#' Calculate the Agresti-Coull interval
#'
#' @param num number of successes
#' @param den number of trials
#' @param conf.level default 0.95, confidence level for the interval
#'
#' @return three values forming the lower bound, observed proportion, and upper bound
#' @export
#'
#' @examples
#' agresti_coull_interval(20, 40)
#' agresti_coull_interval(2, 100, conf.level = 0.99)
agresti_coull_interval <- function(num, den, conf.level = 0.95) {
z <- qnorm(1 - (1 - conf.level) / 2)
n_tilde <- den + z^2
p_tilde <- (num + z^2 / 2) / n_tilde
margin <- z * sqrt(p_tilde * (1 - p_tilde) / n_tilde)
obs <- num / den
return(c("low" = p_tilde - margin, "observed" = obs, "high" = p_tilde + margin))
}
+195
View File
@@ -0,0 +1,195 @@
#' Install Civilytics Quarto Themes and Templates
#'
#' Helper functions that copy Civilytics Quarto assets from the installed
#' package into your Quarto project directory. Logos are stored in a single
#' canonical location (`inst/img/`) and copied to the paths expected by each
#' template at install time.
#'
#' @name quarto-helpers
NULL
# -- internal utilities -------------------------------------------------------
#' Copy a package file to a project directory
#'
#' @param src Relative path within the installed package (under `inst/`).
#' @param dst Destination path relative to `path`.
#' @param path Project root.
#' @param force Overwrite existing files?
#' @return Invisible logical indicating success.
#' @keywords internal
.copy_pkg_file <- function(src, dst, path, force) {
from <- system.file(src, package = "civilytics", mustWork = TRUE)
to <- file.path(path, dst)
dir.create(dirname(to), recursive = TRUE, showWarnings = FALSE)
if (file.exists(to) && !force) {
message(" skip: ", dst, " (already exists; use force = TRUE to overwrite)")
return(invisible(FALSE))
}
file.copy(from, to, overwrite = force)
message(" copy: ", dst)
invisible(TRUE)
}
#' Copy logo SVGs from inst/img/ to a target directory
#'
#' @param dest_dir Destination directory relative to `path`.
#' @param path Project root.
#' @param force Overwrite existing files?
#' @param files Character vector of logo filenames to copy.
#' @keywords internal
.copy_logos <- function(dest_dir, path, force,
files = c("civilytics-mark.svg",
"civilytics-mark-reverse.svg",
"civilytics-wordmark.svg",
"civilytics-wordmark-reverse.svg",
"civilytics-pulse.svg")) {
for (f in files) {
.copy_pkg_file(file.path("img", f), file.path(dest_dir, f), path, force)
}
}
# -- public API ----------------------------------------------------------------
#' Install the Civilytics Reveal.js extension
#'
#' Copies the Civilytics Reveal.js Quarto extension into
#' `_extensions/civilytics-reveal/` under `path`, including brand logos
#' from the package. After running this function, add
#' `format: civilytics-reveal-revealjs` to your `.qmd` YAML front-matter.
#'
#' @param path Character. Project directory to install into. Default `"."`.
#' @param force Logical. Overwrite existing files? Default `FALSE`.
#'
#' @return Invisible `NULL`.
#' @export
#'
#' @examples
#' \dontrun{
#' use_civilytics_revealjs()
#' }
use_civilytics_revealjs <- function(path = ".", force = FALSE) {
path <- normalizePath(path, mustWork = TRUE)
message("Installing Civilytics Reveal.js extension into: ", path)
ext_src <- "quarto/extensions/civilytics-reveal"
ext_dst <- "_extensions/civilytics-reveal"
ext_files <- c(
"_extension.yml",
"civilytics.scss",
"civilytics.css",
"civilytics-head.html",
"civilytics-after.html"
)
for (f in ext_files) {
.copy_pkg_file(file.path(ext_src, f), file.path(ext_dst, f), path, force)
}
# Logos — single source from inst/img/
.copy_logos(file.path(ext_dst, "assets"), path, force)
message("\nDone! Add this to your .qmd front-matter:\n")
message("---")
message("format: civilytics-reveal-revealjs")
message("---")
invisible(NULL)
}
#' Install the Civilytics document theme
#'
#' Copies Civilytics HTML, PDF (LaTeX), and Typst theme files into
#' your Quarto project. Also installs `_brand.yml` and the logo
#' assets it references.
#'
#' @inheritParams use_civilytics_revealjs
#'
#' @return Invisible `NULL`.
#' @export
#'
#' @examples
#' \dontrun{
#' use_civilytics_theme()
#' }
use_civilytics_theme <- function(path = ".", force = FALSE) {
path <- normalizePath(path, mustWork = TRUE)
message("Installing Civilytics document theme into: ", path)
# Brand file
.copy_pkg_file("quarto/_brand.yml", "_brand.yml", path, force)
# HTML theme
theme_files <- c("civilytics.scss", "_tokens.scss", "extras.css")
for (f in theme_files) {
.copy_pkg_file(file.path("quarto/theme", f), file.path("theme", f), path, force)
}
# LaTeX
latex_files <- c("civilytics.tex", "civilytics-title.tex")
for (f in latex_files) {
.copy_pkg_file(file.path("quarto/latex", f), file.path("latex", f), path, force)
}
# Typst — shipped as template-partials so Quarto keeps its Skylighting
# definitions and syntax-highlighted code blocks render (see issue #12)
typst_files <- c("typst-template.typ", "typst-show.typ")
for (f in typst_files) {
.copy_pkg_file(file.path("quarto/typst", f), file.path("typst", f), path, force)
}
# Logos — for _brand.yml (expects assets/logo/)
.copy_logos("assets/logo", path, force)
# Example report
.copy_pkg_file("quarto/examples/report.qmd", "examples/report.qmd", path, force)
message("\nDone! Example YAML for a report:\n")
message("---")
message("format:")
message(" html:")
message(" theme: theme/civilytics.scss")
message(" css: theme/extras.css")
message(" pdf:")
message(" include-in-header: latex/civilytics.tex")
message(" include-before-body: latex/civilytics-title.tex")
message(" typst:")
message(" template-partials:")
message(" - typst/typst-template.typ")
message(" - typst/typst-show.typ")
message("---")
message("\nSee examples/report.qmd for a complete example.")
invisible(NULL)
}
#' Install the Civilytics brand file only
#'
#' Copies `_brand.yml` and the logo assets it references into your
#' Quarto project. This gives you Quarto 1.5+ automatic brand
#' styling (colors, fonts, logos) without the full theme SCSS.
#'
#' @inheritParams use_civilytics_revealjs
#'
#' @return Invisible `NULL`.
#' @export
#'
#' @examples
#' \dontrun{
#' use_civilytics_brand()
#' }
use_civilytics_brand <- function(path = ".", force = FALSE) {
path <- normalizePath(path, mustWork = TRUE)
message("Installing Civilytics brand file into: ", path)
.copy_pkg_file("quarto/_brand.yml", "_brand.yml", path, force)
.copy_logos("assets/logo", path, force)
message("\nDone! Quarto 1.5+ will auto-apply brand colors, fonts, and logos.")
message("See: https://quarto.org/docs/authoring/brand.html")
invisible(NULL)
}
+539 -83
View File
@@ -1,41 +1,147 @@
#' Make the Civilytics plot theme #' Civilytics ggplot2 theme
#' #'
#' @param font_size default 14, a number representing the base font for the theme #' A complete ggplot2 theme built on [theme_grey()] using the
#' @param font_family default "", a character for the font family to use in the theme #' Civilytics brand color palette and typography. Requires ggplot2 >= 4.0.0
#' @param line_size default 0.5, the line size to use for the theme #' for the `ink`, `paper`, and `accent` base-theme parameters.
#' @param rel_small default 12/14, the scale factor to create a small font from the base font_size #'
#' @param rel_tiny default 11/14, the scale factor to create a tiny font from the base font_size #' Produces an editorial, Pew-style layout: visible x-axis line to ground
#' @param rel_large default 16/14, the scale factor to create a large font from the base font_size #' the data, light horizontal gridlines for reference, no panel border or
#' @importFrom graphics plot #' y-axis line. Plot title and caption are left-aligned to the full plot
#' @return a ggplot2 theme object suitable for combining with ggplot objects to theme them #' region.
#'
#' Brand fonts (Inter for UI text, Libre Franklin for titles) are loaded
#' automatically via [showtext] when the package is attached. Call
#' [civilytics_load_fonts()] to reload them if needed.
#'
#' @param font_size Numeric. Base font size in points. Default `14`.
#' @param font_family Character. Font family for body/axis text. Default
#' `"Inter"` (loaded via showtext).
#' @param title_family Character. Font family for plot titles and strip labels.
#' Default `"Libre Franklin"` (loaded via showtext).
#' @param line_size Numeric. Base line width. Default `0.5`.
#' @param rel_small Numeric. Scale factor for small text relative to
#' `font_size`. Default `12/14`.
#' @param rel_tiny Numeric. Scale factor for tiny text relative to `font_size`.
#' Default `11/14`.
#' @param rel_large Numeric. Scale factor for large text (titles) relative to
#' `font_size`. Default `20/14` (~1.43x), matching the Civilytics editorial
#' design system.
#' @param ink Character. Hex code for foreground/text color. Defaults to
#' [civilytics_colors]`["ink"]` (`#0E1A2B`).
#' @param paper Character. Hex code for background color. Defaults to
#' [civilytics_colors]`["paper"]` (`#FAF7F2`).
#' @param accent Character. Hex code for accent/highlight color. Defaults to
#' [civilytics_colors]`["ember_600"]` (`#C25311`).
#' @param strip_color Character. Hex code for facet strip background. Defaults
#' to [civilytics_colors]`["paper_2"]` (`#F2EDE4`).
#' @param grid Character. Which major gridlines to draw: `"y"` (default,
#' horizontal only), `"x"` (vertical only), `"both"`, or `"none"`.
#' @param paper_bg Logical. If `TRUE`, fill the plot and panel backgrounds
#' with the warm `paper` color (Civilytics cream). Default is `FALSE`
#' (transparent) so that figures composite cleanly onto any background.
#' Set to `TRUE` for the branded cream canvas. Note: a transparent device
#' background (e.g., `dev = "ragg_png"`, `dev.args = list(background =
#' "transparent")`) is also needed for fully-transparent PNG exports.
#'
#' @section Font size hierarchy:
#' All text sizes are derived from `font_size` using relative scale factors.
#' At the default `font_size = 14`:
#'
#' | Element | Scale factor | Default size |
#' |:--------|:-------------|:-------------|
#' | Plot title | `rel_large` (1.43x) | ~20 pt |
#' | Subtitle | 1.0x | 14 pt |
#' | Axis text (tick labels) | `rel_small` (0.86x) | ~12 pt |
#' | Axis titles | `rel_small` (0.86x) | ~12 pt |
#' | Legend text | `rel_small` (0.86x) | ~12 pt |
#' | Caption | `rel_tiny` (0.79x) | ~11 pt |
#' | Legend title | `rel_tiny` (0.79x) | ~11 pt |
#' | Strip text (facets) | `rel_small` (0.86x) | ~12 pt |
#'
#' To uniformly scale all text, change `font_size`. To adjust only the title
#' prominence, change `rel_large`. When using [civilytics_logo()] to add a
#' logo below the plot, pass `font_scale` to compensate for viewport
#' shrinkage.
#'
#' @return A complete ggplot2 [theme()] object.
#' @export #' @export
theme_civilytics <- #'
function (font_size = 14, #' @examples
font_family = "", #' \dontrun{
#' library(ggplot2)
#'
#' # Default — transparent background for embedding
#' ggplot(mpg, aes(displ, hwy)) +
#' geom_point() +
#' theme_civilytics()
#'
#' # With both gridlines and brand colors
#' ggplot(mpg, aes(displ, hwy, colour = class)) +
#' geom_point() +
#' scale_color_civilytics() +
#' theme_civilytics(grid = "both")
#'
#' # Branded cream background (opt-in)
#' ggplot(mpg, aes(displ, hwy)) +
#' geom_point() +
#' theme_civilytics(paper_bg = TRUE)
#'
#' # Larger text for poster or display
#' ggplot(mpg, aes(displ, hwy)) +
#' geom_point() +
#' theme_civilytics(font_size = 18)
#' }
theme_civilytics <- function(
font_size = 14,
font_family = CV_FONT_SANS,
title_family = CV_FONT_DISPLAY,
line_size = 0.5, line_size = 0.5,
rel_small = 12 / 14, rel_small = 12 / 14,
rel_tiny = 11 / 14, rel_tiny = 11 / 14,
rel_large = 16 / 14) { rel_large = 20 / 14,
ink = unname(civilytics_colors["ink"]),
paper = unname(civilytics_colors["paper"]),
accent = unname(civilytics_colors["ember_600"]),
strip_color = unname(civilytics_colors["paper_2"]),
grid = c("y", "x", "both", "none"),
paper_bg = FALSE) {
grid <- match.arg(grid)
half_line <- font_size / 2 half_line <- font_size / 2
small_size <- rel_small * font_size small_size <- rel_small * font_size
theme_grey(base_size = font_size, base_family = font_family) %+replace% rule_color <- unname(civilytics_colors["rule"])
ink_2 <- unname(civilytics_colors["ink_2"])
ink_3 <- unname(civilytics_colors["ink_3"])
bg_color <- if (isTRUE(paper_bg)) paper else NA
# Grid line elements
grid_line <- element_line(color = rule_color, linewidth = 0.35)
no_line <- element_blank()
theme_grey(
base_size = font_size,
base_family = font_family,
ink = ink,
paper = paper,
accent = accent
) %+replace%
theme( theme(
line = element_line( line = element_line(
color = "black", color = ink,
size = line_size, linewidth = line_size,
linetype = 1, linetype = 1,
lineend = "butt" lineend = "butt"
), ),
rect = element_rect( rect = element_rect(
fill = NA, fill = NA,
color = NA, color = NA,
size = line_size, linewidth = line_size,
linetype = 1 linetype = 1
), ),
text = element_text( text = element_text(
family = font_family, family = font_family,
face = "plain", face = "plain",
color = "black", color = ink,
size = font_size, size = font_size,
hjust = 0.5, hjust = 0.5,
vjust = 0.5, vjust = 0.5,
@@ -44,125 +150,475 @@ theme_civilytics <-
margin = margin(), margin = margin(),
debug = FALSE debug = FALSE
), ),
axis.line = element_line( # -- Axes --
color = "black", axis.line = element_blank(),
size = line_size, axis.line.x = element_line(
color = ink,
linewidth = 0.6,
lineend = "square" lineend = "square"
), ),
axis.line.x = NULL, axis.line.y = element_blank(),
axis.line.y = NULL, axis.text = element_text(
axis.text = element_text(color = "black", color = ink_2,
size = small_size), size = rel(rel_small)
axis.text.x = element_text(margin = margin(t = small_size / 4), ),
vjust = 1), axis.text.x = element_text(
axis.text.x.top = element_text(margin = margin(b = small_size / 4), margin = margin(t = small_size / 4),
vjust = 0), vjust = 1
axis.text.y = element_text(margin = margin(r = small_size / 4), ),
hjust = 1), axis.text.x.top = element_text(
axis.text.y.right = element_text(margin = margin(l = small_size / 4), margin = margin(b = small_size / 4),
hjust = 0), vjust = 0
axis.ticks = element_line(color = "black", ),
size = line_size), axis.text.y = element_text(
axis.ticks.length = unit(half_line / 2, margin = margin(r = small_size / 4),
"pt"), hjust = 1
axis.title.x = element_text(margin = margin(t = half_line / 2), ),
vjust = 1), axis.text.y.right = element_text(
axis.title.x.top = element_text(margin = margin(b = half_line / 2), margin = margin(l = small_size / 4),
vjust = 0), hjust = 0
),
axis.ticks = element_line(
color = ink_3,
linewidth = 0.4
),
axis.ticks.length = unit(4, "pt"),
axis.title.x = element_text(
size = rel(rel_small),
color = ink_3,
margin = margin(t = 10),
vjust = 1
),
axis.title.x.top = element_text(
size = rel(rel_small),
color = ink_3,
margin = margin(b = half_line / 2),
vjust = 0
),
axis.title.y = element_text( axis.title.y = element_text(
size = rel(rel_small),
color = ink_3,
angle = 90, angle = 90,
margin = margin(r = half_line / margin = margin(r = 10),
2),
vjust = 1 vjust = 1
), ),
axis.title.y.right = element_text( axis.title.y.right = element_text(
size = rel(rel_small),
color = ink_3,
angle = -90, angle = -90,
margin = margin(l = half_line / 2), margin = margin(l = half_line / 2),
vjust = 0 vjust = 0
), ),
# -- Legend --
legend.background = element_blank(), legend.background = element_blank(),
legend.spacing = unit(font_size, "pt"), legend.spacing = unit(font_size, "pt"),
legend.spacing.x = NULL, legend.spacing.x = NULL,
legend.spacing.y = NULL, legend.spacing.y = NULL,
legend.margin = margin(0, legend.margin = margin(0, 0, 4, 0),
0, 0, 0),
legend.key = element_blank(), legend.key = element_blank(),
legend.key.size = unit(1.1 * legend.key.size = unit(12, "pt"),
font_size, "pt"),
legend.key.height = NULL, legend.key.height = NULL,
legend.key.width = NULL, legend.key.width = NULL,
legend.text = element_text(size = rel(rel_small)), legend.text = element_text(
legend.text.align = NULL, size = rel(rel_small),
legend.title = element_text(hjust = 0), color = ink_2
legend.title.align = NULL, ),
legend.position = "right", legend.title = element_text(
hjust = 0,
face = "bold",
size = rel(rel_tiny),
color = ink_3
),
legend.position = "top",
legend.direction = NULL, legend.direction = NULL,
legend.justification = c("left", legend.justification = c("left", "center"),
"center"),
legend.box = NULL, legend.box = NULL,
legend.box.margin = margin(0, legend.box.margin = margin(0, 0, 0, 0),
0, 0, 0),
legend.box.background = element_blank(), legend.box.background = element_blank(),
legend.box.spacing = unit(font_size, "pt"), legend.box.spacing = unit(font_size, "pt"),
panel.background = element_blank(), # -- Panel --
panel.background = element_rect(fill = bg_color, color = NA),
panel.border = element_blank(), panel.border = element_blank(),
panel.grid = element_blank(), panel.grid.minor = element_blank(),
panel.grid.major = NULL, panel.grid.major.x = if (grid %in% c("x", "both")) grid_line else no_line,
panel.grid.minor = NULL, panel.grid.major.y = if (grid %in% c("y", "both")) grid_line else no_line,
panel.grid.major.x = NULL, panel.spacing = unit(16, "pt"),
panel.grid.major.y = NULL,
panel.grid.minor.x = NULL,
panel.grid.minor.y = NULL,
panel.spacing = unit(half_line,
"pt"),
panel.spacing.x = NULL, panel.spacing.x = NULL,
panel.spacing.y = NULL, panel.spacing.y = NULL,
panel.ontop = FALSE, panel.ontop = FALSE,
strip.background = element_rect(fill = "grey80"), # -- Facet strips --
strip.background = element_rect(fill = strip_color, color = NA),
strip.text = element_text( strip.text = element_text(
family = font_family,
face = "bold",
size = rel(rel_small), size = rel(rel_small),
margin = margin(half_line / 2, half_line / color = ink,
2, half_line / 2, margin = margin(
half_line / 2) half_line / 2, half_line / 2,
half_line / 2, half_line / 2
)
), ),
strip.text.x = NULL, strip.text.x = NULL,
strip.text.y = element_text(angle = -90), strip.text.y = element_text(angle = -90),
strip.placement = "inside", strip.placement = "inside",
strip.placement.x = NULL, strip.placement.x = NULL,
strip.placement.y = NULL, strip.placement.y = NULL,
strip.switch.pad.grid = unit(half_line / 2, strip.switch.pad.grid = unit(half_line / 2, "pt"),
"pt"), strip.switch.pad.wrap = unit(half_line / 2, "pt"),
strip.switch.pad.wrap = unit(half_line / 2, # -- Plot-level --
"pt"), plot.background = element_rect(fill = bg_color, color = NA),
plot.background = element_blank(),
plot.title = element_text( plot.title = element_text(
family = title_family,
face = "bold", face = "bold",
size = rel(rel_large), size = rel(rel_large),
hjust = 0, hjust = 0,
vjust = 1, vjust = 1,
margin = margin(b = half_line) margin = margin(b = 4)
), ),
plot.title.position = "plot",
plot.subtitle = element_text( plot.subtitle = element_text(
size = rel(rel_small), size = rel(1),
color = ink_2,
hjust = 0, hjust = 0,
vjust = 1, vjust = 1,
margin = margin(b = half_line) lineheight = 1.3,
margin = margin(b = 14)
), ),
plot.caption = element_text( plot.caption = element_text(
size = rel(rel_tiny), size = rel(rel_tiny),
hjust = 0, # set hjust to 0 color = ink_3,
hjust = 0,
vjust = 1, vjust = 1,
lineheight = 1, lineheight = 1.3,
margin = margin(t = half_line) margin = margin(t = 14)
), ),
plot.caption.position = "plot",
plot.tag = element_text( plot.tag = element_text(
face = "bold", face = "bold",
color = accent,
size = rel(rel_tiny),
hjust = 0, hjust = 0,
vjust = 0.7 vjust = 0.7
), ),
plot.tag.position = c(0, 1), plot.tag.position = c(0, 1),
plot.margin = margin(half_line, plot.margin = margin(16, 18, 16, 16),
half_line, half_line, half_line),
complete = TRUE complete = TRUE
) )
} }
#' Dark variant of the Civilytics ggplot2 theme
#'
#' Convenience wrapper around [theme_civilytics()] with dark-background
#' defaults: navy (`#1A2E4A`) paper, warm off-white (`#FAF7F2`) ink, and
#' a lighter ember accent (`#E07840`). Facet strips use primary navy.
#'
#' Pair with `make_logo_grob(variant = "dark")` for the white logo.
#'
#' @inheritParams theme_civilytics
#'
#' @return A complete ggplot2 [theme()] object.
#' @export
#'
#' @examples
#' \dontrun{
#' library(ggplot2)
#' ggplot(mpg, aes(displ, hwy, colour = class)) +
#' geom_point() +
#' scale_color_civilytics() +
#' theme_civilytics_dark()
#' }
theme_civilytics_dark <- function(
font_size = 14,
font_family = CV_FONT_SANS,
title_family = CV_FONT_DISPLAY,
line_size = 0.5,
rel_small = 12 / 14,
rel_tiny = 11 / 14,
rel_large = 20 / 14,
ink = unname(civilytics_colors["paper"]),
paper = unname(civilytics_colors["navy_700"]),
accent = unname(civilytics_colors["ember_400"]),
strip_color = unname(civilytics_colors["navy_600"]),
grid = c("y", "x", "both", "none"),
paper_bg = TRUE) {
theme_civilytics(
font_size = font_size,
font_family = font_family,
title_family = title_family,
line_size = line_size,
rel_small = rel_small,
rel_tiny = rel_tiny,
rel_large = rel_large,
ink = ink,
paper = paper,
accent = accent,
strip_color = strip_color,
grid = grid,
paper_bg = paper_bg
) +
# The base theme hardcodes ink_2/ink_3 for subtitle/caption, which are
# dark colors meant for light backgrounds. Override with lighter values
# so text remains readable on the navy background.
theme(
plot.subtitle = element_text(
color = unname(civilytics_colors["navy_200"])
),
plot.caption = element_text(
color = unname(civilytics_colors["navy_300"])
),
axis.text = element_text(
color = unname(civilytics_colors["navy_200"])
),
axis.title.x = element_text(
color = unname(civilytics_colors["navy_300"])
),
axis.title.y = element_text(
color = unname(civilytics_colors["navy_300"])
)
)
}
#' Slide-friendly Civilytics ggplot2 theme
#'
#' Variant of [theme_civilytics()] sized for Reveal.js slides or PowerPoint
#' exports: larger base font (18pt), transparent background, wider margins,
#' and a heavier x-axis line. Gridlines default to horizontal only.
#'
#' @inheritParams theme_civilytics
#'
#' @return A complete ggplot2 [theme()] object.
#' @export
#'
#' @examples
#' \dontrun{
#' library(ggplot2)
#' ggplot(mpg, aes(displ, hwy, colour = class)) +
#' geom_point() +
#' scale_color_civilytics() +
#' theme_civilytics_slide()
#' }
theme_civilytics_slide <- function(
font_size = 18,
font_family = CV_FONT_SANS,
title_family = CV_FONT_DISPLAY,
line_size = 0.5,
rel_small = 12 / 14,
rel_tiny = 11 / 14,
rel_large = 20 / 14,
ink = unname(civilytics_colors["ink"]),
paper = unname(civilytics_colors["paper"]),
accent = unname(civilytics_colors["ember_600"]),
strip_color = unname(civilytics_colors["paper_2"]),
grid = c("y", "x", "both", "none"),
paper_bg = FALSE) {
theme_civilytics(
font_size = font_size,
font_family = font_family,
title_family = title_family,
line_size = line_size,
rel_small = rel_small,
rel_tiny = rel_tiny,
rel_large = rel_large,
ink = ink,
paper = paper,
accent = accent,
strip_color = strip_color,
grid = grid,
paper_bg = paper_bg
) +
theme(
axis.line.x = element_line(
color = ink,
linewidth = 0.8,
lineend = "square"
),
plot.margin = margin(24, 24, 24, 24)
)
}
# -- Map themes ----------------------------------------------------------------
#' Shared map-theme overrides
#'
#' Strips away axes, ticks, gridlines, and axis titles/labels — the elements
#' that are meaningless on a choropleth or spatial plot.
#'
#' @return A partial ggplot2 [theme()] object.
#' @keywords internal
.map_theme_extras <- function() {
theme(
axis.line = element_blank(),
axis.line.x = element_blank(),
axis.line.y = element_blank(),
axis.text = element_blank(),
axis.text.x = element_blank(),
axis.text.y = element_blank(),
axis.ticks = element_blank(),
axis.ticks.length = unit(0, "pt"),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
panel.grid.major.x = element_blank(),
panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank()
)
}
#' Map-friendly Civilytics ggplot2 theme
#'
#' Variant of [theme_civilytics()] for choropleths and spatial plots.
#' Suppresses axes, axis labels, ticks, and gridlines while keeping the
#' Civilytics brand typography, colors, and plot-level elements (title,
#' subtitle, caption, legend).
#'
#' @inheritParams theme_civilytics
#'
#' @return A complete ggplot2 [theme()] object.
#' @export
#'
#' @examples
#' \dontrun{
#' library(ggplot2)
#' # With sf data:
#' ggplot(map_data) +
#' geom_sf(aes(fill = value)) +
#' scale_fill_civilytics_c("seq_navy") +
#' theme_civilytics_map()
#' }
theme_civilytics_map <- function(
font_size = 14,
font_family = CV_FONT_SANS,
title_family = CV_FONT_DISPLAY,
line_size = 0.5,
rel_small = 12 / 14,
rel_tiny = 11 / 14,
rel_large = 20 / 14,
ink = unname(civilytics_colors["ink"]),
paper = unname(civilytics_colors["paper"]),
accent = unname(civilytics_colors["ember_600"]),
strip_color = unname(civilytics_colors["paper_2"]),
paper_bg = TRUE) {
theme_civilytics(
font_size = font_size,
font_family = font_family,
title_family = title_family,
line_size = line_size,
rel_small = rel_small,
rel_tiny = rel_tiny,
rel_large = rel_large,
ink = ink,
paper = paper,
accent = accent,
strip_color = strip_color,
grid = "none",
paper_bg = paper_bg
) + .map_theme_extras()
}
#' Dark map-friendly Civilytics ggplot2 theme
#'
#' Variant of [theme_civilytics_dark()] for choropleths and spatial plots.
#' Suppresses axes, axis labels, ticks, and gridlines on a dark navy
#' background. Pair with `make_logo_grob(variant = "dark")`.
#'
#' @inheritParams theme_civilytics_dark
#'
#' @return A complete ggplot2 [theme()] object.
#' @export
#'
#' @examples
#' \dontrun{
#' library(ggplot2)
#' ggplot(map_data) +
#' geom_sf(aes(fill = value)) +
#' scale_fill_civilytics_c("seq_ember") +
#' theme_civilytics_dark_map()
#' }
theme_civilytics_dark_map <- function(
font_size = 14,
font_family = CV_FONT_SANS,
title_family = CV_FONT_DISPLAY,
line_size = 0.5,
rel_small = 12 / 14,
rel_tiny = 11 / 14,
rel_large = 20 / 14,
ink = unname(civilytics_colors["paper"]),
paper = unname(civilytics_colors["navy_700"]),
accent = unname(civilytics_colors["ember_400"]),
strip_color = unname(civilytics_colors["navy_600"]),
paper_bg = TRUE) {
theme_civilytics_dark(
font_size = font_size,
font_family = font_family,
title_family = title_family,
line_size = line_size,
rel_small = rel_small,
rel_tiny = rel_tiny,
rel_large = rel_large,
ink = ink,
paper = paper,
accent = accent,
strip_color = strip_color,
grid = "none",
paper_bg = paper_bg
) + .map_theme_extras()
}
#' Slide-friendly map Civilytics ggplot2 theme
#'
#' Variant of [theme_civilytics_slide()] for choropleths and spatial plots
#' on slides. Combines the larger base font and transparent background of
#' the slide theme with suppressed axes, ticks, and gridlines.
#'
#' @inheritParams theme_civilytics_slide
#'
#' @return A complete ggplot2 [theme()] object.
#' @export
#'
#' @examples
#' \dontrun{
#' library(ggplot2)
#' ggplot(map_data) +
#' geom_sf(aes(fill = value)) +
#' scale_fill_civilytics_c("seq_navy") +
#' theme_civilytics_slide_map()
#' }
theme_civilytics_slide_map <- function(
font_size = 18,
font_family = CV_FONT_SANS,
title_family = CV_FONT_DISPLAY,
line_size = 0.5,
rel_small = 12 / 14,
rel_tiny = 11 / 14,
rel_large = 20 / 14,
ink = unname(civilytics_colors["ink"]),
paper = unname(civilytics_colors["paper"]),
accent = unname(civilytics_colors["ember_600"]),
strip_color = unname(civilytics_colors["paper_2"]),
paper_bg = FALSE) {
theme_civilytics_slide(
font_size = font_size,
font_family = font_family,
title_family = title_family,
line_size = line_size,
rel_small = rel_small,
rel_tiny = rel_tiny,
rel_large = rel_large,
ink = ink,
paper = paper,
accent = accent,
strip_color = strip_color,
grid = "none",
paper_bg = paper_bg
) + .map_theme_extras()
}
+323 -3
View File
@@ -78,7 +78,7 @@ pretty_count <- function(x) {
#' Unsuppress data using sampling #' Unsuppress data using sampling
#' #'
#' @param x #' @param x a vector
#' @param replace_char the character you want to replace in the vector #' @param replace_char the character you want to replace in the vector
#' @param zeros the number of zeroes to oversample when replacing replace_char #' @param zeros the number of zeroes to oversample when replacing replace_char
#' @param max_value the numeric maximum value the replacement for the "*" can be #' @param max_value the numeric maximum value the replacement for the "*" can be
@@ -103,10 +103,11 @@ star_subs <- function(x, replace_char = "*",
#' #'
#' @param x character description of grade levels from NCES style data #' @param x character description of grade levels from NCES style data
#' #'
#' @return #' @return a numeric vector
#' @export #' @export
#' #'
#' @examples #' @examples
#' grade_level_to_num(c("KG", "Pre-K", "12", "10", "09"))
grade_level_to_num <- function(x) { grade_level_to_num <- function(x) {
# Cannot generate new levels if it is a factor so we coerce to character first # Cannot generate new levels if it is a factor so we coerce to character first
x <- as.character(x) x <- as.character(x)
@@ -122,10 +123,11 @@ grade_level_to_num <- function(x) {
#' #'
#' @param x a character vector with NCES race codes, often from Urban Institute #' @param x a character vector with NCES race codes, often from Urban Institute
#' #'
#' @return #' @return recoded race categories following NCES race codes
#' @export #' @export
#' #'
#' @examples #' @examples
#' race_short_names(c("Black", "Hispanic Or Latino", "Two Or More Races"))
race_short_names <- function(x) { race_short_names <- function(x) {
x <- as.character(x) x <- as.character(x)
x[x %in% c("Black", "Black Or African American", "Black or African American", x[x %in% c("Black", "Black Or African American", "Black or African American",
@@ -144,4 +146,322 @@ race_short_names <- function(x) {
return(x) return(x)
} }
#' Sum a numeric that contains missing values and ignore missing values
#'
#' @param x a numeric vector
#' @param quiet Logical. If `TRUE` (default `FALSE`), suppress the warning
#' message. Useful when calling `na_sum()` inside a loop or `dplyr` pipeline
#' where the message would be emitted repeatedly.
#'
#' @return the sum, ignoring any missing values
#' @export
#'
#' @examples
#' x <- c(2, NA, 4, 9)
#' na_sum(x) # 15
#' na_sum(x, quiet = TRUE) # 15 (no message)
na_sum <- function(x, quiet = FALSE) {
stopifnot(is.numeric(x))
if (!quiet) {
message("Taking a sum with missing values equal to 0, be careful!")
}
x <- na_zero(x)
return(sum(x))
}
# This function looks up the appropriate postal code for states from the
# state name.
# It also substitutes in PR and DC for Puerto Rico and District of Columbia
# which are not included in the lookup table of states and state abbreviations
# that comes with R.
#' Title
#'
#' @param x a vector of state names
#' @return state abbreviations matching state naems provided in X
#' @export
#'
#' @examples
#' postcode_lookup("Montana")
postcode_lookup <- function(x) {
modify_name <- c(state.name, "District of Columbia", "Puerto Rico")
modify_abb <- c(state.abb, "DC", "PR")
abb <- modify_abb[match(x, modify_name)]
return(abb)
}
#' Truncated matching function
#'
#' @param x, the character value to match
#' @param y, a vector of multiple character values to look for a match in
#' @param n, an integer, how many matches to return
#' @importFrom stringdist stringsim
#'
#' @return an integer giving the position of the table with the most characters
trunc_match <- function(x, y, n) {
out <- y[order(stringdist::stringsim(x, y, method = "lv"),
decreasing = TRUE)]
if (length(out) < n) {
n <- length(out)
}
out <- out[1:n]
return(out)
}
#' Compute the outersection of two fectors
#'
#' @param x first vector, of any type
#' @param y second vector, same type as x
#' @param ... additional vectors to be checked
#'
#' @return unique values across all of the vectors
#' @export
#'
#' @examples
#' # desired result is c(1, 2, 3, 6, 9, 10)
#' outersect(1:5, 4:8, 7:10)
outersect <- function(x, y, ...) {
big.vec <- c(x, y, ...)
duplicates <- big.vec[duplicated(big.vec)]
setdiff(big.vec, unique(duplicates))
}
# desired result is c(1, 2, 3, 6, 9, 10)
#outersect(1:5, 4:8, 7:10)
#[1] 1 2 3 6 9 10
#' Get the FIPS code for a given state abbreviation
#'
#' @param stabbr a two letter abbreviation for a US state
#'
#' @return FIPS codes that match the abbreviation
#' @export
#'
#' @examples
#' \dontrun{
#' get_fips("MT")
#' get_fips("PR")
#' }
get_fips <- function(stabbr) {
if (!requireNamespace("tidycensus", quietly = TRUE)) {
stop(
"Package 'tidycensus' is required for get_fips(). ",
"Install it with: install.packages('tidycensus')",
call. = FALSE
)
}
fips <- tidycensus::fips_codes[, 1:2]
fips <- fips[!duplicated(fips),]
out <- fips[fips$state == stabbr, 2]
return(out)
}
#' Get the state abbreviation from a given FIPS Code
#'
#' @param fips a character value that captures the FIPS code with leading 0
#'
#' @return a character value, length 2, with the state abbreviation
#' @export
#'
#' @examples
#' \dontrun{
#' get_stabbr("06")
#' }
get_stabbr <- function(fips) {
if (!requireNamespace("tidycensus", quietly = TRUE)) {
stop(
"Package 'tidycensus' is required for get_stabbr(). ",
"Install it with: install.packages('tidycensus')",
call. = FALSE
)
}
fips_codes <- tidycensus::fips_codes[, 1:2]
fips_codes <- fips_codes[!duplicated(fips_codes),]
if (length(fips) != 1) {
out <- rep(NA, length(fips))
for (i in length(fips)) {
out[i] <- fips_codes[fips_codes$state_code == fips, 1]
}
return(out)
} else {
out <- fips_codes[fips_codes$state_code == fips, 1]
return(out)
}
}
## Let's calculate the z-score for the gap as well
# Test statistic needs 4 values
# Proporation A, Numerator A
# Proportion B, Numerator B
#' Calculate a Z-Score for a comparison between two proportions
#'
#' @param a_prop the proportion for group a
#' @param a_count the count of the population in group a
#' @param b_prop the proportion for group b
#' @param b_count the count of the population in group b
#'
#' @return a numeric z score
#' @export
#'
#' @examples
#' z_gap_test(0.0002, 1e4, 0.0003, 1e4)
z_gap_test <- function(a_prop, a_count, b_prop, b_count) {
num <- (a_prop - b_prop) - 0
denom_a <- (a_prop * (1-a_prop)) / a_count
denom_b <- (b_prop * (1-b_prop)) / b_count
denom <- sqrt(denom_a + denom_b)
z = num / denom
#if (is.nan)
return(z)
}
# TODO: Consider vectorizing
#z_univariate_v <- Vectorize(z_univariate, SIMPLIFY = TRUE)
#' Add a random jitter to a count variable to mask its true value
#'
#' @param x the vector of numerics
#' @param fac the range of values to add or subtract to perturb the count
#'
#' @details The count in the name means that this function enforces a floor of
#' 0 on values, so values perturbed to have less than 0 will be capped at 0.
#'
#' @return a numeric vector
#' @export
#'
#' @examples
#' perturb_count(20:30, fac = 3)
perturb_count <- function(x, fac = 3) {
x <- sapply(x, function(x) x + sample(-fac:fac, 1))
x[x < 0] <- 0
return(x)
}
#' Add random noise to a variable before rounding
#'
#' @param x a numeric we want to round
#'
#' @return rounded values
#' @export
#' @details Credit to Jens von Bergmann for this algo https://github.com/mountainMath/dotdensity/blob/master/R/dot-density.R
#' @importFrom stats runif
#'
#' @examples
#' random_round(1.93)
random_round <- function(x) {
v = as.integer(x)
r = x-v
test = runif(length(r), 0.0, 1.0)
add = rep(as.integer(0),length(r))
add[r>test] <- as.integer(1)
value = v + add
ifelse(is.na(value) | value<0, 0, value)
return(value)
}
#' Safely take a ratio and do not fail if 0 is in the denominator
#'
#' @param num numerator, a numeric
#' @param denom denominator, a numeric
#'
#' @return The proportion, safely calculated with 0.1 substituting for 0
#' @export
#'
#' @examples
#' safe_ratio(100, 1)
#' safe_ratio(100, 0)
safe_ratio <- function(num, denom) {
denom <- ifelse(denom == 0, 0.1, denom)
y <- num / denom
return(y)
}
#' Take the maximum of a number after trimming values
#'
#' @param vec a numeric vector
#' @param n integer, the number of maximum values to trim before taking the maximum
#'
#' @return the highest value after removing the highest n values
#' @export
#'
#' @examples
#' trim_max(c(10, 10, 10, 9, 8, 7), n = 2)
#' trim_max(c(10, 10, 10, 9, 8, 7), n = 3)
#' trim_max(c(10, 10, 10, 9, 8, 7), n = 4)
trim_max <- function(vec, n) {
# Sort vector ascending
sorted_vec <- sort(vec)
end_point <- length(vec) - n
if (end_point <= 0) {
return(1)
}
# Exclude n largest (most extreme) values
filtered_vec <- sorted_vec[(1:(length(vec)-n))]
# Find the maximum value among excluded values if any exist
max_value <- max(filtered_vec, na.rm = TRUE)
return(max_value)
}
#' Round values to the nearest 0.5
#'
#' @param x a numeric vector to round
#'
#' @return a numeric vector with all elements rounded to 0, 0.5, or 1
#' @export
#'
#' @examples
#' round_to_nearest_half(0.9)
#' round_to_nearest_half(0.7)
#' round_to_nearest_half(0.4)
round_to_nearest_half <- function(x) {
if (x %% 1 == 0) { # If x is already an integer, no change needed
return(as.integer(x))
} else {
decimal_part <- x - floor(x)
if (decimal_part >= 0.25 & decimal_part < 0.75) {
rounded_x <- floor(x) + 0.5
} else {
rounded_x <- round(x, 0)
}
return(rounded_x)
}
}
#' Round values to the nearest 0.5
#'
#' @inheritParams round_to_nearest_half
#'
#' @return a numeric vector with all elements rounded to 0, 0.5, or 1
#' @export
#'
#' @examples
#' rnh(c(0.2, 0.3, 0.4, 0.8, 0.09, 0.9))
rnh <- function(x) {
tmp <- Vectorize(round_to_nearest_half)
tmp(x)
}
+284
View File
@@ -0,0 +1,284 @@
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
dpi = 96,
out.width = "100%"
)
```
# civilytics
Brand themes, color palettes, and utility functions for
[Civilytics Consulting](https://www.civilytics.com). The package provides a
complete ggplot2 theme system drawn from the Civilytics design system ---
warm paper backgrounds, civic-navy ink, and editorial typography --- along
with 10 curated color palettes, logo composition helpers, and data-wrangling
utilities for public-sector analysis.
## Installation
Install from the Civilytics Gitea server:
```r
# install.packages("remotes")
remotes::install_git("https://gitea.civilytics.org/Civilytics/civilyticsR.git")
```
## Quick start
```{r quickstart, fig.height = 4, fig.width = 7, message = FALSE}
library(civilytics)
library(ggplot2)
ggplot(mpg, aes(displ, hwy, colour = class)) +
geom_point(size = 2.5) +
scale_color_civilytics() +
labs(
title = "Fuel economy by engine displacement",
subtitle = "Highway MPG vs. engine size for 234 vehicles",
caption = "Source: EPA fuel economy data (ggplot2::mpg)",
x = "Engine displacement (litres)",
y = "Highway MPG"
) +
theme_civilytics()
```
## Color palettes
The package ships 53 named brand colors in `civilytics_colors` and 10
curated palettes in `civilytics_palettes`. Use `civilytics_palette()` to
retrieve colors by name, or pass palettes directly to the ggplot2 scales.
### Palette gallery
```{r palette-gallery, echo = FALSE, fig.height = 9, fig.width = 7}
show_palette <- function(name, colors) {
n <- length(colors)
df <- data.frame(
x = seq_len(n),
fill = factor(seq_len(n), levels = seq_len(n))
)
ggplot(df, aes(x, y = 1, fill = fill)) +
geom_tile(width = 0.9, height = 0.9, show.legend = FALSE) +
scale_fill_manual(values = colors) +
scale_x_continuous(expand = expansion(add = 0.5)) +
labs(title = name) +
theme_void() +
theme(
plot.title = element_text(
family = "Libre Franklin", face = "bold", size = 11,
hjust = 0, margin = margin(b = 2)
),
plot.margin = margin(4, 4, 4, 4)
)
}
plots <- mapply(
show_palette,
names(civilytics_palettes),
civilytics_palettes,
SIMPLIFY = FALSE
)
gridExtra::grid.arrange(grobs = plots, ncol = 1)
```
### Using palettes
```{r palette-usage, fig.height = 3.5, fig.width = 7}
# Discrete fill with the qualitative palette
ggplot(mpg, aes(class, fill = class)) +
geom_bar(show.legend = FALSE) +
scale_fill_civilytics() +
labs(title = "Vehicle counts by class", x = NULL, y = NULL) +
theme_civilytics(grid = "y")
# Continuous fill with a sequential palette
ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
geom_tile() +
scale_fill_civilytics("seq_ember", discrete = FALSE) +
labs(title = "Old Faithful eruption density") +
theme_civilytics(grid = "none")
```
## Themes
Three theme variants cover the most common output contexts. All share the
same typographic structure and accept `grid` and `paper_bg` parameters.
### Editorial (default)
The default theme uses a warm paper background with horizontal gridlines ---
an editorial, Pew-style layout.
```{r theme-editorial, fig.height = 4, fig.width = 7}
base_plot <- ggplot(mpg, aes(displ, hwy)) +
geom_point(aes(colour = factor(cyl)), size = 2) +
scale_color_civilytics() +
labs(
title = "Engine size vs. highway fuel economy",
subtitle = "Colored by number of cylinders",
caption = "Source: ggplot2::mpg",
colour = "Cylinders",
x = "Displacement (L)", y = "Highway MPG"
)
base_plot + theme_civilytics()
```
### Grid options
The `grid` parameter controls which major gridlines are drawn.
```{r theme-grids, echo = FALSE, fig.height = 6.5, fig.width = 7}
grid_opts <- c("y", "x", "both", "none")
grid_plots <- lapply(grid_opts, function(g) {
base_plot +
theme_civilytics(grid = g) +
labs(title = paste0("grid = \"", g, "\""), subtitle = NULL, caption = NULL)
})
gridExtra::grid.arrange(grobs = grid_plots, ncol = 2)
```
### Dark
Dark navy background with light text, suitable for presentations or
dashboards on dark surfaces.
```{r theme-dark, fig.height = 4, fig.width = 7}
base_plot + theme_civilytics_dark()
```
### Slide
Transparent background and larger base font (18 pt), sized for Reveal.js
slides or PowerPoint exports.
```{r theme-slide, fig.height = 4, fig.width = 7}
base_plot + theme_civilytics_slide()
```
### Facets
Facet strips use the `paper_2` tint, with the title font.
```{r theme-facets, fig.height = 5, fig.width = 7}
ggplot(mpg, aes(displ, hwy)) +
geom_point(colour = civilytics_colors["navy_600"], size = 1.5) +
facet_wrap(~class, ncol = 4) +
labs(
title = "Highway MPG by vehicle class",
x = "Displacement (L)", y = "Highway MPG"
) +
theme_civilytics(grid = "y")
```
## Logo utilities
Add the Civilytics logo to any ggplot using the pipe-friendly
`civilytics_logo()` or the lower-level `add_logo()` / `make_logo_grob()`.
The logo is automatically right-aligned below the plot area. Wrap the
ggplot chain in parentheses before piping --- R's `|>` binds tighter
than `+`.
### Wordmark on a light plot
```{r logo-wordmark, fig.height = 4.5, fig.width = 7}
p <- ggplot(mpg, aes(displ, hwy, colour = class)) +
geom_point(size = 2) +
scale_color_civilytics() +
labs(
title = "Fuel economy by engine displacement",
caption = "Source: EPA fuel economy data (ggplot2::mpg)",
x = "Displacement (L)", y = "Highway MPG"
) +
theme_civilytics()
grid::grid.draw(civilytics_logo(p))
```
### Compact mark
Use `type = "mark"` for the compact C-pulse icon instead of the full
wordmark.
```{r logo-mark, fig.height = 4.5, fig.width = 7}
p2_logo <- ggplot(mpg, aes(displ, hwy, colour = factor(cyl))) +
geom_point(size = 2) +
scale_color_civilytics() +
labs(
title = "Engine size vs. highway fuel economy",
colour = "Cylinders",
x = "Displacement (L)", y = "Highway MPG"
) +
theme_civilytics()
grid::grid.draw(civilytics_logo(p2_logo, type = "mark"))
```
### Multi-plot layout with logo
Use `add_logo_ga()` to attach a single logo below a row of plots.
```{r logo-multi, fig.height = 4.5, fig.width = 9}
p1 <- ggplot(mpg, aes(class, fill = class)) +
geom_bar(show.legend = FALSE) +
scale_fill_civilytics() +
labs(title = "Vehicle counts", x = NULL, y = NULL) +
theme_civilytics(grid = "y")
p2 <- ggplot(mpg, aes(displ, hwy)) +
geom_point(colour = civilytics_colors["navy_600"], size = 1.5) +
labs(title = "Displacement vs. MPG", x = "Displacement (L)", y = "Highway MPG") +
theme_civilytics(grid = "y")
logo <- make_logo_grob()
grid::grid.draw(add_logo_ga(list(p1, p2), logo))
```
## Other utilities
The package also includes helpers for public-sector data analysis:
| Function | Purpose |
|:---------|:--------|
| `pretty_count()` / `pretty_per()` | Format numbers and percentages |
| `grade_level_to_num()` | Convert grade labels (KG, 01--12) to numeric |
| `race_short_names()` | Standardize NCES race/ethnicity categories |
| `get_fips()` / `get_stabbr()` | State FIPS code lookups |
| `clopper_pearson()` / `agresti_coull_interval()` | Proportion confidence intervals |
| `match_test()` / `trunc_match()` | Fuzzy join diagnostics |
| `perturb_count()` / `random_round()` | Privacy-preserving data perturbation |
## Maintaining brand assets
Logo and brand mark files live in `inst/img/`. The package ships both
PNG (for ggplot2 raster composition) and SVG (for Quarto/HTML output)
variants:
| File | Format | Used by |
|:-----|:-------|:--------|
| `civilytics-wordmark.png` / `.svg` | Full "Civilytics" lockup | `make_logo_grob("wordmark", "light")`, Quarto templates |
| `civilytics-wordmark-reverse.png` / `.svg` | Light-on-dark wordmark | `make_logo_grob("wordmark", "dark")`, dark slides |
| `civilytics-mark.png` / `.svg` | Compact C-pulse icon | `make_logo_grob("mark", "light")` |
| `civilytics-mark-reverse.svg` | Light-on-dark mark | `make_logo_grob("mark", "dark")` |
| `civilytics-pulse.svg` | Standalone waveform glyph | Quarto slide footer chrome |
To update the logos, replace the files in `inst/img/` with new versions
using the same filenames. The PNG files must be raster images (the
ggplot2 logo functions read them via `png::readPNG()`). SVG files are
passed through as-is by Quarto and HTML templates.
After replacing files, re-render the README gallery to update the
screenshots:
```r
devtools::load_all()
rmarkdown::render("README.Rmd")
```
+866
View File
@@ -0,0 +1,866 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZ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A07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');
}
body {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
color: #333;
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 16px;
line-height: 1.6;
word-wrap: break-word;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
strong {
font-weight: bold;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
img {
border: 0;
}
hr {
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre {
font-family: monospace, monospace;
font-size: 1em;
}
input {
color: inherit;
font: inherit;
margin: 0;
}
html input[disabled] {
cursor: default;
}
input {
line-height: normal;
}
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
* {
box-sizing: border-box;
}
input {
font: 13px / 1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
a {
color: #4078c0;
text-decoration: none;
}
a:hover,
a:active {
text-decoration: underline;
}
hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
hr:before {
display: table;
content: "";
}
hr:after {
display: table;
clear: both;
content: "";
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
h1 {
font-size: 30px;
}
h2 {
font-size: 21px;
}
h3 {
font-size: 16px;
}
h4 {
font-size: 14px;
}
h5 {
font-size: 12px;
}
h6 {
font-size: 11px;
}
blockquote {
margin: 0;
}
ul,
ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ol ol,
ul ol {
list-style-type: lower-roman;
}
ul ul ol,
ul ol ol,
ol ul ol,
ol ol ol {
list-style-type: lower-alpha;
}
dd {
margin-left: 0;
}
code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.select::-ms-expand {
opacity: 0;
}
.octicon {
font: normal normal normal 16px/1 octicons-link;
display: inline-block;
text-decoration: none;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.octicon-link:before {
content: '\f05c';
}
.markdown-body:before {
display: table;
content: "";
}
.markdown-body:after {
display: table;
clear: both;
content: "";
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
a:not([href]) {
color: inherit;
text-decoration: none;
}
.anchor {
display: inline-block;
padding-right: 2px;
margin-left: -18px;
}
.anchor:focus {
outline: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
h1 .octicon-link,
h2 .octicon-link,
h3 .octicon-link,
h4 .octicon-link,
h5 .octicon-link,
h6 .octicon-link {
color: #000;
vertical-align: middle;
visibility: hidden;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
text-decoration: none;
}
h1:hover .anchor .octicon-link,
h2:hover .anchor .octicon-link,
h3:hover .anchor .octicon-link,
h4:hover .anchor .octicon-link,
h5:hover .anchor .octicon-link,
h6:hover .anchor .octicon-link {
visibility: visible;
}
h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
h1 .anchor {
line-height: 1;
}
h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
h2 .anchor {
line-height: 1;
}
h3 {
font-size: 1.5em;
line-height: 1.43;
}
h3 .anchor {
line-height: 1.2;
}
h4 {
font-size: 1.25em;
}
h4 .anchor {
line-height: 1.2;
}
h5 {
font-size: 1em;
}
h5 .anchor {
line-height: 1.1;
}
h6 {
font-size: 1em;
color: #777;
}
h6 .anchor {
line-height: 1.1;
}
p,
blockquote,
ul,
ol,
dl,
table,
pre {
margin-top: 0;
margin-bottom: 16px;
}
hr {
height: 4px;
padding: 0;
margin: 16px 0;
background-color: #e7e7e7;
border: 0 none;
}
ul,
ol {
padding-left: 2em;
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-top: 0;
margin-bottom: 0;
}
li>p {
margin-top: 16px;
}
dl {
padding: 0;
}
dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
blockquote>:first-child {
margin-top: 0;
}
blockquote>:last-child {
margin-bottom: 0;
}
table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
table th {
font-weight: bold;
}
table th,
table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
img {
max-width: 100%;
box-sizing: content-box;
background-color: #fff;
}
code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0,0,0,0.04);
border-radius: 3px;
}
code:before,
code:after {
letter-spacing: -0.2em;
content: "\00a0";
}
pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.highlight {
margin-bottom: 16px;
}
.highlight pre,
pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.highlight pre {
margin-bottom: 0;
word-break: normal;
}
pre {
word-wrap: normal;
}
pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
pre code:before,
pre code:after {
content: normal;
}
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.pl-c {
color: #969896;
}
.pl-c1,
.pl-s .pl-v {
color: #0086b3;
}
.pl-e,
.pl-en {
color: #795da3;
}
.pl-s .pl-s1,
.pl-smi {
color: #333;
}
.pl-ent {
color: #63a35c;
}
.pl-k {
color: #a71d5d;
}
.pl-pds,
.pl-s,
.pl-s .pl-pse .pl-s1,
.pl-sr,
.pl-sr .pl-cce,
.pl-sr .pl-sra,
.pl-sr .pl-sre {
color: #183691;
}
.pl-v {
color: #ed6a43;
}
.pl-id {
color: #b52a1d;
}
.pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.pl-ml {
color: #693a17;
}
.pl-mh,
.pl-mh .pl-en,
.pl-ms {
color: #1d3e81;
font-weight: bold;
}
.pl-mq {
color: #008080;
}
.pl-mi {
color: #333;
font-style: italic;
}
.pl-mb {
color: #333;
font-weight: bold;
}
.pl-md {
background-color: #ffecec;
color: #bd2c00;
}
.pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.pl-mdr {
color: #795da3;
font-weight: bold;
}
.pl-mo {
color: #1d3e81;
}
kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.task-list-item {
list-style-type: none;
}
.task-list-item+.task-list-item {
margin-top: 3px;
}
.task-list-item input {
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
:checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4078c0;
}
.sourceLine {
display: inline-block;
}
code .kw { color: #000000; }
code .dt { color: #ed6a43; }
code .dv { color: #009999; }
code .bn { color: #009999; }
code .fl { color: #009999; }
code .ch { color: #009999; }
code .st { color: #183691; }
code .co { color: #969896; }
code .ot { color: #0086b3; }
code .al { color: #a61717; }
code .fu { color: #63a35c; }
code .er { color: #a61717; background-color: #e3d2d2; }
code .wa { color: #000000; }
code .cn { color: #008080; }
code .sc { color: #008080; }
code .vs { color: #183691; }
code .ss { color: #183691; }
code .im { color: #000000; }
code .va {color: #008080; }
code .cf { color: #000000; }
code .op { color: #000000; }
code .bu { color: #000000; }
code .ex { color: #000000; }
code .pp { color: #999999; }
code .at { color: #008080; }
code .do { color: #969896; }
code .an { color: #008080; }
code .cv { color: #008080; }
code .in { color: #008080; }
</style>
<style>
body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
padding-top: 0px;
}
</style>
</head>
<body>
<h1 id="civilytics">civilytics</h1>
<p>Brand themes, color palettes, and utility functions for <a href="https://www.civilytics.com">Civilytics Consulting</a>. The package
provides a complete ggplot2 theme system drawn from the Civilytics
design system — warm paper backgrounds, civic-navy ink, and editorial
typography — along with 10 curated color palettes, logo composition
helpers, and data-wrangling utilities for public-sector analysis.</p>
<h2 id="installation">Installation</h2>
<p>Install from the Civilytics Gitea server:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a><span class="co"># install.packages(&quot;remotes&quot;)</span></span>
<span id="cb1-2"><a href="#cb1-2" tabindex="-1"></a>remotes<span class="sc">::</span><span class="fu">install_git</span>(<span class="st">&quot;https://gitea.civilytics.org/Civilytics/civilyticsR.git&quot;</span>)</span></code></pre></div>
<h2 id="quick-start">Quick start</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" tabindex="-1"></a><span class="fu">library</span>(civilytics)</span>
<span id="cb2-2"><a href="#cb2-2" tabindex="-1"></a><span class="fu">library</span>(ggplot2)</span>
<span id="cb2-3"><a href="#cb2-3" tabindex="-1"></a></span>
<span id="cb2-4"><a href="#cb2-4" tabindex="-1"></a><span class="fu">ggplot</span>(mpg, <span class="fu">aes</span>(displ, hwy, <span class="at">colour =</span> class)) <span class="sc">+</span></span>
<span id="cb2-5"><a href="#cb2-5" tabindex="-1"></a> <span class="fu">geom_point</span>(<span class="at">size =</span> <span class="fl">2.5</span>) <span class="sc">+</span></span>
<span id="cb2-6"><a href="#cb2-6" tabindex="-1"></a> <span class="fu">scale_color_civilytics</span>() <span class="sc">+</span></span>
<span id="cb2-7"><a href="#cb2-7" tabindex="-1"></a> <span class="fu">labs</span>(</span>
<span id="cb2-8"><a href="#cb2-8" tabindex="-1"></a> <span class="at">title =</span> <span class="st">&quot;Fuel economy by engine displacement&quot;</span>,</span>
<span id="cb2-9"><a href="#cb2-9" tabindex="-1"></a> <span class="at">subtitle =</span> <span class="st">&quot;Highway MPG vs. engine size for 234 vehicles&quot;</span>,</span>
<span id="cb2-10"><a href="#cb2-10" tabindex="-1"></a> <span class="at">caption =</span> <span class="st">&quot;Source: EPA fuel economy data (ggplot2::mpg)&quot;</span>,</span>
<span id="cb2-11"><a href="#cb2-11" tabindex="-1"></a> <span class="at">x =</span> <span class="st">&quot;Engine displacement (litres)&quot;</span>,</span>
<span id="cb2-12"><a href="#cb2-12" tabindex="-1"></a> <span class="at">y =</span> <span class="st">&quot;Highway MPG&quot;</span></span>
<span id="cb2-13"><a href="#cb2-13" tabindex="-1"></a> ) <span class="sc">+</span></span>
<span id="cb2-14"><a href="#cb2-14" tabindex="-1"></a> <span class="fu">theme_civilytics</span>()</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAGACAIAAAD9Gkc5AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdZVwUWxsA8LPA0g3SHSKgIBKSIhImqNit2K332nXt1tfu7gIVCwkFBQVROqW7u1nYfT8MDiMsy8JSrs//tx9mz8ycc2bmzD47M2dmSPU15QgAAAAA7IWjtysAAAAAgK4HAR4AAABgQxDgAQAAADYEAR4AAABgQxDgAQAAADYEAR4AAABgQxDgAQAAADYEAR4AAABgQxDgAQAAADYEAR4AAABgQxDgAQAAADYEAR4AAABgQxDgAQAAADYEAR4AAABgQxDgAQAAADYEAR4AAABgQxDgAQAAADYEAR4AAABgQxDgAQAAADbExeL8s5du8vP/1u5kfDy8P0M8WCyLSf2HjKqpq8WG37te0xmg0TPlgnbBpkEIaRmOrq6twYY93a5ra6n3bn1ai41PcnBeiA3je26vVBsaDACsYDXAV1RU1dTWtTsZM9N0leKyMny4uqa2x8oF7YJNgxAqKi3Fh6uqa3qxJm2pqq7Bd1h8oFeqDQ2maxUWl1y/60pCCCHEx8e7esnsXq4Q6GasBngAAAB/hIjon8fOXMe/QoBnez10DV5ESLBnCgKgjxMS5McGuLi4xESEe7cyzPtDqw2IiopKersKoEd15RG8650z1hbGXZghAOwnJdynt6vQGX9otQFRXkFRb1cB9KiuPIIX4OfrwtwAAAB0ody8AuLXhoaG3qoJ6Bk9fQ1ec4hDSVkFNvz57T1iX1wto9FFJaUIIRKJ9PntvQH91YgzlldU3Xzg9ua9b2x8EqWhUbqfuJnx4EVzpxgZDGSxSh3NubC45Nrtp54fAhKS0+rqKVL9JCyHGix1mW4wSLv1xLn5hdduP/X0/ZKcmtHQ0Cgn08/MZPDCOZOH6OkQJ1PUHY73ZvJ9dVtbS/2R69u7T9yjYxMaGhsH6fTfsMrFYYRFF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zt//ydElLyeND+cX0uli1hqFQnnj6efh4x8WGZeTm9eityZRh/bc7m4zfa1cwN668gieh5u7C3PDlJQx28m/oIMPaepozmUVlXiKAL2bcIiIE7f4L8/Px0P8Wl5Fp1tvu7o7fwYmjx+FD5eUVXj7ffH8GIB1h5aWkrSx7OSTjoiHNcQu2awU132NB3fpf7vx/nRhUXHW4+bKDhhm5jADv5qgM0CDeD2+q7C+aMQe7Pzttee2bPtn6cwpdPpAFJeWvfL46LJq++gpS7B7XxnjJhzoUyjt35z9IzzGfOSMRWt2Pnv5PjE5raq6lkQi4RcIWujQntsDbaZPlQvYW19/Fj0PNxm/3VNVRaGtZ2SSSCQhQYFuzVlIkB/vhVvZ3ss2BAX48B/QFi/aafFVSIAfdVx358+AmooC8bD1kes7Kmo6Fzp94mhmDtfoIr6/hBhvWCmu+xoPTklB9uOrO9MWrMdriCGTuQYP0p7k6DBnmhMPT9f/8WV90bi5yXW/+sd0+l1Q3NzkM4e3L5k75fHzd1+CQqPjk1o8OyUkPOafbUduXzzUVg6YiqrmfxvEv3p0xcQlTpy1En/3zKwpjgvnTNIdoEGlUmUHDGs9fYf23B5oM32qXMDe+nqA11RTjvjVcfTk/s1WZka9lbOGmnJIeAw2HPczeYTVUOLYoLine truncated
<h2 id="color-palettes">Color palettes</h2>
<p>The package ships 53 named brand colors in
<code>civilytics_colors</code> and 10 curated palettes in
<code>civilytics_palettes</code>. Use <code>civilytics_palette()</code>
to retrieve colors by name, or pass palettes directly to the ggplot2
scales.</p>
<h3 id="palette-gallery">Palette gallery</h3>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAANgCAMAAADEfSr3AAAC9FBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4OGisPDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZEC4aGhoaLkobGxscHBwdHR0fHx8fb3AgICAhISEiIiIiQGojIyMkJCQlJSUm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hdCrkn8d8p5C7x2xRyl/hVCrlL/CSFnBW+nULuSfxZCgEUoAAFKEABClCAAhSgAAUoQAEKUIACFKAABShAAQpQgAIUoAAFKEABClCAAhSgAAUoQAEKUIACFKAABShAAQpQgAIUoAAFKEABClCAAhSgAAUoQAEKUIACFKAABShAAQpQgAIUoAAFKEABClCAAhSgAAUoQAEKUIACFKAABShAAQpQgAIUoAAFKEABClCAAhSgAAUoQAEKUIACFKAABShAAQpQgAIUoAAFKEABClCAAhSgAAUoQAEKUIACFKAABShAAQpQgAIUoAAFKEABClCAAhSgAAUoQAEKUIACFKBE2Q2gZHQAJaMDKBkdQMnoAEpGBLine truncated
<h3 id="using-palettes">Using palettes</h3>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" tabindex="-1"></a><span class="co"># Discrete fill with the qualitative palette</span></span>
<span id="cb3-2"><a href="#cb3-2" tabindex="-1"></a><span class="fu">ggplot</span>(mpg, <span class="fu">aes</span>(class, <span class="at">fill =</span> class)) <span class="sc">+</span></span>
<span id="cb3-3"><a href="#cb3-3" tabindex="-1"></a> <span class="fu">geom_bar</span>(<span class="at">show.legend =</span> <span class="cn">FALSE</span>) <span class="sc">+</span></span>
<span id="cb3-4"><a href="#cb3-4" tabindex="-1"></a> <span class="fu">scale_fill_civilytics</span>() <span class="sc">+</span></span>
<span id="cb3-5"><a href="#cb3-5" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">title =</span> <span class="st">&quot;Vehicle counts by class&quot;</span>, <span class="at">x =</span> <span class="cn">NULL</span>, <span class="at">y =</span> <span class="cn">NULL</span>) <span class="sc">+</span></span>
<span id="cb3-6"><a href="#cb3-6" tabindex="-1"></a> <span class="fu">theme_civilytics</span>(<span class="at">grid =</span> <span class="st">&quot;y&quot;</span>)</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAFQCAIAAADvJFsWAAAACXBIWXMAA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x6+PhJTvfsplaR5Nz/jVt31ekC+fMYz2rv30QN+I3bXp1W/zjl6+cVmoyKURNnqOn+Rc9Owwf2UqZN/2+Rpi7SpD8BSE/LQ/RCiCoVy7q5JnMRU61qFZXLiRMxvkrO+HI8RUhoWM/+3wVu3PHixQtt29mw7qv/NtYEbkkUHv0Hj2nQqptXmfpbd+5P8tZX0t/4NDWjntEVDMa5JYTYuvuAOl2zaoWkj/qPin51Djj44eOUtym9Em3svfsPvhwyZvi/d+fr9TZ+ZUp8HvBR0PLpry0W/NrzbpN14fI145ebtr+65ND4kkYhRMsm9WxtXztnIYSoWK6Ut1dB01VoMir2HTymTtep+eqhjffuP0h2+TR1kYb9CUB6Gge8paVl04Y1k5a3aJT88+e7dGit3sM9c8GK6XP/iImJVV6eOHO+6YefrQ7aGtBnaOdeg7VtZ9ePW7s4vfyH4+TZC8NH/6rc1BcfHz9y7DQlPq2sLP1MPms2/Y1PUzMCOrZWL2LYvLine truncated
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" tabindex="-1"></a></span>
<span id="cb4-2"><a href="#cb4-2" tabindex="-1"></a><span class="co"># Continuous fill with a sequential palette</span></span>
<span id="cb4-3"><a href="#cb4-3" tabindex="-1"></a><span class="fu">ggplot</span>(faithfuld, <span class="fu">aes</span>(waiting, eruptions, <span class="at">fill =</span> density)) <span class="sc">+</span></span>
<span id="cb4-4"><a href="#cb4-4" tabindex="-1"></a> <span class="fu">geom_tile</span>() <span class="sc">+</span></span>
<span id="cb4-5"><a href="#cb4-5" tabindex="-1"></a> <span class="fu">scale_fill_civilytics</span>(<span class="st">&quot;seq_ember&quot;</span>, <span class="at">discrete =</span> <span class="cn">FALSE</span>) <span class="sc">+</span></span>
<span id="cb4-6"><a href="#cb4-6" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">title =</span> <span class="st">&quot;Old Faithful eruption density&quot;</span>) <span class="sc">+</span></span>
<span id="cb4-7"><a href="#cb4-7" tabindex="-1"></a> <span class="fu">theme_civilytics</span>(<span class="at">grid =</span> <span class="st">&quot;none&quot;</span>)</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAFQCAIAAADvJFsWAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydd3gU1dfHz/b0hBASSkJCQu+CFAEpgkgRpItiAUFExIb+FBUUe8PyolhAkaYCUqQLiBRBEJQOgQQICQkJENLL1pn3j8VlSc4ms5ndbLL5fh4ent2zd+69OzPZM997zz1XYSzOIwAAAAB4F0pPdwAAAAAArgcOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAAL0TtwrrMZvPm7XvWbfrj+Omz1zKzRFEMr1O7bctmg+/pOWRAH41GU/qQph0GFBv01tdbV3/XsnnjspuIP3u+/4iJ1te+Op+Ew785KmlfcxmUXUkZNOs4sEhfbH29bc33LZrFST/W2W9tw2w2f/ndjyvX/JZ6OUMURSIK9Pc/fXCTMx13QTe8ADmXr3KQfqt7iqp/DgGo4bjMwR87dfbJ6bMTzl20NyYlpyYlp67bsqNR9PxvPn2zY/tWJY7Kys21vS4qLt8fFxYVF+sN1te2Fyz2NZdB2ZWUwfWcHPte2X+UmZX9/dLVCiIi8vX1eXryQ2X0Tcq3tjHrvbkLFv9ib6lw/+V0o1pQ9lUo4/JVEaTf6p5Czp8AAKAScI2D3/PXPw8+/qL+v58hhULRODZarVadSbhgFZpJyWlDHnhy6bcf9e3Z1SUtVmWOn0r4eO73treu+nXLyy9cuGyN7a2Pj65l01gfHx+XVO59uOkqACng5ANQFXCBg0+7nPHYU6/avHvrFk1+mPdeo+hIIrqUlvHYU68eORFPREajaeK0V3dvWhYdVV9+o64i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RiMySmX7UPDKoyzt7qcayGFB0YN/vK/8Qm93rBm4+9rNv5ORKEhwd27dhh+b7/B/XupVKoy6ygfhULxwMjBH/2X6m7dpt/fnfmcKIrrt9xYWD9uzFCZTQAASL6Db1DvllXvl9OvlHbwJRbFNi3vl9EWI01Efr4uSMWq02qlFPv32Okpz7+elJxmsygUCpVKVcNX8Wbn5pVfiIiIrl3ProBTkYPWTlA6Wqcgndz8AtvrEjeen6/O/m1eYaHMtqw4e6u7+1q8Ov2JrJxc+0WtVrJycjf8tnPDbzs7tGv58/ef1K4V4mzNJRh13wCbg8/Ozf99918Wi2A9GxHhYX16uDgtFQA1E7kOvmXzW7aQOn32fOnoHvuJPSLqbDeWyKLVagz/TZBX2jYbp8+cGz7uKduCtHGjh0x8eGSr5o0FQbCuOK+x6LQa21VoFBPpKLGrQqEIDPCvxH4REeXbDQ75+ujKKCmFAH9fm8ctceOVeBvozwSTVgBnb3V3XwutVjP3g9cmPzJ6xdotf/195NTZ8yWebg8fOz391Q8Xf13OcpJyiY2J7Nyh7cHDN2bfl6/eItCNya+xwwfKHyQAAJB8B18i4mb7rv1j7CJorOzYdctCKfvAKJZ6EXUuptyQ0UnJqS7PMsvyziff2Lz7s088PLine truncated
<h2 id="themes">Themes</h2>
<p>Three theme variants cover the most common output contexts. All share
the same typographic structure and accept <code>grid</code> and
<code>paper_bg</code> parameters.</p>
<h3 id="editorial-default">Editorial (default)</h3>
<p>The default theme uses a warm paper background with horizontal
gridlines — an editorial, Pew-style layout.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" tabindex="-1"></a>base_plot <span class="ot">&lt;-</span> <span class="fu">ggplot</span>(mpg, <span class="fu">aes</span>(displ, hwy)) <span class="sc">+</span></span>
<span id="cb5-2"><a href="#cb5-2" tabindex="-1"></a> <span class="fu">geom_point</span>(<span class="fu">aes</span>(<span class="at">colour =</span> <span class="fu">factor</span>(cyl)), <span class="at">size =</span> <span class="dv">2</span>) <span class="sc">+</span></span>
<span id="cb5-3"><a href="#cb5-3" tabindex="-1"></a> <span class="fu">scale_color_civilytics</span>() <span class="sc">+</span></span>
<span id="cb5-4"><a href="#cb5-4" tabindex="-1"></a> <span class="fu">labs</span>(</span>
<span id="cb5-5"><a href="#cb5-5" tabindex="-1"></a> <span class="at">title =</span> <span class="st">&quot;Engine size vs. highway fuel economy&quot;</span>,</span>
<span id="cb5-6"><a href="#cb5-6" tabindex="-1"></a> <span class="at">subtitle =</span> <span class="st">&quot;Colored by number of cylinders&quot;</span>,</span>
<span id="cb5-7"><a href="#cb5-7" tabindex="-1"></a> <span class="at">caption =</span> <span class="st">&quot;Source: ggplot2::mpg&quot;</span>,</span>
<span id="cb5-8"><a href="#cb5-8" tabindex="-1"></a> <span class="at">colour =</span> <span class="st">&quot;Cylinders&quot;</span>,</span>
<span id="cb5-9"><a href="#cb5-9" tabindex="-1"></a> <span class="at">x =</span> <span class="st">&quot;Displacement (L)&quot;</span>, <span class="at">y =</span> <span class="st">&quot;Highway MPG&quot;</span></span>
<span id="cb5-10"><a href="#cb5-10" tabindex="-1"></a> )</span>
<span id="cb5-11"><a href="#cb5-11" tabindex="-1"></a></span>
<span id="cb5-12"><a href="#cb5-12" tabindex="-1"></a>base_plot <span class="sc">+</span> <span class="fu">theme_civilytics</span>()</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAGACAIAAAD9Gkc5AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdZ1wTSRsA8Akp9F6l96ogKqCggh27Yq9n711PfS136ul5euqpp56994IKVhQBpSmKgNJ7770F0t4Pi2tIQhJIAInP/+eH3cnO7GRZ8+zOzswSGuurEAAAAAAki1RnVwAAAAAA4gcBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJB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WyDbv6Dptu1GOQprmrXV/ejagEAmHGpO+H/fHT1w0NjVRqg8/zpvkAZk0dJ+I3ai2xnHViKTkhKQ1PtDA35l94YvL33iGmxgbsHxkbfV9taGjkuCgUUnuX35If8AwBnUWcveh9bp0SpT2Wj9P/7PKaszojKxchFPU1wX0M5+gOW2tz9mer4lJeWSV4I4QQQsWl5TxDxbYNS8sqKm/ee8KRXlZR6fsiwPdFQC8H21sXDnPccfLEYDCWrPsd78asoqR47tgfeKu4uCqMELIwM3buZLine truncated
<h3 id="grid-options">Grid options</h3>
<p>The <code>grid</code> parameter controls which major gridlines are
drawn.</p>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAJwCAIAAADZYES9AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdZ1xTVx8H8JPN3hD23lsREBVExb23rXWPah1V63xqW2ut2tYuq61aZ917b3GDIIKC7L33HtnjeRENIblASEIg8P9+fJF7cnPuAfnlJPeeew6ORa9HAAAAAOhZ8F3dAAAAAAAoHnTwAAAAQA8EHTwAAADQA0EHDwAAAPRA0MEDAAAAPRB08AAAAEAPBB08AAAA0ANBBw8AAAD0QNDBAwAAAD0QdPAAAABADwQdPAAAANADQQcPAAAA9EDQwQMAAAA9EHTwAAAAQA8EHTwAAADQA0EHDwAAAPRA0MEDAAAAPRB08AAAAEAPBB08AAAA0AN10w7exW+0lUeo4F9KWla7+6ekZQn3d+47qpNa9c2OP4RHOXXhBmZJd6gTANXSe/LeedUCIInY1Q3AVlVbK3zcRKO3u38TjU5nMAWPhQ8UTkdXR1i5gb4uQkhbR1uspDvUCYBq6T1577xqAZDUTb/Bd0+2VuYijy0QQnbWFmIl3aFOAID8OimbEHmgNN20g9fW0hA8IBKJ+ro6XdsYIVuRHFpbWSCErCzNxEq6Q50AqJbek/fOqxYASd30FH1OfHhXNwGD9ceP3kYG+lqa6gghm4/JFJZ0hzoBUC29J++dVy0AkrrpN/juycTIQF2NghCytvo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JoweKjnrS0/l7DequraOTCaZm5oEB/mt/WK+taVZVzcKAMWAvAOgKhTQwQMAAACgu1Hw7JIAAAAA6A6ggwcAAAB6IOjgAQAAgB4IOngAAACgB4IOHgAAAOiBoIOXRU5h2fvUPD6f39UNAQB0Osg7UFHyzmSniqLi0h69fJdfXM7jI1Nj/QH93EYM8iUSCW2/av5XfyCE/rdiurO9xR+Hr9c30ndvmks11pf+uOnZRTv3X0QIHf91jTzt71o1dQ2T522ua2i6fXqPualR+y9QqP1HLx8+fVO0ZOq40K1r5yu5GeWV1b8dOB/xOoHOYDraWi34ZPTIIf2V2YCauoa/Dl98Hvmuuq7B1MRgwsjgRZ+OJZFIymyDqoC8ywPyjlQ5772ugz959XH4ywQcDjnbWRCJ+LTs4gs3XySn561bPEm47lO7dm2az+awdVVw7VcOh9vuW1vb9vx9xtLcpC4tR55K+Fw2jiBLb1RUWuHsYLV68QxhiWlH3nNFcTlcgky/irqGxvmrf9TUUP9q+Sd62lovYxI27zjQ1MSYMi60w23g8vB4XEcXKeByecs2/FJdU7dw9ngLqlFKZt7xc3cKi8t3bFna0Qb0eJB3yLtA78x77+rgc4vKw18mEAj4DZ9PcXWwRAiVlFf/8Oe5xLT8FzHJgwM9paxHQ52MELkzW9oCj8eT/s0IE5vDOX715dlbUcXltSYGOpPC+i6bNVRDvcM/QlRsYlxC+rplMzdu/1uGZnDpTUXX/qyMuMqqLacYW1KHzzMbuaBDyS+vqHGwtRgYIPsqJiw66+Hpe68fRNdX1elTDQaMHxQ6bSiR1IEgHD51k0gknti7VUNDDSEUOqgvj88/eel+hwL/7k3Wkf0PMlKKCES8T1+7patH2zqaSvnajJz89Kz8w79v9vN2RQgNHthHW0tjz99ntqyeq6mpJn0bejzIO+S9l+e9d3XwSWl5CLine truncated
<h3 id="dark">Dark</h3>
<p>Dark navy background with light text, suitable for presentations or
dashboards on dark surfaces.</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" tabindex="-1"></a>base_plot <span class="sc">+</span> <span class="fu">theme_civilytics_dark</span>()</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAGACAIAAAD9Gkc5AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdd5gkVbkw8PecU1VdHacnh53ZyAYWWHYBQZCMgaCCiAiYvYqIckW96mdEUTBeAwoKKNcACAIGJEhccs67sCzLwsbJuWOFc873R83W9ExXh+nuSb3v7+Hh6amuPnW6urbeOpm0rTkZEEIIIVRd6GxnACGEEEKVhwEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqpJT5+at+8uWj33pgMXv+7Hc3/v7628s8XPGev/tqv+5zXp/68W9sfmPXjB26ZPMxzxX3wt2/13XNeX3qJ765eevO/PtX9qRN9ejzF6P03A+/+/STj1nQ0kApAYB4InXISZ+ZmaPvPecZoVlUboCPhIO6Tytmz1DAX+axpqS2Juy+9s/soUs2H/NccdGakPva79cL7l/ZkzbVo89f37rwI5/44EmZW4r8h1wRe895RmgWlRvgEULzTijg/8gZ73T/TBvm5td3pNLmLGYJIVRxMxfgh0fjM3YsAIglkuFgAABs2x4ZmdFDl2w+5nnW4UkrwZJFrQpj7p+f+OKPH3/25VnMD0JoOlQywH/o8z949OmNFUywHAcc/8nZzsKUzcc8zzo8aSVgGdEdAJ587pXZyglCaPpUshd9ImVUMDWE0DTxqROe7AnF0TQIVaFZaIPf9OCf3G7PJ334q5tf33nGKceedepx+65YpDD28uY3f/WHv69/7PnsD647YPn7TzrqoANWdixoDAX8ts27+wefe2nLdf+456nnX13c3vLFcz9w/JHrfnH1zdf89Y5JR9m0ZUc5hw4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7sb1j72Quc8zGTHj7UcdlOsoI6Pjvcx+efEFv7r4grPee9zShW0AsKOz95bbH+KcF59nADj28LWf+cj4HeHyP/4zc2hi+RnmnP/jzvEbxGknHu1ULx9+yH7NjbUAkDZM9+5Q8W83yb2PPue+Hpk4jwLJW0dfkWummKNv2bbbrUgI+PXD1u0LAMdmTd58/JEHAUBDXWTNvssAYHA49vSe5560YT72zMZf/v7mL1/8W9seP11+fULHC8rG/qk++fymnV297na3Dva0k8Yev+556JnhmZ0PoPyrrlIpv/PoQ9yN/7r7scz9b7n9oZVHf/To9/33Gede5PRue8dRB7vv3v3gM5k73/fweJvXUYeumTSqEIq7e5ST/tbt47VTKWPCBESZtSDpjLfc487BKwTNlmnvZJcyyh07t6u775kXN7vPof970flfveTKLW/uXtze9KNvnOvutv6x5zPbwypi9YrF7uu/XvHtXLtFa8LNjbWeR7/5tgc+85H3Oq91n3bqu97m1JINDseeePblf9/7+F3rnxJuN5tCmhqi/3vR+e6/5Gdf3PyLq26qbIYB4MZb7z93T6misb7muLetu/fhZ884Zawof8f9T7pd6yv77SpoJq+Zux942j0Jx7/toLine truncated
<h3 id="slide">Slide</h3>
<p>Transparent background and larger base font (18 pt), sized for
Reveal.js slides or PowerPoint exports.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" tabindex="-1"></a>base_plot <span class="sc">+</span> <span class="fu">theme_civilytics_slide</span>()</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAGACAIAAAD9Gkc5AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdZ1zTWhsA8KdA2XtvBFFAQBRREPfGjeBeuPde14t63de9t173xL1RcaCCiCBbZe+99yzt+yG+MbQFWmgB8fn/+EBOTpKT5LRPk5xzQmOxWIAQQgih1kWkuQuAEEIIIcHDAI8QQgi1QhjgEUIIoVYIAzxCCCHUCmGARwghhFohDPA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5rfPooeTkwL492TJsWLuEeuONMwP1TmfLqai/QSt6Nm0N9dlSJCXYv/hq5jegPtSZuXDN0b1b2hkbAgCLxfrk+3XHvmPU/A24M9+wsj2k3P8EAEZ1NecTprSMLOrkqzcf6mgOJi8vm5dXQE4OHDnZefTQnvbd7Lp2Jpp4iIqKjqr5geFXdk7utHkrye9uANDW0jh3fDe1AYvA9wsARg0bpKKsRA14l2/cG9S/F/k/mT7HZQL5BdEEB4TToH492drJU1vY8kXgVZffso0ePvjRMw9y0t3D85/1ywHgs18g9TY76dmLN06jHIh/qCuh5hERETE3a29u1Line truncated
<h3 id="facets">Facets</h3>
<p>Facet strips use the <code>paper_2</code> tint, with the title
font.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="#cb8-1" tabindex="-1"></a><span class="fu">ggplot</span>(mpg, <span class="fu">aes</span>(displ, hwy)) <span class="sc">+</span></span>
<span id="cb8-2"><a href="#cb8-2" tabindex="-1"></a> <span class="fu">geom_point</span>(<span class="at">colour =</span> civilytics_colors[<span class="st">&quot;navy_600&quot;</span>], <span class="at">size =</span> <span class="fl">1.5</span>) <span class="sc">+</span></span>
<span id="cb8-3"><a href="#cb8-3" tabindex="-1"></a> <span class="fu">facet_wrap</span>(<span class="sc">~</span>class, <span class="at">ncol =</span> <span class="dv">4</span>) <span class="sc">+</span></span>
<span id="cb8-4"><a href="#cb8-4" tabindex="-1"></a> <span class="fu">labs</span>(</span>
<span id="cb8-5"><a href="#cb8-5" tabindex="-1"></a> <span class="at">title =</span> <span class="st">&quot;Highway MPG by vehicle class&quot;</span>,</span>
<span id="cb8-6"><a href="#cb8-6" tabindex="-1"></a> <span class="at">x =</span> <span class="st">&quot;Displacement (L)&quot;</span>, <span class="at">y =</span> <span class="st">&quot;Highway MPG&quot;</span></span>
<span id="cb8-7"><a href="#cb8-7" tabindex="-1"></a> ) <span class="sc">+</span></span>
<span id="cb8-8"><a href="#cb8-8" tabindex="-1"></a> <span class="fu">theme_civilytics</span>(<span class="at">grid =</span> <span class="st">&quot;y&quot;</span>)</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAIAAAD17khjAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdZ1gTWRcA4Jseeu8gSBURFBuCoqiABRv23ntfP1exrr3s6q666tp7711RREXACgqoCAoiRXqHkJ7vx+AwJJRAgglw3ocfM3faYSaTk5m59w6JW1aEAAAAANC0kBUdAAAAAADkDxI8AAAA0ARBggcAAACaIEjwAAAAQBMECR4AAABogiDBAwAAAE0QJHgAAACgCYIEDwAAADRBkOABAACAJggSPAAAANAEQYIHAAAAmiBI8AAAAEATBAkeAAAAaIIgwQMAAABNECR4AAAAoAmCBA8AAAA0QZDgAQAAgCYIEjwAAADQBEGCBwAAAJogqozLj5v1e0joG2w48OqR1q1sJeexaefD5fHE5nHo0I/FLsMKH1476uhgI0sY9u37lnHYNYfR2BH/R8yCWeOXLZwuOeedwKdzlqwTKyTuFslVYUgkkoaamrWVuadHx+GD+li3tKguGJFIFPT0xY27Qe+iY9Mzs0Uika6OlnNrBz/f7oP792Yw6HX6d5rAIavrvyOXz7+S7EMlCQMAIEbWBF9SzCpjc7BhVlkVOQMhVFhcgg/j8+QWFOCFpawyGcPIKyyU3EQTQ/wfMWcu3fl9wTQSiSRWfv7aXfyg4Ii7RXJVxNkyc3JfvI36699jMyeNXL9iPpUq/iFJSEyevWTdu5hYYmFJKSs5Nf3uw6db/zn0z5YVXt06S//vNIFDVtd/Ry6ffyXZh0oSBgBADNyib8R+pGe+ffdBrLC4hPX0+WvZVy4SiQ6euDh7yXqRSEQsj4z+5Dt0mlh2J0pJyxgxefGFq/dkjwEAAEC9KSzBa6irYgNUKlVHS1NRYTR21+8GiZU8fBLG4XDltf4bd4NuEDaRk5c/fsbv+C0ZTQ213VtXfokMTP349NKJXTbWLbBykUi0aMWWqI9x8gqj6YHPPwCgocl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olIoxNGenl2u3n6ErxkbkHEH0mi0kf599x05h41evhG4dtlcKpX6/EVEZlYOQojJZAz9+VMG/1WBEOrdw524HrcOLvjww8ehIpFI8mG2NJ/AKt1/FIIPDxvoS5w0elh/4s2AGsgYvLzCqOsJoq2pgdcbnb1kfX/vYE+Pju4d29lYt7BqYYY/oavHzAA0W/JM8LfO75f81czl8kwdpU02LcxNOrd3eR1ZfnE2b+mG3dtW2ttaJSWnER/X9e7RxcTYUMZo/Xx67D18Fht+9CTcq1vnoKcvEEKqKkwNDXXsSz8hMTnxW8rLt1HYbH28u1EqpyIej3f34bMHj0Pfx3xOz8jE70lKIpFIY4b5/bnnKDZ6827Q5tWLRSLRrfvl7aHH/Xz6KyU1VZXe3d3vPXqGjc77fQO+defW9vX+jlNhMszNTNw7tR09tH9nQj5ACOnr6WLXypjC4mJDRvlTAAZNnh8kU5OKg5uemYMNyL4Dx48ciCf47Ny8oCcv+vp4Xvh5KT+gjxdenTDmU8WPlaETFlS3wvzC4ozMbNk/irjP8Yn4sJ2tVf1WInvwcgkDI/0JMma4H34+stmca3eCrt0JQgjpamt17dLef4C3n28P/Oyr08wANFvy/F6m02hVFNKrKKzBgX/WDZ2wICk5DSH0/sPnHgPEmzy1bmVLfB5fb/19uuPfEUEhL5bkT37/4TNCyNvLo2ULs90HTLine truncated
<h2 id="logo-utilities">Logo utilities</h2>
<p>Add the Civilytics logo to any ggplot using the pipe-friendly
<code>civilytics_logo()</code> or the lower-level
<code>add_logo()</code> / <code>make_logo_grob()</code>. The logo is
automatically right-aligned below the plot area. Wrap the ggplot chain
in parentheses before piping — R’s <code>|&gt;</code> binds tighter than
<code>+</code>.</p>
<h3 id="wordmark-on-a-light-plot">Wordmark on a light plot</h3>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1" tabindex="-1"></a>p <span class="ot">&lt;-</span> <span class="fu">ggplot</span>(mpg, <span class="fu">aes</span>(displ, hwy, <span class="at">colour =</span> class)) <span class="sc">+</span></span>
<span id="cb9-2"><a href="#cb9-2" tabindex="-1"></a> <span class="fu">geom_point</span>(<span class="at">size =</span> <span class="dv">2</span>) <span class="sc">+</span></span>
<span id="cb9-3"><a href="#cb9-3" tabindex="-1"></a> <span class="fu">scale_color_civilytics</span>() <span class="sc">+</span></span>
<span id="cb9-4"><a href="#cb9-4" tabindex="-1"></a> <span class="fu">labs</span>(</span>
<span id="cb9-5"><a href="#cb9-5" tabindex="-1"></a> <span class="at">title =</span> <span class="st">&quot;Fuel economy by engine displacement&quot;</span>,</span>
<span id="cb9-6"><a href="#cb9-6" tabindex="-1"></a> <span class="at">caption =</span> <span class="st">&quot;Source: EPA fuel economy data (ggplot2::mpg)&quot;</span>,</span>
<span id="cb9-7"><a href="#cb9-7" tabindex="-1"></a> <span class="at">x =</span> <span class="st">&quot;Displacement (L)&quot;</span>, <span class="at">y =</span> <span class="st">&quot;Highway MPG&quot;</span></span>
<span id="cb9-8"><a href="#cb9-8" tabindex="-1"></a> ) <span class="sc">+</span></span>
<span id="cb9-9"><a href="#cb9-9" tabindex="-1"></a> <span class="fu">theme_civilytics</span>()</span>
<span id="cb9-10"><a href="#cb9-10" tabindex="-1"></a></span>
<span id="cb9-11"><a href="#cb9-11" tabindex="-1"></a>grid<span class="sc">::</span><span class="fu">grid.draw</span>(<span class="fu">civilytics_logo</span>(p))</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAGwCAIAAAD5YECUAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdd1wT5xsA8PcuCwgBwt57I4iiooA4cODAvWrVWrfWOlutdWvVn611a617r9a6916ooICAIIrsJXtm5+73BxACBEwwBojP99PPp/Lmcvdc7r33uXvvvTtMwC1FAAAAAFAveHMHAAAAAADlgwQPAAAAqCFI8AAAAIAaggQPAAAAqCFI8AAAAIAaggQPAAAAqCFI8AAAAIAaojZ3AJ+DyLq0afbpFDF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O9ob4ZLRbGJxzQ6KMXuOCjK/eq7yM8Gb+9fSx8y2xZE49dpNSQ8ebhYcHKitYMtOd/VrL/2r4xbd/Tw2RL6sDJEoSkoqI331MeUFoITaKPdGFCYnp0h+RIpFUA876U2EsTr0akc7f+/zBp40rUZ93m4oTE6tWS+qVZ8+TtL5ENPtENSOfvG+QuuFMTsHBrIe3qgcmUvy3l7cPPTaIY+gAd+PHTLcz+ITW7VeLTLq0smT8vxFnVokVyREacrrOw8jIhLS03OLyjkiESIRQsXJUmOGxaRk7ZvehjRtEyhpj1blXgC+EJUneBLJOLine truncated
<h3 id="compact-mark">Compact mark</h3>
<p>Use <code>type = &quot;mark&quot;</code> for the compact C-pulse icon instead
of the full wordmark.</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1" tabindex="-1"></a>p2_logo <span class="ot">&lt;-</span> <span class="fu">ggplot</span>(mpg, <span class="fu">aes</span>(displ, hwy, <span class="at">colour =</span> <span class="fu">factor</span>(cyl))) <span class="sc">+</span></span>
<span id="cb10-2"><a href="#cb10-2" tabindex="-1"></a> <span class="fu">geom_point</span>(<span class="at">size =</span> <span class="dv">2</span>) <span class="sc">+</span></span>
<span id="cb10-3"><a href="#cb10-3" tabindex="-1"></a> <span class="fu">scale_color_civilytics</span>() <span class="sc">+</span></span>
<span id="cb10-4"><a href="#cb10-4" tabindex="-1"></a> <span class="fu">labs</span>(</span>
<span id="cb10-5"><a href="#cb10-5" tabindex="-1"></a> <span class="at">title =</span> <span class="st">&quot;Engine size vs. highway fuel economy&quot;</span>,</span>
<span id="cb10-6"><a href="#cb10-6" tabindex="-1"></a> <span class="at">colour =</span> <span class="st">&quot;Cylinders&quot;</span>,</span>
<span id="cb10-7"><a href="#cb10-7" tabindex="-1"></a> <span class="at">x =</span> <span class="st">&quot;Displacement (L)&quot;</span>, <span class="at">y =</span> <span class="st">&quot;Highway MPG&quot;</span></span>
<span id="cb10-8"><a href="#cb10-8" tabindex="-1"></a> ) <span class="sc">+</span></span>
<span id="cb10-9"><a href="#cb10-9" tabindex="-1"></a> <span class="fu">theme_civilytics</span>()</span>
<span id="cb10-10"><a href="#cb10-10" tabindex="-1"></a></span>
<span id="cb10-11"><a href="#cb10-11" tabindex="-1"></a>grid<span class="sc">::</span><span class="fu">grid.draw</span>(<span class="fu">civilytics_logo</span>(p2_logo, <span class="at">type =</span> <span class="st">&quot;mark&quot;</span>))</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAGwCAIAAAD5YECUAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdd3wT5RsA8Ocuq0n33rulk9JSyt5D9h6CgixFQRQUlR8yRBHciiJDAQWUDbL33pRSOunee+9m5+73R5s0bdM2pWkL6fP98Ad9kzf3XO7NPXfvve8dIRZUAEIIIYS0C9nZASCEEEJI8zDBI4QQQloIEzxCCCGkhTDBI4QQQloIEzxCCCGkhTDBI4QQQloIEzxCCCGkhZidHYAG0PyMS/sOH39WIDN2HzNvzhw/Q6KzQ3ph2rQu7YDKOfvj8iNpMgAAIEyHbf5lpo96TbgdvtgXD0YbUZVpoecvPQ6Oy8wrE0hJtq6JpYuLW88BA0b2sOR2UCPGLYJQPS03f6rwxucfn4yVNfsmg4Ebf38joHN+S7LYvesXb02QAAA8vHy3yPTWutG8Tomk7bRpXdoFPyf+UXCMBAAASBvXMlrNeu3yxb5oMFqHrg77a928H4LzJA2+AkIvnBPy53huRwWCWwQhZWrkZGFhdEjYY0lzbyHN7DvvtyTLySqQyv+gyvOyKijgvaKXHrRpXV4q+MW2I8HTPe9+/zhP2ugFQnfIxIFm2AeFUCfRgn0cs/uAnma160HwvIL6mb26K6VN6/JSwS+2/Uienr+RVpfdGabdek+aOGLcIF935yGzhhlgfkeos7S2V500sne112+4cyQMLfU67XdMWk768q7b+BvhORIT92FD/Oxe4atu2rQuHUD9NtcBX2xXTWR0ZVp6OSX/i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kaZ9Nv69eamPLgFAC1N3v/veuvsVKjZoMzTX8NQLhuk9JMhqd3o2BQAgiggNqZ48UZ8AEIY8ihEBADDcp87wPb33RClNC58/CpfMGswGoMufhITLtzbTrc9wpYMk0mbcd7ttqp38fc2VRknMH+40fdH3MTIAAFoY/CBaNHMIFwCAdJo0afBv0ddqtpMk/vy1nPferu0+laXcvZggP4wg9EZMHdxMxylp4vfGEj+g8v68e6QuwXuNWP5eX6U4mr2s1AyNNWNNL0WWdWjH5UxFduK5v/3LDxtHWtYsX1qREXwjtKqnPHXKsg9uv6R4M2kUuHrP5o8CDEkAoMoe//75m7+FldMAQAuijnx7ccqBqaZt2otqaHFM21G//7tuhgMbgOY/3zd9zu4QpSsrbOeJuw98Ot6GBUBXRuye8sa+iNrjDVlKZGwJ7WFBgAabGWqL9v5eOX3eXbXIS94ly3F4Y8nIupEUsuLcwtrNLE0JuVc3hozhvWDVR0FGNW8keI6zvlg63rjtoaobDJX/4EKYInuZTlg41qHuQIi0HjN9glVtNaog/EFKMzf5I/SNDZjyfEaX39r0+fH7OfJPZui6Dhw9utuLTEmgiu+tW30ysXaPz7Cd/OmPk2tj0lzwwHB67fVADiFf5NUrEfKOXirvxq0QeVYkLYbMHlTzrbbX+jaBHfTuJ+/61G5QQsf5rfdGWqnaoM3QXMNTNxiOX59BtUsAujrybrQEAEASe/8ZnwYA0qDnwAmDerABAKiykJBUKQCA6Mn9SHkfLWk/oG+3ekfmbOeg3vWyOwCwnfv0UIROC4sKy+RrSZoNmzvcUP6SJOLS3XR5w0+6fidWkR5MB70+VANDJV6MBpuxZpdC5T66FKXorLine truncated
<h3 id="multi-plot-layout-with-logo">Multi-plot layout with logo</h3>
<p>Use <code>add_logo_ga()</code> to attach a single logo below a row of
plots.</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" tabindex="-1"></a>p1 <span class="ot">&lt;-</span> <span class="fu">ggplot</span>(mpg, <span class="fu">aes</span>(class, <span class="at">fill =</span> class)) <span class="sc">+</span></span>
<span id="cb11-2"><a href="#cb11-2" tabindex="-1"></a> <span class="fu">geom_bar</span>(<span class="at">show.legend =</span> <span class="cn">FALSE</span>) <span class="sc">+</span></span>
<span id="cb11-3"><a href="#cb11-3" tabindex="-1"></a> <span class="fu">scale_fill_civilytics</span>() <span class="sc">+</span></span>
<span id="cb11-4"><a href="#cb11-4" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">title =</span> <span class="st">&quot;Vehicle counts&quot;</span>, <span class="at">x =</span> <span class="cn">NULL</span>, <span class="at">y =</span> <span class="cn">NULL</span>) <span class="sc">+</span></span>
<span id="cb11-5"><a href="#cb11-5" tabindex="-1"></a> <span class="fu">theme_civilytics</span>(<span class="at">grid =</span> <span class="st">&quot;y&quot;</span>)</span>
<span id="cb11-6"><a href="#cb11-6" tabindex="-1"></a></span>
<span id="cb11-7"><a href="#cb11-7" tabindex="-1"></a>p2 <span class="ot">&lt;-</span> <span class="fu">ggplot</span>(mpg, <span class="fu">aes</span>(displ, hwy)) <span class="sc">+</span></span>
<span id="cb11-8"><a href="#cb11-8" tabindex="-1"></a> <span class="fu">geom_point</span>(<span class="at">colour =</span> civilytics_colors[<span class="st">&quot;navy_600&quot;</span>], <span class="at">size =</span> <span class="fl">1.5</span>) <span class="sc">+</span></span>
<span id="cb11-9"><a href="#cb11-9" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">title =</span> <span class="st">&quot;Displacement vs. MPG&quot;</span>, <span class="at">x =</span> <span class="st">&quot;Displacement (L)&quot;</span>, <span class="at">y =</span> <span class="st">&quot;Highway MPG&quot;</span>) <span class="sc">+</span></span>
<span id="cb11-10"><a href="#cb11-10" tabindex="-1"></a> <span class="fu">theme_civilytics</span>(<span class="at">grid =</span> <span class="st">&quot;y&quot;</span>)</span>
<span id="cb11-11"><a href="#cb11-11" tabindex="-1"></a></span>
<span id="cb11-12"><a href="#cb11-12" tabindex="-1"></a>logo <span class="ot">&lt;-</span> <span class="fu">make_logo_grob</span>()</span>
<span id="cb11-13"><a href="#cb11-13" tabindex="-1"></a>grid<span class="sc">::</span><span class="fu">grid.draw</span>(<span class="fu">add_logo_ga</span>(<span class="fu">list</span>(p1, p2), logo))</span></code></pre></div>
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2AAAAGwCAIAAABAUZH1AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdd1wT5x8H8OeyCWEvAQERkCUoIiAoThRx1F1bR6u12tba1qqtXXa3v2qrHdrhaGtd1dZR996KIipDBURBXOw9Q8bd749ASMJKMBDAz/vlH+ZyXL6X3D33vWcdJakqJQAAAAAAtViGDgAAAAAA2hckiAAAAACgBgkiAAAAAKhBgggAAAAAapAgAgAAAIAaJIgAAAAAoAYJIgAAAACo4Rg6ACU6c993C7ZnyAkhhFBWQ776foqvdtExlQ8Ob/z73+u5cguPkTOff97fjGrbAAAAtKSn8qrFUNABgFaaKhhi1y798myZ4v8sx6jvvhnrxm54zer4TS+vuFwz4zbLfsoXH85w1blusjLz9qWYJKliGw5uxYyWfydP/n3ZnB9SpYQQEn3kXL7V6Y8ihbp++JMEAABPCzrv5AeLdiXL1ZdSHCNjoYWNg4t7j+B+gaFeNkaNJn16K69aDAUdPKEGzgKe74LV84ebNHLcy+6uX/TDgXxaZZHpiPe/fN2vLgNp+MwiHJ6RkZm1nZuX74CBYaFuJs3dy9BVuXejL1y/mpRxL6ugpLxayuEbm1o4O3fz7OnXP9jb1Qw3Qzpo6svq4cJLuhJXpCg+uJJD80e/0XDaJ722/79jMVmKX5bt7PlB17ZsuZZnPsqV1b6gS7IfldJEiKbztsdUZaXGPahkCGXZ3c/bppGbCYAOTZx3MzbusrSJNdjmPUKmz5v31jhPywbKIZRXT61OVELWPwuou3YXZ0WMNG4wQ5SlnNh49NptmcoilpVbifqtSTNn1r8rWUL3iBdXfj6jv02D5wtddOvojz9u3nzmXolmllkbI9fMe8ic1T9O6c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s/TtTf7b5/TUZ+cK+vGNZEII4Yhce/r0sKRykxPis8TKn+D6X/9emPXeUAGhjH1nLn5tkCRt10/HaqpMCNtj5Kzn/GpqCyhzvy4sQgipit67TXmwUMbekeMm9bXjSUofpd66eCEuKV9iMXTi5DadIAmgdbBtg/vYs689UJyhdH56Uj7dv7kL1xOcIIz47s1EQjgmDr16dbemCm5eu/24suZ6Kn18dNmaUUM+66vdZIuCsLkzBu1ZcapK6BoQPCDA3c3WjC/Lizuyf098oZQQQpiqlB0rD0zeOqW23kDHMu3JylJ5WnQsIYQSWPv27uHILUi8mppVmywyknv7tt8jhLCMbHsGuNuz8uNj79RdN8oTNu26M3uRZ+017wkj0X8J2TBez6ljXTf8rBgETGefPH3lg6BBymsfXXDkcKIyPzTpHzW2C4u0bWHLVFXbDQrzWnXrhowQ2f1jpx8s8XatrSii006cS1bUH4qCnxnAu/97yxJEeXp0bN04F7Zjdyc2IYTIHsan1LWQcT0Hj/HoyJMHtT9adEMw7vvMIPN/dxXShBCm4vzxa+VRgxQV0/LHF4/cqj0KOd1GR7nXbI7O3vHLwdqeiSzLwYsPrR3vrHhv9KiJ/ssiFp/KoQlhqhP+/i9mzuIBDWU2LKuQT//86jVfY4oQRnxv/SuvfnShtKaTamHipbvyoT2bOxTkj7b9cuRh7VFFCT1e/v7bTyPsFJ8mK30Qc/JaeR8t0ip97E5LQpI/3vrzYLine truncated
<h2 id="other-utilities">Other utilities</h2>
<p>The package also includes helpers for public-sector data
analysis:</p>
<table>
<thead>
<tr>
<th align="left">Function</th>
<th align="left">Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><code>pretty_count()</code> /
<code>pretty_per()</code></td>
<td align="left">Format numbers and percentages</td>
</tr>
<tr>
<td align="left"><code>grade_level_to_num()</code></td>
<td align="left">Convert grade labels (KG, 01–12) to numeric</td>
</tr>
<tr>
<td align="left"><code>race_short_names()</code></td>
<td align="left">Standardize NCES race/ethnicity categories</td>
</tr>
<tr>
<td align="left"><code>get_fips()</code> /
<code>get_stabbr()</code></td>
<td align="left">State FIPS code lookups</td>
</tr>
<tr>
<td align="left"><code>clopper_pearson()</code> /
<code>agresti_coull_interval()</code></td>
<td align="left">Proportion confidence intervals</td>
</tr>
<tr>
<td align="left"><code>match_test()</code> /
<code>trunc_match()</code></td>
<td align="left">Fuzzy join diagnostics</td>
</tr>
<tr>
<td align="left"><code>perturb_count()</code> /
<code>random_round()</code></td>
<td align="left">Privacy-preserving data perturbation</td>
</tr>
</tbody>
</table>
<h2 id="maintaining-brand-assets">Maintaining brand assets</h2>
<p>Logo and brand mark files live in <code>inst/img/</code>. The package
ships both PNG (for ggplot2 raster composition) and SVG (for Quarto/HTML
output) variants:</p>
<table>
<thead>
<tr>
<th align="left">File</th>
<th align="left">Format</th>
<th align="left">Used by</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><code>civilytics-wordmark.png</code> /
<code>.svg</code></td>
<td align="left">Full “Civilytics” lockup</td>
<td align="left"><code>make_logo_grob(&quot;wordmark&quot;, &quot;light&quot;)</code>,
Quarto templates</td>
</tr>
<tr>
<td align="left"><code>civilytics-wordmark-reverse.png</code> /
<code>.svg</code></td>
<td align="left">Light-on-dark wordmark</td>
<td align="left"><code>make_logo_grob(&quot;wordmark&quot;, &quot;dark&quot;)</code>, dark
slides</td>
</tr>
<tr>
<td align="left"><code>civilytics-mark.png</code> /
<code>.svg</code></td>
<td align="left">Compact C-pulse icon</td>
<td align="left"><code>make_logo_grob(&quot;mark&quot;, &quot;light&quot;)</code></td>
</tr>
<tr>
<td align="left"><code>civilytics-mark-reverse.svg</code></td>
<td align="left">Light-on-dark mark</td>
<td align="left"><code>make_logo_grob(&quot;mark&quot;, &quot;dark&quot;)</code></td>
</tr>
<tr>
<td align="left"><code>civilytics-pulse.svg</code></td>
<td align="left">Standalone waveform glyph</td>
<td align="left">Quarto slide footer chrome</td>
</tr>
</tbody>
</table>
<p>To update the logos, replace the files in <code>inst/img/</code> with
new versions using the same filenames. The PNG files must be raster
images (the ggplot2 logo functions read them via
<code>png::readPNG()</code>). SVG files are passed through as-is by
Quarto and HTML templates.</p>
<p>After replacing files, re-render the README gallery to update the
screenshots:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1" tabindex="-1"></a>devtools<span class="sc">::</span><span class="fu">load_all</span>()</span>
<span id="cb12-2"><a href="#cb12-2" tabindex="-1"></a>rmarkdown<span class="sc">::</span><span class="fu">render</span>(<span class="st">&quot;README.Rmd&quot;</span>)</span></code></pre></div>
</body>
</html>
+243 -10
View File
@@ -1,25 +1,258 @@
# civilytics # civilytics
<!-- badges: start --> Brand themes, color palettes, and utility functions for [Civilytics
<!-- badges: end --> Consulting](https://www.civilytics.com). The package provides a complete
ggplot2 theme system drawn from the Civilytics design system — warm
The goal of civilytics is to ... paper backgrounds, civic-navy ink, and editorial typography — along with
10 curated color palettes, logo composition helpers, and data-wrangling
utilities for public-sector analysis.
## Installation ## Installation
You can install the released version of civilytics from [CRAN](https://CRAN.R-project.org) with: Install from the Civilytics Gitea server:
``` r ``` r
install.packages("civilytics") # install.packages("remotes")
remotes::install_git("https://gitea.civilytics.org/Civilytics/civilyticsR.git")
``` ```
## Example ## Quick start
This is a basic example which shows you how to solve a common problem:
``` r ``` r
library(civilytics) library(civilytics)
## basic example code library(ggplot2)
ggplot(mpg, aes(displ, hwy, colour = class)) +
geom_point(size = 2.5) +
scale_color_civilytics() +
labs(
title = "Fuel economy by engine displacement",
subtitle = "Highway MPG vs. engine size for 234 vehicles",
caption = "Source: EPA fuel economy data (ggplot2::mpg)",
x = "Engine displacement (litres)",
y = "Highway MPG"
) +
theme_civilytics()
``` ```
<img src="man/figures/README-quickstart-1.png" alt="" width="100%" />
## Color palettes
The package ships 53 named brand colors in `civilytics_colors` and 10
curated palettes in `civilytics_palettes`. Use `civilytics_palette()` to
retrieve colors by name, or pass palettes directly to the ggplot2
scales.
### Palette gallery
<img src="man/figures/README-palette-gallery-1.png" alt="" width="100%" />
### Using palettes
``` r
# Discrete fill with the qualitative palette
ggplot(mpg, aes(class, fill = class)) +
geom_bar(show.legend = FALSE) +
scale_fill_civilytics() +
labs(title = "Vehicle counts by class", x = NULL, y = NULL) +
theme_civilytics(grid = "y")
```
<img src="man/figures/README-palette-usage-1.png" alt="" width="100%" />
``` r
# Continuous fill with a sequential palette
ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
geom_tile() +
scale_fill_civilytics("seq_ember", discrete = FALSE) +
labs(title = "Old Faithful eruption density") +
theme_civilytics(grid = "none")
```
<img src="man/figures/README-palette-usage-2.png" alt="" width="100%" />
## Themes
Three theme variants cover the most common output contexts. All share
the same typographic structure and accept `grid` and `paper_bg`
parameters.
### Editorial (default)
The default theme uses a warm paper background with horizontal gridlines
— an editorial, Pew-style layout.
``` r
base_plot <- ggplot(mpg, aes(displ, hwy)) +
geom_point(aes(colour = factor(cyl)), size = 2) +
scale_color_civilytics() +
labs(
title = "Engine size vs. highway fuel economy",
subtitle = "Colored by number of cylinders",
caption = "Source: ggplot2::mpg",
colour = "Cylinders",
x = "Displacement (L)", y = "Highway MPG"
)
base_plot + theme_civilytics()
```
<img src="man/figures/README-theme-editorial-1.png" alt="" width="100%" />
### Grid options
The `grid` parameter controls which major gridlines are drawn.
<img src="man/figures/README-theme-grids-1.png" alt="" width="100%" />
### Dark
Dark navy background with light text, suitable for presentations or
dashboards on dark surfaces.
``` r
base_plot + theme_civilytics_dark()
```
<img src="man/figures/README-theme-dark-1.png" alt="" width="100%" />
### Slide
Transparent background and larger base font (18 pt), sized for Reveal.js
slides or PowerPoint exports.
``` r
base_plot + theme_civilytics_slide()
```
<img src="man/figures/README-theme-slide-1.png" alt="" width="100%" />
### Facets
Facet strips use the `paper_2` tint, with the title font.
``` r
ggplot(mpg, aes(displ, hwy)) +
geom_point(colour = civilytics_colors["navy_600"], size = 1.5) +
facet_wrap(~class, ncol = 4) +
labs(
title = "Highway MPG by vehicle class",
x = "Displacement (L)", y = "Highway MPG"
) +
theme_civilytics(grid = "y")
```
<img src="man/figures/README-theme-facets-1.png" alt="" width="100%" />
## Logo utilities
Add the Civilytics logo to any ggplot using the pipe-friendly
`civilytics_logo()` or the lower-level `add_logo()` /
`make_logo_grob()`. The logo is automatically right-aligned below the
plot area. Wrap the ggplot chain in parentheses before piping — R’s `|>`
binds tighter than `+`.
### Wordmark on a light plot
``` r
p <- ggplot(mpg, aes(displ, hwy, colour = class)) +
geom_point(size = 2) +
scale_color_civilytics() +
labs(
title = "Fuel economy by engine displacement",
caption = "Source: EPA fuel economy data (ggplot2::mpg)",
x = "Displacement (L)", y = "Highway MPG"
) +
theme_civilytics()
grid::grid.draw(civilytics_logo(p))
```
<img src="man/figures/README-logo-wordmark-1.png" alt="" width="100%" />
### Compact mark
Use `type = "mark"` for the compact C-pulse icon instead of the full
wordmark.
``` r
p2_logo <- ggplot(mpg, aes(displ, hwy, colour = factor(cyl))) +
geom_point(size = 2) +
scale_color_civilytics() +
labs(
title = "Engine size vs. highway fuel economy",
colour = "Cylinders",
x = "Displacement (L)", y = "Highway MPG"
) +
theme_civilytics()
grid::grid.draw(civilytics_logo(p2_logo, type = "mark"))
```
<img src="man/figures/README-logo-mark-1.png" alt="" width="100%" />
### Multi-plot layout with logo
Use `add_logo_ga()` to attach a single logo below a row of plots.
``` r
p1 <- ggplot(mpg, aes(class, fill = class)) +
geom_bar(show.legend = FALSE) +
scale_fill_civilytics() +
labs(title = "Vehicle counts", x = NULL, y = NULL) +
theme_civilytics(grid = "y")
p2 <- ggplot(mpg, aes(displ, hwy)) +
geom_point(colour = civilytics_colors["navy_600"], size = 1.5) +
labs(title = "Displacement vs. MPG", x = "Displacement (L)", y = "Highway MPG") +
theme_civilytics(grid = "y")
logo <- make_logo_grob()
grid::grid.draw(add_logo_ga(list(p1, p2), logo))
```
<img src="man/figures/README-logo-multi-1.png" alt="" width="100%" />
## Other utilities
The package also includes helpers for public-sector data analysis:
| Function | Purpose |
|:---|:---|
| `pretty_count()` / `pretty_per()` | Format numbers and percentages |
| `grade_level_to_num()` | Convert grade labels (KG, 01–12) to numeric |
| `race_short_names()` | Standardize NCES race/ethnicity categories |
| `get_fips()` / `get_stabbr()` | State FIPS code lookups |
| `clopper_pearson()` / `agresti_coull_interval()` | Proportion confidence intervals |
| `match_test()` / `trunc_match()` | Fuzzy join diagnostics |
| `perturb_count()` / `random_round()` | Privacy-preserving data perturbation |
## Maintaining brand assets
Logo and brand mark files live in `inst/img/`. The package ships both
PNG (for ggplot2 raster composition) and SVG (for Quarto/HTML output)
variants:
| File | Format | Used by |
|:---|:---|:---|
| `civilytics-wordmark.png` / `.svg` | Full “Civilytics” lockup | `make_logo_grob("wordmark", "light")`, Quarto templates |
| `civilytics-wordmark-reverse.png` / `.svg` | Light-on-dark wordmark | `make_logo_grob("wordmark", "dark")`, dark slides |
| `civilytics-mark.png` / `.svg` | Compact C-pulse icon | `make_logo_grob("mark", "light")` |
| `civilytics-mark-reverse.svg` | Light-on-dark mark | `make_logo_grob("mark", "dark")` |
| `civilytics-pulse.svg` | Standalone waveform glyph | Quarto slide footer chrome |
To update the logos, replace the files in `inst/img/` with new versions
using the same filenames. The PNG files must be raster images (the
ggplot2 logo functions read them via `png::readPNG()`). SVG files are
passed through as-is by Quarto and HTML templates.
After replacing files, re-render the README gallery to update the
screenshots:
``` r
devtools::load_all()
rmarkdown::render("README.Rmd")
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 682 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

+7
View File
@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" role="img" aria-label="Civilytics mark">
<rect width="100" height="100" fill="#0E1A2B"></rect>
<g fill="none" stroke="#FAF7F2" stroke-linecap="butt">
<path d="M 82.77 27.06 A 40 40 0 1 0 82.77 72.94" stroke-width="15"></path>
<path d="M 30 50 L 35 50 L 38 44 L 42 56 L 46 42 L 50 58 L 54 50 L 64 50" stroke-width="3.5" stroke-linecap="square"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

+7
View File
@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" role="img" aria-label="Civilytics mark">
<g fill="none" stroke="#0E1A2B" stroke-linecap="butt">
<path d="M 82.77 27.06 A 40 40 0 1 0 82.77 72.94" stroke-width="15"></path>
<path d="M 30 50 L 35 50 L 38 44 L 42 56 L 46 42 L 50 58 L 54 50 L 64 50" stroke-width="3.5" stroke-linecap="square"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 385 B

+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" role="img" aria-label="Civic pulse">
<path d="M0 8 L5 8 L8 3 L12 13 L16 1 L20 11 L23 8 L30 8" fill="none" stroke="#0E1A2B" stroke-width="2" stroke-linecap="square" stroke-linejoin="miter"></path>
</svg>

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 558 160" role="img" aria-label="Civilytics">
<rect width="558" height="160" fill="#0E1A2B"></rect><path fill="#FAF7F2" d="M43.12 33.78Q50.18 33.78 56.17 35.68Q62.16 37.58 66.81 41.06Q71.46 44.53 74.42 49.23Q77.39 53.94 78.51 59.54Q79.07 61.89 78.68 62.56Q78.29 63.23 77.06 63.46L57.46 64.69Q56.22 64.69 55.89 64.18Q55.55 63.68 55.33 62.56Q54.43 57.63 51.91 54.33Q49.39 51.02 43.79 51.02Q37.52 51.02 33.77 56.57Q30.02 62.11 30.02 75.78Q30.02 89.66 33.43 95.21Q36.85 100.75 43.68 100.75Q49.28 100.75 53.59 97.9Q57.9 95.04 60.82 87.65Q61.38 86.3 63.95 86.75L77.95 89.55Q78.51 89.66 79.18 90.34Q79.86 91.01 79.52 93.25Q79.18 95.04 77.73 98.18Q76.27 101.31 73.58 104.95Q70.9 108.59 66.64 111.78Q62.38 114.98 56.5 117.05Q50.62 119.12 42.9 119.12Q30.91 119.12 22.01 113.46Q13.1 107.81 8.23 97.9Q3.36 87.98 3.36 75.33Q3.36 62.67 8.23 53.38Q13.1 44.08 22.06 38.93Q31.02 33.78 43.12 33.78Z M104.54 114.75Q104.54 116.54 103.64 117.27Q102.74 118 100.84 118L85.05 118Q83.37 118 82.75 117.33Q82.14 116.66 82.14 115.2L82.14 61.22Q82.14 58.64 84.26 58.64L102.52 58.64Q104.54 58.64 104.54 60.88ZM104.54 50.46Q104.54 53.71 100.84 53.71L85.05 53.71Q83.37 53.71 82.75 52.98Q82.14 52.26 82.14 50.8L82.14 37.47Q82.14 34.9 84.26 34.9L102.52 34.9Q104.54 34.9 104.54 37.25Z M166.51 58.64Q167.86 58.64 168.36 59.65Q168.86 60.66 168.42 61.89L146.58 115.2Q145.46 118 142.43 118L131.9 118Q128.88 118 127.76 115.2L106.03 61.89Q105.58 60.66 106.2 59.65Q106.82 58.64 108.16 58.64L127.09 58.64Q128.1 58.64 128.88 59.31Q129.66 59.98 130 60.88L139.86 86.75Q140.53 88.88 141.54 86.64L151.06 60.88Q151.5 59.98 152.23 59.31Q152.96 58.64 153.97 58.64L166.51 58.64Z M192.31 114.75Q192.31 116.54 191.42 117.27Q190.52 118 188.62 118L172.82 118Q171.14 118 170.53 117.33Q169.91 116.66 169.91 115.2L169.91 61.22Q169.91 58.64 172.04 58.64L190.3 58.64Q192.31 58.64 192.31 60.88ZM192.31 50.46Q192.31 53.71 188.62 53.71L172.82 53.71Q171.14 53.71 170.53 52.98Q169.91 52.26 169.91 50.8L169.91 37.47Q169.91 34.9 172.04 34.9L190.3 34.9Q192.31 34.9 192.31 37.25Z M219.01 114.75Q219.01 116.54 218.11 117.27Q217.22 118 215.31 118L199.41 118Q196.38 118 196.38 115.2L196.94 37.47Q196.94 34.9 199.07 34.9L216.99 34.9Q219.01 34.9 219.01 37.25Z M230.14 136.48Q226.66 136.48 225.26 136.03Q223.86 135.58 223.86 134.02L223.86 122.59Q223.86 121.92 224.54 121.19Q225.21 120.46 227 120.46L234.95 120.46Q236.86 120.46 238.42 119.9Q239.99 119.34 240.94 118.5Q241.9 117.66 242.29 116.6Q242.68 115.54 242.23 114.53L220.5 61.89Q220.06 60.66 220.67 59.65Q221.29 58.64 222.63 58.64L241.56 58.64Q242.57 58.64 243.35 59.31Q244.14 59.98 244.47 60.88L253.99 87.76Q254.33 88.77 254.89 88.82Q255.45 88.88 255.9 87.76L265.53 60.88Q265.98 59.98 266.7 59.31Q267.43 58.64 268.44 58.64L280.98 58.64Q282.33 58.64 282.89 59.65Q283.45 60.66 282.89 61.89L261.05 114.53Q258.14 121.58 255.28 125.9Q252.42 130.21 248.95 132.5Q245.48 134.8 240.94 135.64Q236.41 136.48 230.14 136.48Z M315.3 73.76Q313.84 73.76 313.84 75.22L313.84 96.72Q313.84 99.63 315.69 101.14Q317.54 102.66 321.68 102.66L326.5 102.66Q327.39 102.66 327.95 103.33Q328.51 104 328.51 104.9L328.4 113.86Q328.4 116.54 325.15 117.22Q322.69 117.55 320.17 117.72Q317.65 117.89 315.13 117.94Q312.61 118 310.03 118Q301.97 118 296.7 114.14Q291.44 110.27 291.44 103.1L291.44 75.78Q291.44 73.76 289.76 73.76L284.38 73.76Q281.7 73.76 281.7 71.3L281.7 60.77Q281.7 58.64 284.16 58.64L290.77 58.64Q292 58.64 292.11 57.3L293.9 40.72Q294.13 38.48 295.92 38.48L312.38 38.48Q314.51 38.48 314.51 40.94L314.51 57.3Q314.51 58.53 315.74 58.53L326.05 58.53Q328.51 58.53 328.51 60.66L328.51 71.3Q328.51 73.76 325.71 73.76Z M353.42 114.75Q353.42 116.54 352.52 117.27Q351.62 118 349.72 118L333.93 118Q332.25 118 331.63 117.33Q331.02 116.66 331.02 115.2L331.02 61.22Q331.02 58.64 333.14 58.64L351.4 58.64Q353.42 58.64 353.42 60.88ZM353.42 50.46Q353.42 53.71 349.72 53.71L333.93 53.71Q332.25 53.71 331.63 52.98Q331.02 52.26 331.02 50.8L331.02 37.47Q331.02 34.9 333.14 34.9L351.4 34.9Q353.42 34.9 353.42 37.25Z M386.38 57.52Q394.45 57.52 400.05 60.49Q405.65 63.46 408.9 67.82Q412.14 72.19 413.04 76.56Q413.82 79.36 411.02 79.47L395.68 80.26Q394.11 80.37 393.78 78.69Q393.55 77.23 392.99 75.61Q392.43 73.98 391.03 72.81Q389.63 71.63 386.94 71.63Q384.26 71.63 382.24 73.31Q380.22 74.99 379.1 78.63Q377.98 82.27 377.98 88.32Q377.98 94.48 379.22 98.23Q380.45 101.98 382.74 103.61Q385.04 105.23 388.18 105.23Q392.77 105.23 394.95 102.71Q397.14 100.19 399.26 96.38Q399.49 95.94 399.94 95.77Q400.38 95.6 401.5 95.82L412.03 97.84Q413.6 98.18 413.04 100.42Q412.59 102.54 410.91 105.74Q409.23 108.93 406.1 111.95Q402.96 114.98 398.09 117.05Q393.22 119.12 386.38 119.12Q377.42 119.12 370.42 115.26Q363.42 111.39 359.39 104.5Q355.36 97.62 355.36 88.54Q355.36 79.25 359.45 72.3Q363.54 65.36 370.54 61.44Q377.54 57.52 386.38 57.52Z M452.06 75.66Q450.38 73.76 447.69 72.14Q445 70.51 440.86 70.51Q437.94 70.51 435.82 71.52Q433.69 72.53 433.69 74.43Q433.69 75.22 434.42 76Q435.14 76.78 438.17 77.34L450.04 79.81Q460.46 81.94 464.66 87.2Q468.86 92.46 468.86 98.96Q468.86 105.46 465.27 109.94Q461.69 114.42 455.3 116.77QLine truncated
<path fill="none" stroke="#FAF7F2" stroke-width="5" stroke-linecap="square" stroke-linejoin="miter" d="M479.87199999999996 90 L489.87199999999996 90 L495.87199999999996 80 L503.87199999999996 104 L511.87199999999996 76 L519.872 102 L525.872 90 L547.872 90"></path>
</svg>

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

+4
View File
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 558 160" role="img" aria-label="Civilytics">
<path fill="#0E1A2B" d="M43.12 33.78Q50.18 33.78 56.17 35.68Q62.16 37.58 66.81 41.06Q71.46 44.53 74.42 49.23Q77.39 53.94 78.51 59.54Q79.07 61.89 78.68 62.56Q78.29 63.23 77.06 63.46L57.46 64.69Q56.22 64.69 55.89 64.18Q55.55 63.68 55.33 62.56Q54.43 57.63 51.91 54.33Q49.39 51.02 43.79 51.02Q37.52 51.02 33.77 56.57Q30.02 62.11 30.02 75.78Q30.02 89.66 33.43 95.21Q36.85 100.75 43.68 100.75Q49.28 100.75 53.59 97.9Q57.9 95.04 60.82 87.65Q61.38 86.3 63.95 86.75L77.95 89.55Q78.51 89.66 79.18 90.34Q79.86 91.01 79.52 93.25Q79.18 95.04 77.73 98.18Q76.27 101.31 73.58 104.95Q70.9 108.59 66.64 111.78Q62.38 114.98 56.5 117.05Q50.62 119.12 42.9 119.12Q30.91 119.12 22.01 113.46Q13.1 107.81 8.23 97.9Q3.36 87.98 3.36 75.33Q3.36 62.67 8.23 53.38Q13.1 44.08 22.06 38.93Q31.02 33.78 43.12 33.78Z M104.54 114.75Q104.54 116.54 103.64 117.27Q102.74 118 100.84 118L85.05 118Q83.37 118 82.75 117.33Q82.14 116.66 82.14 115.2L82.14 61.22Q82.14 58.64 84.26 58.64L102.52 58.64Q104.54 58.64 104.54 60.88ZM104.54 50.46Q104.54 53.71 100.84 53.71L85.05 53.71Q83.37 53.71 82.75 52.98Q82.14 52.26 82.14 50.8L82.14 37.47Q82.14 34.9 84.26 34.9L102.52 34.9Q104.54 34.9 104.54 37.25Z M166.51 58.64Q167.86 58.64 168.36 59.65Q168.86 60.66 168.42 61.89L146.58 115.2Q145.46 118 142.43 118L131.9 118Q128.88 118 127.76 115.2L106.03 61.89Q105.58 60.66 106.2 59.65Q106.82 58.64 108.16 58.64L127.09 58.64Q128.1 58.64 128.88 59.31Q129.66 59.98 130 60.88L139.86 86.75Q140.53 88.88 141.54 86.64L151.06 60.88Q151.5 59.98 152.23 59.31Q152.96 58.64 153.97 58.64L166.51 58.64Z M192.31 114.75Q192.31 116.54 191.42 117.27Q190.52 118 188.62 118L172.82 118Q171.14 118 170.53 117.33Q169.91 116.66 169.91 115.2L169.91 61.22Q169.91 58.64 172.04 58.64L190.3 58.64Q192.31 58.64 192.31 60.88ZM192.31 50.46Q192.31 53.71 188.62 53.71L172.82 53.71Q171.14 53.71 170.53 52.98Q169.91 52.26 169.91 50.8L169.91 37.47Q169.91 34.9 172.04 34.9L190.3 34.9Q192.31 34.9 192.31 37.25Z M219.01 114.75Q219.01 116.54 218.11 117.27Q217.22 118 215.31 118L199.41 118Q196.38 118 196.38 115.2L196.94 37.47Q196.94 34.9 199.07 34.9L216.99 34.9Q219.01 34.9 219.01 37.25Z M230.14 136.48Q226.66 136.48 225.26 136.03Q223.86 135.58 223.86 134.02L223.86 122.59Q223.86 121.92 224.54 121.19Q225.21 120.46 227 120.46L234.95 120.46Q236.86 120.46 238.42 119.9Q239.99 119.34 240.94 118.5Q241.9 117.66 242.29 116.6Q242.68 115.54 242.23 114.53L220.5 61.89Q220.06 60.66 220.67 59.65Q221.29 58.64 222.63 58.64L241.56 58.64Q242.57 58.64 243.35 59.31Q244.14 59.98 244.47 60.88L253.99 87.76Q254.33 88.77 254.89 88.82Q255.45 88.88 255.9 87.76L265.53 60.88Q265.98 59.98 266.7 59.31Q267.43 58.64 268.44 58.64L280.98 58.64Q282.33 58.64 282.89 59.65Q283.45 60.66 282.89 61.89L261.05 114.53Q258.14 121.58 255.28 125.9Q252.42 130.21 248.95 132.5Q245.48 134.8 240.94 135.64Q236.41 136.48 230.14 136.48Z M315.3 73.76Q313.84 73.76 313.84 75.22L313.84 96.72Q313.84 99.63 315.69 101.14Q317.54 102.66 321.68 102.66L326.5 102.66Q327.39 102.66 327.95 103.33Q328.51 104 328.51 104.9L328.4 113.86Q328.4 116.54 325.15 117.22Q322.69 117.55 320.17 117.72Q317.65 117.89 315.13 117.94Q312.61 118 310.03 118Q301.97 118 296.7 114.14Q291.44 110.27 291.44 103.1L291.44 75.78Q291.44 73.76 289.76 73.76L284.38 73.76Q281.7 73.76 281.7 71.3L281.7 60.77Q281.7 58.64 284.16 58.64L290.77 58.64Q292 58.64 292.11 57.3L293.9 40.72Q294.13 38.48 295.92 38.48L312.38 38.48Q314.51 38.48 314.51 40.94L314.51 57.3Q314.51 58.53 315.74 58.53L326.05 58.53Q328.51 58.53 328.51 60.66L328.51 71.3Q328.51 73.76 325.71 73.76Z M353.42 114.75Q353.42 116.54 352.52 117.27Q351.62 118 349.72 118L333.93 118Q332.25 118 331.63 117.33Q331.02 116.66 331.02 115.2L331.02 61.22Q331.02 58.64 333.14 58.64L351.4 58.64Q353.42 58.64 353.42 60.88ZM353.42 50.46Q353.42 53.71 349.72 53.71L333.93 53.71Q332.25 53.71 331.63 52.98Q331.02 52.26 331.02 50.8L331.02 37.47Q331.02 34.9 333.14 34.9L351.4 34.9Q353.42 34.9 353.42 37.25Z M386.38 57.52Q394.45 57.52 400.05 60.49Q405.65 63.46 408.9 67.82Q412.14 72.19 413.04 76.56Q413.82 79.36 411.02 79.47L395.68 80.26Q394.11 80.37 393.78 78.69Q393.55 77.23 392.99 75.61Q392.43 73.98 391.03 72.81Q389.63 71.63 386.94 71.63Q384.26 71.63 382.24 73.31Q380.22 74.99 379.1 78.63Q377.98 82.27 377.98 88.32Q377.98 94.48 379.22 98.23Q380.45 101.98 382.74 103.61Q385.04 105.23 388.18 105.23Q392.77 105.23 394.95 102.71Q397.14 100.19 399.26 96.38Q399.49 95.94 399.94 95.77Q400.38 95.6 401.5 95.82L412.03 97.84Q413.6 98.18 413.04 100.42Q412.59 102.54 410.91 105.74Q409.23 108.93 406.1 111.95Q402.96 114.98 398.09 117.05Q393.22 119.12 386.38 119.12Q377.42 119.12 370.42 115.26Q363.42 111.39 359.39 104.5Q355.36 97.62 355.36 88.54Q355.36 79.25 359.45 72.3Q363.54 65.36 370.54 61.44Q377.54 57.52 386.38 57.52Z M452.06 75.66Q450.38 73.76 447.69 72.14Q445 70.51 440.86 70.51Q437.94 70.51 435.82 71.52Q433.69 72.53 433.69 74.43Q433.69 75.22 434.42 76Q435.14 76.78 438.17 77.34L450.04 79.81Q460.46 81.94 464.66 87.2Q468.86 92.46 468.86 98.96Q468.86 105.46 465.27 109.94Q461.69 114.42 455.3 116.77Q448.92 119.12 440.52 119.12Q429.77 119.12 422.6 115.5Line truncated
<path fill="none" stroke="#0E1A2B" stroke-width="5" stroke-linecap="square" stroke-linejoin="miter" d="M479.87199999999996 90 L489.87199999999996 90 L495.87199999999996 80 L503.87199999999996 104 L511.87199999999996 76 L519.872 102 L525.872 90 L547.872 90"></path>
</svg>

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

-720
View File
@@ -1,720 +0,0 @@
%PDF-1.5␍%âãÏÓ
1 0 obj␍<</Metadata 2 0 R/OCProperties<</D<</ON[5 0 R]/Order 6 0 R/RBGroups[]>>/OCGs[5 0 R]>>/Pages 3 0 R/Type/Catalog>>␍endobj␍2 0 obj␍<</Length 46463/Subtype/XML/Type/Metadata>>stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c145 79.163499, 2018/08/13-16:40:22 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:xmpGImg="http://ns.adobe.com/xap/1.0/g/img/"
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
xmlns:illustrator="http://ns.adobe.com/illustrator/1.0/"
xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
xmlns:xmpG="http://ns.adobe.com/xap/1.0/g/"
xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
<dc:format>application/pdf</dc:format>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">Civilytics Consulting Logo</rdf:li>
</rdf:Alt>
</dc:title>
<xmp:CreatorTool>Adobe Illustrator CC 23.0 (Windows)</xmp:CreatorTool>
<xmp:CreateDate>2019-10-03T08:33:30-04:00</xmp:CreateDate>
<xmp:ModifyDate>2019-10-03T08:33:30-04:00</xmp:ModifyDate>
<xmp:MetadataDate>2019-10-03T08:33:30-04:00</xmp:MetadataDate>
<xmp:Thumbnails>
<rdf:Alt>
<rdf:li rdf:parseType="Resource">
<xmpGImg:width>256</xmpGImg:width>
<xmpGImg:height>52</xmpGImg:height>
<xmpGImg:format>JPEG</xmpGImg:format>
<xmpGImg:image>/9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA&#xA;AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK&#xA;DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f&#xA;Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgANAEAAwER&#xA;AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA&#xA;AQACAwQFBgcICQoLEAAC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C/ERtWuKovzV5Z/M25/PTy/wCdbHy293o/l22eweR7uySe&#xA;6DrcRvOieqqryFxyVWp7gdAqq6n5L8+eQ/zZ1Pzx5Q0geYtB8xoBrekxzJDcwy8gWli9RlV/iHId&#xA;ftMKDZsVZRqMH5j+aPKfm1ryw/RC6jo11YaD5dMsElw1xLBIBcXFwvwRs7MqKgk4qKljXoqwz82P&#xA;Kvnf8xfJ+jeV7nytJbeZ4biE3Line truncated
</rdf:li>
</rdf:Alt>
</xmp:Thumbnails>
<xmpMM:OriginalDocumentID>uuid:9E3E5C9A8C81DB118734DB58FDDE4BA7</xmpMM:OriginalDocumentID>
<xmpMM:DocumentID>xmp.did:f663c0bc-2bc8-e14f-a4eb-0ae2aefff354</xmpMM:DocumentID>
<xmpMM:InstanceID>uuid:cd5f7198-b551-4996-b056-4cfbcc97d13d</xmpMM:InstanceID>
<xmpMM:RenditionClass>proof:pdf</xmpMM:RenditionClass>
<xmpMM:DerivedFrom rdf:parseType="Resource">
<stRef:instanceID>uuid:dab6724e-c618-4184-9b2e-7d44879e5e5f</stRef:instanceID>
<stRef:documentID>xmp.did:008add62-65b7-3547-8416-6472cd533b2c</stRef:documentID>
<stRef:originalDocumentID>uuid:9E3E5C9A8C81DB118734DB58FDDE4BA7</stRef:originalDocumentID>
<stRef:renditionClass>proof:pdf</stRef:renditionClass>
</xmpMM:DerivedFrom>
<xmpMM:History>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<stEvt:action>saved</stEvt:action>
<stEvt:instanceID>xmp.iid:f663c0bc-2bc8-e14f-a4eb-0ae2aefff354</stEvt:instanceID>
<stEvt:when>2019-10-03T08:33:27-04:00</stEvt:when>
<stEvt:softwareAgent>Adobe Illustrator CC 23.0 (Windows)</stEvt:softwareAgent>
<stEvt:changed>/</stEvt:changed>
</rdf:li>
</rdf:Seq>
</xmpMM:History>
<illustrator:StartupProfile>Basic RGB</illustrator:StartupProfile>
<xmpTPg:NPages>1</xmpTPg:NPages>
<xmpTPg:HasVisibleTransparency>False</xmpTPg:HasVisibleTransparency>
<xmpTPg:HasVisibleOverprint>False</xmpTPg:HasVisibleOverprint>
<xmpTPg:MaxPageSize rdf:parseType="Resource">
<stDim:w>6.728299</stDim:w>
<stDim:h>1.834201</stDim:h>
<stDim:unit>Inches</stDim:unit>
</xmpTPg:MaxPageSize>
<xmpTPg:PlateNames>
<rdf:Seq>
<rdf:li>Cyan</rdf:li>
<rdf:li>Magenta</rdf:li>
<rdf:li>Yellow</rdf:li>
<rdf:li>Black</rdf:li>
</rdf:Seq>
</xmpTPg:PlateNames>
<xmpTPg:SwatchGroups>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<xmpG:groupName>Default Swatch Group</xmpG:groupName>
<xmpG:groupType>0</xmpG:groupType>
<xmpG:Colorants>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>White</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>0.000000</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>0.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>Black</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>74.972147</xmpG:cyan>
<xmpG:magenta>67.919427</xmpG:magenta>
<xmpG:yellow>67.049664</xmpG:yellow>
<xmpG:black>90.145719</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>RGB Red</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>0.000000</xmpG:cyan>
<xmpG:magenta>99.328601</xmpG:magenta>
<xmpG:yellow>100.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>RGB Yellow</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>6.182956</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>96.548408</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>RGB Green</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>62.658119</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>100.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>RGB Cyan</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>51.808953</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>12.567329</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>RGB Blue</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>88.384831</xmpG:cyan>
<xmpG:magenta>76.852059</xmpG:magenta>
<xmpG:yellow>0.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>RGB Magenta</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>27.106124</xmpG:cyan>
<xmpG:magenta>81.603718</xmpG:magenta>
<xmpG:yellow>0.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=193 G=39 B=45</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>16.891736</xmpG:cyan>
<xmpG:magenta>97.961390</xmpG:magenta>
<xmpG:yellow>92.785531</xmpG:yellow>
<xmpG:black>6.729228</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=237 G=28 B=36</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>0.296025</xmpG:cyan>
<xmpG:magenta>99.276721</xmpG:magenta>
<xmpG:yellow>97.207594</xmpG:yellow>
<xmpG:black>0.088502</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=241 G=90 B=36</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>0.000000</xmpG:cyan>
<xmpG:magenta>79.913020</xmpG:magenta>
<xmpG:yellow>96.704048</xmpG:yellow>
<xmpG:black>0.012207</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=247 G=147 B=30</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>0.021363</xmpG:cyan>
<xmpG:magenta>50.087738</xmpG:magenta>
<xmpG:yellow>98.608375</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=251 G=176 B=59</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>0.000000</xmpG:cyan>
<xmpG:magenta>34.851605</xmpG:magenta>
<xmpG:yellow>87.261766</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=252 G=238 B=33</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>4.547188</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>93.218887</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=217 G=224 B=33</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>18.875410</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>98.425263</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=140 G=198 B=63</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>50.032806</xmpG:cyan>
<xmpG:magenta>0.161746</xmpG:magenta>
<xmpG:yellow>99.304187</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=57 G=181 B=74</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>74.663919</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>99.768060</xmpG:yellow>
<xmpG:black>0.009155</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=0 G=146 B=69</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>86.407262</xmpG:cyan>
<xmpG:magenta>17.633325</xmpG:magenta>
<xmpG:yellow>100.000000</xmpG:yellow>
<xmpG:black>3.823911</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=0 G=104 B=55</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>90.328830</xmpG:cyan>
<xmpG:magenta>33.408102</xmpG:magenta>
<xmpG:yellow>98.858625</xmpG:yellow>
<xmpG:black>26.044098</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=34 G=181 B=115</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>76.229495</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>74.920267</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=0 G=169 B=157</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>78.408480</xmpG:cyan>
<xmpG:magenta>9.073014</xmpG:magenta>
<xmpG:yellow>45.722133</xmpG:yellow>
<xmpG:black>0.027466</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=41 G=171 B=226</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>69.719994</xmpG:cyan>
<xmpG:magenta>14.785992</xmpG:magenta>
<xmpG:yellow>0.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=0 G=113 B=188</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>87.487596</xmpG:cyan>
<xmpG:magenta>52.660406</xmpG:magenta>
<xmpG:yellow>0.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=46 G=49 B=146</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>99.197370</xmpG:cyan>
<xmpG:magenta>96.453798</xmpG:magenta>
<xmpG:yellow>3.418021</xmpG:yellow>
<xmpG:black>0.491341</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=27 G=20 B=100</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>100.000000</xmpG:cyan>
<xmpG:magenta>100.000000</xmpG:magenta>
<xmpG:yellow>26.172274</xmpG:yellow>
<xmpG:black>24.441901</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=102 G=45 B=145</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>74.554050</xmpG:cyan>
<xmpG:magenta>98.455787</xmpG:magenta>
<xmpG:yellow>0.982681</xmpG:yellow>
<xmpG:black>0.228885</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=147 G=39 B=143</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>49.448386</xmpG:cyan>
<xmpG:magenta>99.258411</xmpG:magenta>
<xmpG:yellow>1.321431</xmpG:yellow>
<xmpG:black>0.106813</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=158 G=0 B=93</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>34.848553</xmpG:cyan>
<xmpG:magenta>100.000000</xmpG:magenta>
<xmpG:yellow>37.164873</xmpG:yellow>
<xmpG:black>10.803387</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=212 G=20 B=90</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>11.926451</xmpG:cyan>
<xmpG:magenta>100.000000</xmpG:magenta>
<xmpG:yellow>49.256122</xmpG:yellow>
<xmpG:black>0.878920</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=237 G=30 B=121</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>0.000000</xmpG:cyan>
<xmpG:magenta>97.082472</xmpG:magenta>
<xmpG:yellow>20.383000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=199 G=178 B=153</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>22.882429</xmpG:cyan>
<xmpG:magenta>27.399099</xmpG:magenta>
<xmpG:yellow>39.954221</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=153 G=134 B=117</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>39.859617</xmpG:cyan>
<xmpG:magenta>42.893109</xmpG:magenta>
<xmpG:yellow>52.553594</xmpG:yellow>
<xmpG:black>6.805523</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=115 G=99 B=87</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>50.441748</xmpG:cyan>
<xmpG:magenta>53.072399</xmpG:magenta>
<xmpG:yellow>60.970473</xmpG:yellow>
<xmpG:black>23.602654</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=83 G=71 B=65</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>57.607383</xmpG:cyan>
<xmpG:magenta>60.415041</xmpG:magenta>
<xmpG:yellow>63.701838</xmpG:yellow>
<xmpG:black>41.919583</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=198 G=156 B=109</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>22.659647</xmpG:cyan>
<xmpG:magenta>38.376439</xmpG:magenta>
<xmpG:yellow>63.649952</xmpG:yellow>
<xmpG:black>1.181048</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=166 G=124 B=82</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>31.540397</xmpG:cyan>
<xmpG:magenta>49.149308</xmpG:magenta>
<xmpG:yellow>74.108487</xmpG:yellow>
<xmpG:black>9.897001</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=140 G=98 B=57</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>36.243227</xmpG:cyan>
<xmpG:magenta>57.430381</xmpG:magenta>
<xmpG:yellow>83.996338</xmpG:yellow>
<xmpG:black>22.613870</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=117 G=76 B=36</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>39.163804</xmpG:cyan>
<xmpG:magenta>64.052790</xmpG:magenta>
<xmpG:yellow>93.292129</xmpG:yellow>
<xmpG:black>35.577935</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=96 G=56 B=19</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>41.574728</xmpG:cyan>
<xmpG:magenta>70.016021</xmpG:magenta>
<xmpG:yellow>97.061110</xmpG:yellow>
<xmpG:black>49.149308</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=66 G=33 B=11</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>47.708857</xmpG:cyan>
<xmpG:magenta>73.470664</xmpG:magenta>
<xmpG:yellow>83.718622</xmpG:yellow>
<xmpG:black>68.142211</xmpG:black>
</rdf:li>
</rdf:Seq>
</xmpG:Colorants>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:groupName>Cold</xmpG:groupName>
<xmpG:groupType>1</xmpG:groupType>
<xmpG:Colorants>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>C=56 M=0 Y=20 K=0</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>55.809867</xmpG:cyan>
<xmpG:magenta>0.000000</xmpG:magenta>
<xmpG:yellow>19.998473</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>C=51 M=43 Y=0 K=0</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>51.107037</xmpG:cyan>
<xmpG:magenta>43.094528</xmpG:magenta>
<xmpG:yellow>0.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>C=26 M=41 Y=0 K=0</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>26.425573</xmpG:cyan>
<xmpG:magenta>41.297016</xmpG:magenta>
<xmpG:yellow>0.000000</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
</rdf:Seq>
</xmpG:Colorants>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:groupName>Grays</xmpG:groupName>
<xmpG:groupType>1</xmpG:groupType>
<xmpG:Colorants>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=0 G=0 B=0</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>74.972147</xmpG:cyan>
<xmpG:magenta>67.919427</xmpG:magenta>
<xmpG:yellow>67.049664</xmpG:yellow>
<xmpG:black>90.145719</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=26 G=26 B=26</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>72.606999</xmpG:cyan>
<xmpG:magenta>66.668189</xmpG:magenta>
<xmpG:yellow>65.243000</xmpG:yellow>
<xmpG:black>78.234529</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=51 G=51 B=51</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>69.433123</xmpG:cyan>
<xmpG:magenta>63.234907</xmpG:magenta>
<xmpG:yellow>62.102687</xmpG:yellow>
<xmpG:black>58.355075</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=77 G=77 B=77</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>65.395588</xmpG:cyan>
<xmpG:magenta>58.022428</xmpG:magenta>
<xmpG:yellow>56.820017</xmpG:yellow>
<xmpG:black>36.655220</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=102 G=102 B=102</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>59.771115</xmpG:cyan>
<xmpG:magenta>51.183337</xmpG:magenta>
<xmpG:yellow>50.771338</xmpG:yellow>
<xmpG:black>20.129701</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=128 G=128 B=128</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>51.619744</xmpG:cyan>
<xmpG:magenta>43.204394</xmpG:magenta>
<xmpG:yellow>43.204394</xmpG:yellow>
<xmpG:black>7.547112</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=153 G=153 B=153</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>42.615396</xmpG:cyan>
<xmpG:magenta>34.741738</xmpG:magenta>
<xmpG:yellow>35.318530</xmpG:yellow>
<xmpG:black>0.985733</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=179 G=179 B=179</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>30.695048</xmpG:cyan>
<xmpG:magenta>24.188600</xmpG:magenta>
<xmpG:yellow>24.777599</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=204 G=204 B=204</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>19.467460</xmpG:cyan>
<xmpG:magenta>15.017928</xmpG:magenta>
<xmpG:yellow>15.637445</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=230 G=230 B=230</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>8.499275</xmpG:cyan>
<xmpG:magenta>6.103609</xmpG:magenta>
<xmpG:yellow>6.628519</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<xmpG:swatchName>R=242 G=242 B=242</xmpG:swatchName>
<xmpG:mode>CMYK</xmpG:mode>
<xmpG:type>PROCESS</xmpG:type>
<xmpG:cyan>3.707942</xmpG:cyan>
<xmpG:magenta>2.462806</xmpG:magenta>
<xmpG:yellow>2.462806</xmpG:yellow>
<xmpG:black>0.000000</xmpG:black>
</rdf:li>
</rdf:Seq>
</xmpG:Colorants>
</rdf:li>
</rdf:Seq>
</xmpTPg:SwatchGroups>
<pdf:Producer>Adobe PDF library 15.00</pdf:Producer>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
endstream␍endobj␍3 0 obj␍<</Count 1/Kids[7 0 R]/Type/Pages>>␍endobj␍7 0 obj␍<</ArtBox[26.572 22.4644 458.572 104.978]/BleedBox[0.0 0.0 484.438 132.062]/Contents 8 0 R/CropBox[0.0 0.0 484.438 132.062]/MediaBox[0.0 0.0 484.438 132.062]/Parent 3 0 R/Resources<</ExtGState<</GS0 9 0 R>>/Properties<</MC0 5 0 R>>>>/Thumb 10 0 R/TrimBox[0.0 0.0 484.438 132.062]/Type/Page>>␍endobj␍8 0 obj␍<</Filter/FlateDecode/Length 17103>>stream
H‰|WÉ®$I¼×WÔ¼œð%¶+ƒÄ !Ä�h±HÌŒ4ðÿf摯ª›fÔR¿òÌÈ_ÌÌ=~øÓ�Ïþøc{þî÷?>¿>ÚÓ¯6ü™+¯Œùü¸üûo�¿>y´kög»ÆÜúßðÿnöü×ã‡?ü¥=ÿñŸÇ¯O<Ã?{šåµË­áÇ\Ï/??øÿ_m;~ý„_†C.ã~6òùáWè7>øˆ«¯þüò¸M¿ /ù™mÚqYÃF—;­¼ø{çÐïøÐ®±6Ì~␍|è×¼-�g\3gY{c-í{\ÍÖóe¾|YcÖ~ —�ôsn+‹?æÕûx_Íës³7“›ÜÖíÇ>‹ã%ÎìWŸ~B€»y-ß SúÀ3ÙazÝ"”]¦…Ýju3<÷¸Òk9MTª·ø\Ž#—ŸÕôPÐÿL>be²áÆæ>؆y–—ƒ…|ÌRV«p‡Þõè'lGže=?£“‹¤Uuç¶[o+ý× ·°v�5dõ6¹Ö„*ØÉðÙÄŸðä—Çß~ƒgŒ¸ÖŽ Ï€×ŸðtÄ¢O§u€kÊ@¡ç5¶^,,I0š^átoØÔe±¦ˆ¹×JFŒ2t$Ö*ôza‰WóF~ ¤¤vFI3œº¢•i¬§l“�¨;LßõñDVõ6
hKnô(¤­.„Ÿ�iµZV˜º[žmTŽÛÌ0­¼�>jC8ŒµQF X{.MKqšœ�ä_݆òƒÂ‰š2Á¥²e&Ù¹6űE"Æbš�³ ŸYj BU–˜ ÉT[Sp°Ç{lP¯ìÚ(˜Ä÷a‚£âÙ9dÙo”À¤ÍÖ¼¶|ë8Ë R¨J-Æ�ZmÑl€…!×€£‘÷6¯¬£␍ìÀBÀ‚:t!
[W”—{ÒEÇVX
ŒHzY@1vë4év<òZ8Ç�ù2ÍöçïœýsLÁ†pɧ¬Rše!ÉëÊQ;nd£Lô¿ñ‡~xÜV.ÄšÔ_Ч—¢o0±:¿DV¶Öv eÞ¹0,JFÄ~ O¥l¶;ú`6]<28€f€ Û˜ê 1ÁvTŠ)Á šLˆJ‰»Ò¸ef§.‚ýsÔÚЃ]C]:buœÖc5‹å
9tþbWsÔЮµ]ðn*·†¬XSIÌ`�¥hÕØšÔœ‰` pTu¨ðh ä␍vNªÁ‚^Ïσ™ã!m>O(¼ð-C®‡jû¨r™"ê"°BV)¾ }Ì2f¤<8�h¹Aãìÿ™Úý ï~ `æ»™êb0ç␍ð­Àw“ë¡®µàº°Dá…åVazÔѳ°%hñ)␍£|Ãêž…4×ÇûZ¹˜a; ßÄþXé6Ûç—Ç’zÑÀ;@6§¬ó0œŸú˜¥,nmÐv2²kFXÌZmŸÕÛˆRÖƒ¡¢²Ì6þ@CøN„¬Ùë4Âê�jƒCû/4Œïi–dž`@4!Z“büÖÚö&e€2®¢¼™ÚLç ÓÔ„‡&Î� 0b�z‰J`©Ž0Õta¯PÓÝ;%ib´kÑZ™ÕÚ³ê”.Ée¿¤¤$U]È&qÒ®•›ð‡9ŸGìhH߆/Q8)žQWîJ v`~öZØ�¬c@¬­�Ôrv)K§SW�ëE]…¶W}Æ’h£Ö<Â*ú]SЗ9îö]lô4␍uÖ„p“šÒ·|€ºKÂåC­�YÆ Ádôm•Y޵šê¤ˆR£ÄG’V5C²ÿcK‹`é!��[3”WÚYœ¥ùº%Qj5^¶¼è©Q{™ µ¹Ø94ªQ€°i
qD|fÍÊ>§�‹!z‘Ű ØY§4õ¤Õ(�“l-šÁ�%G”ø”À„«fÆÔ;G†õY4êÊ:* šòÁ,µ[ñnfÞæQ˜,­Üv Óå‹P^(ÑW¼îýààóÍÔ€+óoZ©J˜0©< õlô%PÓwj£Ô-•–¾Jâ7â…ÙöIÚØ5OØ™–ÓÆá§\xY¦òk«c܈^ã¿ø´ËË3ŽŸbòØÉl¼÷¬K‚÷šæ[u� †ô␍®3ê[—V�,PÂQ 1òŒðáÎ=™YÞb×w¥Ë¹`n³b¼…ÜÒ̯žš4WR‘ ñÀíMš␍1’–ä õÂÙì{øm°D�ÍÖò¶*[ï©I/‹Ó¯¬É¹†ƒ+[e“&„îu¿;‡Ô›òÅu·"áÊ3ç½q§Ù·9}r©{‘®-îã½àŒoGÿl*,é¦7Q›Yl�šl€ùVkO³kºž Y[ ‡Æf«‰‘Ìg•”y?ؤ/'g ¥Ù5ËÐŒôZ½³|ŽÐUÃû<£
é§×K'@Ý,X.0šŠWˆå¸[j-ä(¼f'‚‹\êÔË­7ê¢f%2'BZE\R@‚/yA’ƒê+šò½®Œ¯±_m'ôºDÒ»ßÖ]aÊë©*‘\=󼞘Ê×ÚcV^–ú ­™•o柶z–©·í…Í~{Y�d8@Bôö␍!¦Â^bD#ü�qP˜ÿ�ãöæËc¼Üá�t5¿ß‰ýòYò+®Œßà
Ä鸒÷›——àJÏÛ5’%Æ;YlYNÙÛ(²”šš"\³PØÔÆ™Ø
‰K×4¡)5ó´Vìèb¡ñ¶uZCi£Øâk[æo³e¶¬¯ÙrVkš&[ØoÀ–ã'Ù.å¤%vºj6ksL»GPNy±Ç“-­nó¾o±eÖDj›ÈXç®0×(¶¬rÁqÜ‹.½Å]–˜õq¤®m7yBÍâ�.qÓeÜö�ò7º¼-}cËxgË¡Ž¿ðxÓ®P÷Ζ~;p/müxöÏ ¤…ßk.™ä ¤h0ï€Â'—x?|M[èRÑôÇ$ĺu°‘év{04Ì/º@ap«Wjn!�Ǭ›h¯1”&Sí4\3`R¶XÝk]Z¡¦ŽÒMõÝêðƒ‰èºh8çí!7™]WM‹°œ¸£ªJ1)ŸÒÿ^Ú‡ÛêÖ…·0Až VÙÐ…�Jñ¢ˆGÖj2êºM€p*.ÇÑJth|tÎ]÷Œ0Z[Žž� ókLîÿ¹¡éê×¥Þ¤¯ ž:œ“�·RyŽ!␍}Éø…8×Ú­¨]É&Ù¶x‹{d�2€9–¤)u¹XœÝ5œR8sbë ŠÁàM_N¯u팦14% %‰V
ÓOà€)a46œü*%¬ðD`ßÂw?Kl¸O�­ð‡Pc—ç}7”8¾«’§¨ /Þ P$ê!‡K(Æ$çåC%GÇãZ*©¶EI9åJÇÙDñfèn+8À怦 o†Hú␍Rè5™Òw²+9VÂ+ü�mßUfqœ‰#XlâPYn\Úºn•S—/+G␍‰F¾ÿÄÅÀŒ0Ý¦Šœ5N£«ôb…sÄí”LîˆÊ‹ìg2Jv®¡Ô·Éªá R‰ƒ±�£k¾µJÌ혃xÍ`QÊ‡Ä ëBÓÏÐÀΡ."OêCל¬ô˜ë¿lWIvå8¼J]ÀùNïÔ÷_w ø¶ëU®lJú b0̤»[šÎΰô‹CÇÄŠE¼o&àjáM¹wß©vAÖ¶R¾Á³=hǤ1ÆPè_ÍO˜ºÜ®Ó,ý®IFÀIWøÉ^cù?.©þØêeH;¶8.Fߨä²ýG‘€tw$GŸ †žÔÉÁh,!
)„^ýµ ä0üP^i­Î¦¶M§3zš5|v—~6‡bï´Ïøº*?Èwõ±n>¥ 9‹#ýÓ³øùÚj¦âõw‰9�’¡� š[8äÕ©èÀnQ‘™Šê›©%A>Š£·]Õ:Ï‚CÁåx)ä h«t¢@ô±Z$�HYM?Ç̇¢û-Æ(pѤŸw<%Ê@½åŠ8f–ì2Ø·­jr´±«¡—,S�Ì(^Éi¾¿Å7…0äwªÿ VbÂ[�êÌ�ä¶òÔ@˜ÔRx]QJȯ/¹0,ߢ\\Ïr#>¨Ö§È´QÓ�1Ûœ¼ÿü‹ÿ Fóö‚9ó—ÿEã–BíæÜ’æ€IÍ
ͪæéM¢°Žå¤s œôþåõíL¬¼ïæ‘Ê2™QoŠÍŒÑ²Jû˜m2 NÂÆŠWŽ¢␍Jt$!K ºÿDA"º/rou%‚½Ò³%g0åȸq›A�§œonê)ôyªÄCœ€Ý¸KwvÔ ‡�”!Y¶U/M¤©øE‡Ë9(o6¶¾@É›vA»‘,åì yx "„g(#Ñ›\­ÖzêõY^g�+ª¦ì|­ùÍ#xQ¸ðÔ>{M©ìTrù4Ù3À‡î�2±Z6¶Î"À_îœì†%qÅ1µz²Ulòë�¥$°Žö5'E!“„Üœ‰LµLjHL[â$€½e…4w�S;IòRˆ½}†O¢†„†Y«Ûs?´i©Wªìp°ÚfÁ”’H{^=-õ6㯖"Àá¼xŠó¯éÐàä ::FÄ„‰»Ž'•‡¤5Â8º,Î}šŽ)A g
ýPð�K«q´¢èÒõZÂ%»ã8FiÝSë�Çc4¸þ Ý›Õ þ´ºrÿkö;¥kÅ?í[ú7–éÕÔ$dtËòqM‹tTž¿R"£bi<¨Gð–ÛÇ™”XNGE½ e,Ï#ûï-B>ƒçˆ%]ÉÙÃW\útâ!Z�‰¶Š®íȶ§óB*Î…âB‘ÔŸ¨›'L˜Ô2”b§UÎT˜…y•¢D[l7G „ /³Äþ?!r.y/p·KOòä$œ+÷w(À7Û‹²‘ûý£q¾ª¯¹Å‰ÛœAÇIãº|ZQ£èÖkún¸¢ÛCt¯ÑÃMMŠFyŒ<döót½�£qÁã©åíHHyáZ)mþéw§Qtgoä|d~.¤@0ïï彟»ÛS·ÅR$èÇû¶I˜õìT4ÐCªÇh¸¶/Ø[$‰E÷í%ûæ'1²e¤<•&芮1øÃ–,¡.ã`L,«Q¶=ʱMQ4ùìÌZ®ChJþU¾Mý-Ú¼vKWë›wi ÀTôQ<ßäplÓ¦}
åÔü2§Kw·ð�:kŽ–b¤v«Ã¶éàˆO¡ø¤»Â&ÕŸO‘OI�ÆP(b¤Ã+·*ô’Ö±¤Ú.ð¤?›.}ȳý•sÑ ^ú„JçÄœVÒ-g×~Osb¹Ô~:ü¶H N‡c;IE"GNªxéÙÕÎ]~4%S€îöýtÏí®Æ´vŽü«ç␍{Qþ˜`ó!�q=먤£»zÐU évÏC âéQ7¢vhŽ7àñtDpötXðÍ¡‰€Àl3Ä-†'æ\uusÁ CZØ©G…$˜©ÅÄ;Snç=¾Ô !¯�Òñabžqt#€ž,Âv¾°M<WF𯂠8G·’}½ò<‰†¡�—îc11•¹ö í;ËÒìæù©¤|;[¬»Muò1ð½ïcJ^ ‹×I¥šBù…&¢tû\OíÔ5µ�Šj ´%ÐvO g+H€û÷–^ {t4»$°ÇDÔ¾ÿsšqň°Ûj}ÔO~vÉÜŽ˜`5Q¥O¡§ËAJnaI\¸”Z9táa\¥6¥¯úãº(^åG*#;Ñä*×W—çœ-Ü¿›õŸ)|xi␍¹õxÜá�KVEC(ZX›˜'´!Ö´6š%MšƒQL Önnp±Â”ÇåŠó‚áM¥Ÿç¼ÙϾf¤=ß÷m4ùbrtWõääôÓfILzS©p,¥É”Ï�NÙ4^bìûrºÇ®pÒ,²·¼ .Ç ƒµl¹#6É:?bا´ü‡eO9Í¿Û|ÂgïU4hâ?šÛߘßÏa Kt±oõ�Ùõ½[íY.8©¤€là…‚émƒKéÅŠíÀd¼¦‹Û°›©››àK€ÞwŽh_Ï™X×àKrˆ
_qŒ}n[ñwϧߜ-²ÀØ9øÈÅ-�V“,qâcÊFË3ÎÔvýªq²¶„ͱ␍¿5…2[¬¯"Ãð¨ÙH/Vi¼)|ô�)¡1ËÊ$ùפ w›�é�¬Ê.ú–ˬFÌØ;U={©ÝÜÀÌHý2õŸ'*°tj ï>èì�-eŠ[Ù�·óâ•÷�­+úcýƒÓؽæŽ}v
òØó4òES�«)¤KáÃù(d~k¹Hàä/g5‚)^](ÇБ¾/~"ú:ýf?+†dªkCVÊz•Ú/â!MŽ»hÀɾØ>g~�s?Õ(õ¬õϧ6”…ŸÚ¡ƒµ}4~„„¤œ‡O¾mlЩãŒ�Œ¦ËД+Øã}£
šî—â²Ãž3C§àKÿæu‡’h¤×‰¿Y–n<ä« ˜fV†¹I­JÌH×YŽ�<;•ôÂÉ.·MY1ë!ÈÕaAÏ“RÇñ»&μ^mÑ&_öYl©~Hà°œÏF‘9†G%„žœOÔ�ÕÒ­àÁuY��ìòVÆ5ÎÓ ‘ƒ€ÕéC %'&i9]„™í•FoÊV°&C¡¿ü_FkD$k0n5„¤ƒsŽ0µhD=ߊX„=åäs:Ö–IS-y�/ó!fñlâNZAS.Q×Öòd�"½��! It„�n`BiZ¦��4¥ôxε\žìLGU¥˜œ´�åxÛZ2”b°F¡q´ôŸä™Fò9ªÌèÀa†ž¦”0¾NsÐÈ÷õ…9ž‡Öi0ìÈE¤XVôã´DŸ _Çú½¼Ë¶¸Ô ±ºÍoš·7GŠîíy¹›Æ«§3Æì ËÊ3¿ï94iùz@G¼Í³’l{ë°—µKxÓí®ðVú�½SªÞ¬÷“iÑ­ãìWØ48JêáS«ÑädÞŸa«Ç`”�é#“
½lçz5␍ÐyZvú`­Ž*÷0O8�§4�ÂÀ—&ߊDx2ä"[Å]àdë4”_:öÒHþ�¨6ýÂÂAiÏo;Ú~H�·H ýP(áÅóTvÄzL¬3}"•Ù™ÑU{ 2ƒ%3� 2ÈMÛ¨p}�âFßuÙö©Ÿ%¾þQÓ0¤™
k9•fpXɧ¢‹½Û ’̶cç ³ƒa»­ºm˳d«Ø‹ähiå/;Gþª½àÖøvöàÈló^íO¿kÊ)îÏÐ]®Ž]^=ãäÍï=^3W�Î|´·mÞ2␍òyŽÜ›K¡Õ±�ŽaC˜Ç&ûó¾K¤•Vr GÔˆ¥…”ÜûÆ«$Ëqîû¾@Ö#ÁùN}ÿuÇÉr~¿ú½ª¤©’H ´•u†ÒQ¢¸�IÍœ
x×�,áã¸u]N<ÄÉ„å¥Dç�rÝßqQã,@r
�ôshª 3µ¥ŽÓùà8ò8JoGEàÂÁŸëe#ÓTWl/␍éö¸ M%¢cM«9(®5õ9÷ÃjôÃ@ÕaìH²ÐœÖ“­›)Éw_¹¼š¯÷ÊÙ�[Ó3]ŽÁ6Ãj[ÒH’Íij<à¥_’çGÍ'ZúÔ’Þ±%ÈöNï˜7!°”?ÓJV™¶LIM3J1ì&r�†¯ªF˲iJ<š¹\6uš'÷ë縞ÄL¶Ëb†;Rd*�I¿MÙÆâô¡â‘íP/ØFöðÈå_iƒv/ÆUˆ&VZã¾6°�E£ —_èòâÎZøŸdB>@y;5lˆ‚Œdäë�V©ÑÔY¥) g9¢_Ž1¾ñ$EÒ–æ?D¼‚˜`Ï)¥2¬üps‰œ•H*"~ÐjÐÂ,âz¨ìø¸ÿÔM1hô°@ü¬>¼LÙp¹EÆM‚£Û–#ç)Ëébñ€Á·K L`G~8PjúÃõŽulèlMµˆA=YMÉé$+5*zÕVHÅuÚ!Èê~óã ’
ڌׅIz=LMT—Ví�J°À€”]LÁ³•#k'PVJÊõC;ó¹O-ÓÒV¬tsîPè¤uhhÉšã^•Çs„Œ¸Òïy,ù•ÇÒ§ €Î÷!›ž«þb€µ¶49Ÿ& «Ëóƒþ”u™Ä‹0ɪiȸnb}ryî%Î\tØ�æ'‹âÏŽ%lb•␍2µ¸jµ“J€ÎÏvr(–ÿâ°wÆ~”€è=�Ýö}"8·{ü9º)ã´8{X ÕˆXˆe•­T….ÇîÌP ­v–Xœ“#14"ÇúuªFbV]º�2Qú™#Qm¨ä�ae±ßýÕé’Ĭíë@Ìç@ìÇ@ŒÏ�XÚê9Ñr ,Ms„dZ�˜¸!æA[<Äò@”_1nt} Ä~„5ÿ¿‚|º~aã␍ùqC¾ÿ‚|ÔOÈŸOÈ;©œ˜ïc ¶å«è¬ž¼Á1äñ"Åõ¾ù_ _␍yÅ7‚ö␍y!Ë*ò£«ÀLñk
<nú÷Dúñ?•к§!> ¿~A~ý;äëÜ´%S -|@žzסm×Ñ<þ}ò”.Ë*rIÀ&)Ø®mH=¦9_¨¢1/š†s40ÕÊ!EÀ •¡—ü¬V¹­ÏÛ4Òà÷;@tùæ÷z`Þ�4¤� M%Øl¿8.^r>ñ¿Ó^¡ò0ǃJÄVoÞŸ¨î¿Q]o4>–ÄêÍ÷_4?þ␍óýóý;æ§1¿r]_Ù�%Y~w³|J Š6a} ÇÍ¥h:C$ËÔä{¸6õì’á1` Ú*=ØìŽö ù-–_Í\Ë�_aÈË$%ÉÏïˆïˆwd­ß-CkÎ4B díƒ!‡I‘"ü­¦Ž”š>“!Ùgpyk7CâØMvc©¶¤Èe£Z§ØtfZ‚>l\Ðö<ª³mkæÌÄÚ™öÏ åµˆ]ÁÙnE*AA¨Á?#␍^AâÙöÚ$h<ÜÌWÿVz&b|aº»–S­;Ô¼ÿp½Åù‚ñÊlS0I\,jC•ÿÓ‹ÔLy¾¥ÞcŒƒ®r^µÌí3„Û©ÜK첟�§u¿Ž%—ÍÝD´RZ>¹¯ë•3{„sfúâP®
”EÈ–¸dÇæÌ½©–1hª†}X–¹þ¦¢©öp8ZÐ÷¹Û„ǪրX0–ÍC]P„êSaj×ÃÃT‡:˜OËœ]˜0.)Ëœm »ïmà”ÝÛÉì2{ᇇ(–?Œ etpX�/ª]ÇÊ>äF^‹¦sÈ\]y¥®I]Žh_[Ex¤ëÂ�‰4¾ø$½²1ÀÇJùÆí�Ʊî’typù„�®¯Ù=–)¥aq1?1I2]ÞnŠz¤ÁGÉNN²gÛ÷ƒ—‘ZÍ«�‹Ð°æœ�,RÌRB*-D1ÕºVçËø3$‰°jH^ kœÍa‚©)©û+Áô‚=¦ij+ÉŠ’£»ê5»ÊÒÈñ'žÿ°Wè–Lƒí
Sä¼+Hé`ƒ”IQ5s¨¨w×%ɰ¸wÓüÉ£ê¡}»z×!˜ßYò &¿õÝH¦¨ö‡‘œI…OiÇ[Ÿ$Yß” ’¬~Ò‚; -fÃŒ¶¡v¦½!·QžW*ÙÜ>ëÛU¾ÕR‡✧àÆYÿŸàÚd¶äªyéÍÌ÷,eÿMp9_÷™±J�ÀÖÎîØØ›W
‹gÚNxp<ŸóÄN‡¦ì¶´ËI`bK·‰�‘3š␍&Ÿ“¼ctå/#óŽÅ–q‹bK�;ëK¢ºï¾?Õü›»¤�"¥DƒÑñQÚ€¢I]Gvf¸H嘽üYôÐ[ŸÈ=‹ƒrÚµ:â¨óGDm¢«¾w~Þ˜ƒõ§ò†V7øÇM³·Ww
ÓÛlÊÚ¨CŒ5®x9Ü){¾EÅ8æÐÙ¹OE¤ø‘th !‚xl„fáÈ@`}¨ÔÍMåÒz×ßEúOÐýd›¦(Iêq((&ìe’’]�«ˆôÎïU+Û϶wMÉ®.¾4ê*"
XÆhWÓ¥m)ªÍ{zå@¸šjà0ÚHé¥GÆR‘«ÎèÊ*O 5Ht€ÏPkŽ�NÕ@ÉE>psµ‹5$…\«<öÓ Ò›¡sâ?␍R¦Û€5�ÕÝ¥†aÌ^�ã…½ØÃìßô"rJU#1␍ý Î�žµí�úãÜp´Á[T¬�pØ,]Q|Ú†Û@¹"|¤aP‡n£Å␍=K†ärÒðMŽ`+šñ£ÿÎ×[8TAéäI<¢î|Ì<@x³Õщ�<
½P`ØÝf¿Ó¥‡;¤t¤âœüM”Íú8ñ�³':ºº†^J8¢3‚Îm$އã&¨?üøG>mß…fÒK ,ÿ°ãdC»;ŒëkIt4øu÷K‰Uœšh!¨öeŽR¥j˜ÀÄòpâÑ�SÂg›@¶\ŒX¨Š %µŽ41°§±l* Ú&š ýâ 5î?j\åQÀ1ðD-ÎK†¿/‘k—þÖ©–()ácTD‚8‰éA¬p<Ì␍EcÔ鯱'[*¢¡:n ïÇO-Ð Œ3iŸ²M-ÄbÞ«FŽáj>J �7UĶòlô¦ò26ã\š�ò¯U7Y<W[Öë–tXùRÈB»äVu�½ä€™•äŒèV+Çs_hŪWY£b¦˜J„úR\PbÅ/™g¦]jì´›çK­Ã~ 0Žr ã^2žu)&
&yª¯¸ß²˜r®ÕH,aä�Dª©×:¯[<Ï 9ƒkN:‡Aðý>#ýðó5HätBï`Øíù¢í>
n rd±áïeøº]˜àcSVóX4JDŒ—†˜aŽÞªÒzK=4%W—º¸Jrçš1ó´ç•ËôéøBJ?ØÏÐç¶’X{å&³mQ9Ñ¿ùC(€�kÿ0×”Ùî]§Bç±Ý5õ8×Ôý¾&ý¥Â^¥Ž‰Gc‹:␍q~f&Œã±bÈ_ ␍)˜␍%L¾)ðö²©>cÙm¯¹+ÇÞ‰þW<µÓšózº–tª'y•\Ø¥8ƒæ‘t‘9rhÚÃ:ã®K¹O¿Ÿà}ïªè?ð‡w‘µîûî�ÖõÙ#þÕÛÕÄf·É7p=„ýÅÊæ¶o1®hFºŸ©/Hø!›Ø¶Ù( ö\¬êB’ –û×)ê1£mÇåÏlÏXÕ§‹P¥@.0Õ]“AñìV$Œ¹@_è,'ZÒ©|<aýße’É␍Ñ}ŸBP?‚àÞÉ}ÿ­c`–êÙeo$Q•Å$1~\ûHè))+à“û]lûàyðЈXZ5D¾Ü D<öÞ.]…heˆåM÷Sd5TO›A&ÖøIÕ `v–t’]·ÔÑ8‡†&O9ƒÌ1wâ¼␍N¸Ô$
÷-?Ý"„Yô!D'ß�cœçÚ Þkزð«ØiØ%ušøùΞê q¦T†¸³§SÜpBð¶Ï” †z)z¤Ê‹S7-µZÎRÉ„èw”"\j“oÊ8§t‘
†)(ÞŠLÆÃõЃøI¨TCã±Ë#`Ã¾é»Æp˜
r-<’EèÒ*Ê=eØtÊ¥¡žõ*yi�2Ž(¹›ˆ5•‚UØþ­ñÑD¢\½␍ç¿!^‹Ñn>4Bð�¼q-¸GÌÍ»º†²V›Ño<<û¾… ¸Rݤbœå|6%ÝЌҸW¥,á_¾ÜÔ‰mR~.Ø?a�‰��ª[ã“£>è1"ì»ÚçQ9D—"¹lb‘ÖÓÄÄ{�¾Åãt�AW"Q¦•ñ±6C…"šûÅ¡¡±Ä ªúCuìkW‡ÔUc@œË±˜etÃØõ¦þ”B␍^…Ø`½: NÜ�çSÍ|6]»ÏŸt6‹°Úk9A
Ë¿ìò—iLp—Þ{ûؤC×U ÇÏ®÷å.«l“
‘•†ÚÎeòPᛞc¦ æ\6·¿Å¡f“Ù—P1:qÝ÷.ªTd:Ë!<›\LG`A’—Áßj eûT9І5Ž"²¿ ù�óhìàD™t•ô”cÂ[T˜Šƒ¹ßAè©k/Pöê) Å©ËD!xéÓ‹VP›kJî·*)!¼tŒŒË|?�ïìCšHµÆ‹;¾=“‡aé1!]p+œÁJ­N­˜[%IB ™Ù‡=cþ¥WÍê‹];qQÂS*ÏÅ 3dS Oöt¿íO¤.D¦âòh®-UGaÒº†*,ìyÇò’–w™�Ô{ÉC\h´0yGUtl´ö1Y®¼µP/QTúåSh‚šË‹â[âRB ÷ؚƌeømå�¯EÙÍÈ‘®×î(êsÝw†GŠG÷‹*jB¿¶7øl¤WÕe›<ä0*Œ+i?ÀTª’š·¾ÙíSBàc¬Wx¨Æ1¼’;kCˆ×Ç•î‘J¡ÀŸ�v”õ°ðšiËéÀq°³=›U·CœÏ>Š1n�âÉo¾5 Œ-W_—=›>£Àô:¯W#(¾&ùÃw¥ðM´íG‰F…黹ÍxúZœw¾ÈŽuº¼LÉu¿4AKàñ!ÝVvé¶´®8‰ó
e®ÚƲľDUbƒÉåV>תûðrÜíX¨¢ê§•>␍Œ–þ”pgB¿³sy}nlB=é›x„“¤ºT–ÖµùÜYF®‡5v:©r‹}/OÉ_ŒZ;’Ç#‹…NØë™Iœ–W·Á°�öºR¬ºkæ›×Œeú>–InZÀa}eo¼é+Õª±®7¦'Á©š¤®¶åUª„éu]zã@Oƒ ž
‰kš$’␍^|“úȹþ®¯+¿¼aêkÿ—¾6)¼45¥¯cS>ö¾sʲéþ˜¬Hy3h�T³[4óªfY5·6ÛVÍCÕô;,šäž#¥šîbD‚³¢¬š†Ç1ëÓ?²™]²9½Ø�lvËæ²læ•ÍóY6C¶ú«_Õp©bQñ#“ÙÝŽÇ␍ØÀMœ(éSªŽuð«°”ñŒ�ü;—Ú½4(ÿ!šÖîuŽUsÞSL鬚�h^j/kf½kæ…™z4³žØP3{)èp&©™ãÑL¥B|3Žg™Šé�è¿)æô¤Ÿÿ§˜±ÙߨäÇsØÊ?­ÐâÜv␍iñ ýãë(ù’3rGû¸ÚrÜ­CÂÔJ Ë%�øêåù_´a瑚ë÷»š7&y€TJ¥žØÌ4tR@é¢#})cËWÔ+œ-ljj×.Ô
�?Ç-X*qpž�¡~;[ïS¾¡d¤Œˆ‹‡;åèØ;<ÿd _ÚÍ’ÛüÁ¸'Û]Q˰1ZVÀúµ‘œ H𢯢ø9Ye4˜Äì&Qá$ÇuÕt°P™ÑNÏ<<2÷PË´XOÐÄá™�Ãb˜Ÿ½Íá\,ªn�ÛÞœ�²f#U]Ná·„v,ÛÎ¥90Dm´Vü{A&·â=Ö’ên–9h@�%´œp_ÛG‡k�MZÙÜ×Gó–cKÍ=Ñ!å1!Z=ëß78ÁÉóqúq’
␍åu»QÍÇíœHø»CÙñ÷Üu“Œí`z–Éni�t‰Djû�öi‚¬#Óqü´¥õ�Ê¿.kŽÒÍ~Z:!IB¤ç䕦°’Š¢�§e¿¥¦”ò-› $,×2¶&І&‡iG¿TœZO2Î%Úû°œRh£Ø—’Ð’Á)fˆ*! u2.„âcr@ù‹ˆ£w´q€­u�kòÁsEI�.|àáOÓåò’N=•Û¶tÕÁCµ
ÇÏÙXf,xÂÚ"Y܈QsÏM Xt‹4«¾Î� ¦W¡Ôú6§T‡Ó'Â=I©,Ȇ‚ï*8§åLñ˜©àýt
Ž­én~T¬÷>5™„?|¥îaؤbSµ .òiRã°ëRëYˆÀê7µƒ,Ï·”IóTÝ.¸[sêÓ;‘÷&æ4•Êc~c³;×.Z¯Ž%¦7&¬jÂÅ-„­iØòÜ÷pžøÂG
áô û‘ê̾î�¹j7𼔈cCEScÍíLä´ŠN‡­9l]glªg°Ÿúéæ,öZy°TúN'¥ë
ò^rµnç\ùVe"ÕLˆåÅGyìÁ‡­LãZïúHsÑ4ըΒFMbÖŃ8„ˆ€ScÓÖxxu3*½ûÁ2ñ§N˜ÊÔak�m„Í”˜6Öð˜â Ò°ð õ+%û¹A‹b77ØÃý&¦çù³†¬U¼ÕçPv.Ï+Káèå¶v±°èán1§«·¹ÕK5¸ÊµM/Dx÷g¡}QUj§©~N�e}«ÜB-Ý”i;C3òׯ‡’§<—dèæ\bt}Ùz•6‹¤.?q’éi©TÎ+Ý««‹]†ÚeX]p…­cÐ-yâ.Wèôĺ}ï3víŸx·ÚðÚ† æS+ó¡SË•ÛÏzp…¿Ôdý®ÝcÑŸOÕRÓåt¡~˜WèSíÌ£}F§ÞèÌh=¨LâSç²~i;¥J^/ñû/ÏunØâšJsîn>RºÈ]ªÍù<(›qXŸª]˜3”æ�ÆñÁiv¸¡!),•3^³7AbûNtg4€'U¶4h:ìj4Ä¢kÑn�¡␍z&b6¯NÓ3Å7.¦Ï|€6þìü[ÁÃqmŽùšw¡²91€±Ïæ¨Üjò1;BîÉùQ"úA¢´ÎE÷<œGô¨´þÔ š*ÙÛ`äÜ·Ã_LîP'�êéÈð)(Ì‘%A°QMݺ|w␍oÖ»3üiÆb/†çíšÚ¯sU¸ÓŸ_›À(zÀ¹ÐWK³yáGýHuD†¨␍Ô@Ôà|=ÔŸä&+î³{‹ŽtD„•V\ÔäÝJ_ìøUr8Ü·ƒ�Ôþ¡lSÙÄ84xèɦ=&ôÃÀÀ›ê˜x°é®õƒÝÉ�0 ºJ5¸#n×ëž­�Y&åóÀF$”ëçD­áY„‘qÅó¨�CEoÃ5Æ=ŒMæb;=ñ¥3.ϳ"!6[íCâq¦qã™v¦ æ;ˆ:;þ¦»ÌŽ#I’ªJ+@³¸<yVÖñàÅæìp¿hɪÊÌðxÈÙÚ”9ÿ/´Ï3Jcƒ|A÷NâÊ‚ùõ{9°ðΤ(Ú ˆ8ï†þ¬a�9•57 k²P@Ñ‚|¤;C—Óbz(aÍÍÚ\ôp4•D^†¨ Iþwó‹s‘~Í)ŒÁ29€¦»,SNwÊ"(ƒßÿK„"L²¾áû]�kVM‹+Ö;R•Tðë)Ü–o›tºL&jÿ\£ìæhvw¢�â%␍7L¢š…Bò‡ÜX¿<XÓ€€ÎÚKTJ®¶TË çßÇfŒ5þü\ËÿÕõºY¶uåƒÈ®?øÅÚ†$èLÍ Ãµ)Öì×sõ ͨÚ‚/íì‡át8“D= ÊõUëÔXµk˜±$ÒF¾m­´>½h޾ϱ¬/?¥Ó,<$/Å  |á’<m¬ãHŽ@Ž£åÔ5ðZ}qée¶íX*Îdw¹hýðE±wc.‰L)å5HU5b]Ns‰¦¤·�þ)ѵwQ"kÖ¦5)¶F^Çî㲎ÓÁeZeº+öB¢Þs…fºšY½»,…oq½9m'͉N†RN«ÏÈl� Ñ ™Ì«÷¹CÑ`"é\)Ør#´XÙ–æ&E¾JŠp˜/Dñå~%-�”‰0§‚�µ
µ>ûú$æÏË0rBk¹µ~…V`ÕýÞFÎÓŽÙ?«"␍×{–+†p~ø~HÂdYß+�u4Øõ•¹¾é&³„˜7/ÝØAŽóïKÿ¡²§Yò¼Y®Úƒöþ®¥qc %™/:"5·sÎà}”¨ô˜�XÔÈâÿ‚ac)
OÆ1CWD¹¼Bñ95›ð̽�QI¬ ë*n³ç1o
¿œci7ŸžÅD³²Y_T&¯,[␍r;ÓrÝÈïð
2OnKûü—|K®7›o›¥Ëøe‡ÔÿÁ~T|z·¡»T¢/;EèܲöF„YÍ—]Å‘‰yB7~œÿ˜·{5�ÉdËÏÚ噟·ænèÍŸKwò2º¿64QÏg¸ôŠo %òŽM­Ð›äF/ÿ‘1&¾x®‰ü±sú7ù°{ðR®×Ó„ ©#Ô¦Ò«¹£Ë¯‰ø.Ƕ+*1kÊlŒó¦Ýª+$î³tÓº”v°]*˜$K‚ä|�ÖqlÏ[žŽoœnXM9V¶ñØÔ½NÍw?ü¢³?ƒð”¤ÁpÅÇH£yzç?s{ä¸ÐÈ9yz.쾪Ú¤ñû"ž<·´5ñ*‹}/¢b »u:®Q«]™ÎÌóêMI÷öp‡LY}ÊsZÑ_Ù°|EŠB6�ƒæ?E_rW�ß:|Œ’`f„·VåÞôpŠýñÜæžŽ«Ì¦«ðØÌ&âµ4?è°N-<Ý|áqZ§R!vGR)•±ÄË4uU޾­Hë1ÕZ␍�ø°Ä)†òxæi,çšõŒLDž�†ç|ŠÆçµ|Gª�`H¸I^Œêo¼¢ô¼í:}|@ëËáì·ž§0*œsN‡Dšú¸íà—\u¾'w^?qà\%)n.E¨‰4"Ϭɩ]Λ’¸eÑ æ
_shO¯ß{ûÓ˜jnkÏ*�m5,�¯•ñæ« ªõ´bàQ‰d Û€NhÒÒS\íÝWýšBã±ÍB´®8&QüJñ„c‰9¿ótÓ¶É/?ñÅþâêÎ'CO³/êG¿õ¤+òµ|­‰ØÆßžhµ½ü/�†=‹Ì',d™M*Þt{&/·Pië„•øfw£,JP^ÅSˆ™6à‰ò ,¸û_¯É�oº¶OÀˆñ¯üކç€ö¬Ô¿­ÑÏ‘O]\à1Œ¨Ã£+Ï‹�òÆò Rh³¼ N—SÛËæG>ËTÙµg¨Ä€xÃű¬¹¥kצ„5è(²æy‡¯R&f©j~˜Î¢q95O%š�A½CåTRÖV‚©Ty†�·½Mµ<µ©•
4Ÿö˜í/+½ˆCžïä¸h„œ³ƒ@E˜;–×BÙ¯°�­Èq46:�?›ô¯©K%è/;�S7N�Ÿæ‰Öxi–š©�×s:뤣¿CÊ�7ü§RžÄjkþ¸CÜ££ùqB½çÍÕ¾x«v'5Îuò­óÃ>Ûtëû �É¢n‚Ѝ£+åœn
^WW¯zöè÷±o"†BÄr}o–;û÷üËÝ‚÷¼ßx­82+Y顉\uµ1ù­œXq„(T¶ÒóQ0•ß}ƒ"ͶKgRrK#´^Tš'‹CŠh×zšDõ[OˆffDYd‚øKëš8EÖ/%õB1ìË‹egè6äÂr␍˜É¯‘,9�¿ó|rñÛýásâäGÙžÁ^¾w\ý'7nã;q
iOñáò
ãÕB|␍Ñs6š:KŠï™ŸHâ(-ŸâÕ4{Çtãb—�?sáˆàäœl`·ü>ÃYXÖ7€¾ŽHãiM²´©NË'™5+�$2*¾,BwÞÚww;ýéÐün›½9yÒ³�;êG2Üü·»N;ÖytHû3L—dsl÷]£…Ê�éÆU¹,›RiuÛ÷‘ˆùF'Úg ܾnEouËó»íäâ? J¢ÀXÙË( \n€@ª qìåQsèZÿD;U­˜£ç±³qMRú¢"$èéªÍ¥ê´®…^„9!jöéêÿgÔnÛ‰Nh›Á7•â©Ð6³Óo5S>S�º<¡ý#& J/ÏQá6aLæúЮvÌœòEwCÄèŠ$|5ÔÓÔ²9 ¤
²�ëæ¤±ƒñ¹Ëƹ72ý²§"æ␍êõæb<û§,ä„à,X_µvëOåC¼á%tÂ(~
‹
º·åuï‡íoHÕ™”r�à 0 ¾QIh®’Éàt–Û0!ìFÖ9Žoƒ‘Ö²užìTô&�Àèê½BµÉ–úQó<%´¤Vž½Ýˆ(ý€Ü$\åoo”ÞšB£4U£1?†°¸€ˆÒ4‘«4¤,ºŒä2Œ• q—:îb©xß±„YP²"²¿îÎV_s–tU‡ø»;!HÂø¦í@ì)Š–jGpE‚“␍l#oµdÆÜ1í °IåV°0ãÉB§C#Ùï}¢BΰLÎùM.'IîǸ|3
i÷èýË)ëäbZPñ™ë�ò¿jr|n˜;Y…MÖÖŸ‰;â“câèÄky␍uøÝ"#82ª£(+Û¦$Cd²8ìF1ävQ)ì€ 9-«€ÿªn½æDjÍÐv½í½yÖÃÔLOØü�
ŽloM†>+A»µ{În³î3ð9ÄáÕc‘äQÔ§-”7zЌެ /›1*A¬-Ó ­ÿ`zñò&â|&ö}1÷^½,Ië£]Ë�Xó÷ð×�Ô2¯ð§1ý9µäÚC7*gN™|␍Ù\ná}NGÚõ½¡\|)ÃýÆiµfpð�¦—nIƒd7i.a¥ÊÃBN,V±²z±É•Í)¯>sÆ5³ÍO­Öß®¹/÷T#hãB»ö„ðª×�n‹z—(†²Ã‘©SÆ-³Î¡U%ÿ␍Dtaê×2û�då>ߣöû‰üü¾š¬… q÷�ž,3|ë*Åußu±0^—‰ð}bÕ´Ø9þ)èõ¿R’§`ÐAêpûRâ¦L¹¹¤ÁøeO5AùâÕU†zR’g”\z®n]w]YfBµéO91;-µîhñ�_ÊÁHT§!Ws%␍�ÈT4T-»¦¡\’oÉce³Ë_BAõV1¤ø¸|ºzËfÙ�ýÃ(žÖ[ïUCåC”0ûõr«»¯Ò—»ÿKw¹$ɱë0tþVá␍Ø!‰?iQÞÿôËm‡ý&�UY™’Hž2}å×E%¡ö\@C8–ÐU½n­/iŽH;º60gjözI®<
‚i[0ãR…;€.ž!t¹A1’ˆðȸß`W~‚ q:óŸXToD†ŽZØî¢55™~óÆ¡îauó@¯i¥=][âŠ{…ú ØïHjݦ«ï—-Öû£(À6„16›Yƒ>9êפw÷<Iû�ëGIòÏq>võž’…»%ßÈgå) …¤ÏÓ†œFæfŒ
Xj\ÿ(û>º·¦�üwæ�¬Mê’­s«e?.ŠZPUhGÉNi␍í2éK}Û‡ÿƒ[‚H˱ÿEiÑ—CHós°¹ÔFø ʆû¿Ñ¥9§ëÒGÕøO®ûèÍw¥T¼“jÝýÍcavCÈs×K9¢Æ›ºGŒðTŽÀG°~¶äÝ©Aæ(äS&©~ªIR²qŒzòDõË¢»k@œäëBýüŸ –IRŸ‡$`ò½&ªÑºBˆKa“|N÷ï9r5Ö—xk€D‡ÀQÞä••(±’ž␍a6�Ú¥E"µrü±ŸiŸs%bv°ö=Žs[U·øßÍdÔDÞíÉt¢fÚ­èàÆ$3§’ÙW«�š^À ä›]\␍\÷y&ŸÁêOŒ”^¿Ü8Cˆ0{¼‘ûª%«Ô))0€*pZ�dàþý",½¯PìÖÂÍs‷JÔd‹ 0+6ô -°m¬á« 5h^ÀìAƒ^œÖïê
qi¬Nnµæe‡Ýu'®—oœ(LôÇÔQf#yÁHj–Y5²5XC̀Жæ‰N§ .È3��‡,ôLm’gÌKÿ¥Ôõ£àЫ´º·ž=ù†êK/>“Û�æ‰�ù÷þ;RrE%ᨠçûÉ…®ZlhœÈ�icÅP¹¤.¤ŸÞOI$rï(‡°DÛÈ�KÈÄw35ÀÏ‹µ'¡t¸àV8/gèhÕl—ŠÐ$Ü‹Æíîa¨1¸nsFwbé«.Œ€�^È!æqÕ½Hy¬<0-ånÜ—Zè“ß�¼î7žžæÊÔ²{bmÝ΄²“Á-4—G¬¯)í($ÖwB=>`Ê)Ö —OhGf§”¸¦ÍÅ5ácKE6Äe|hTÑ-]Sj¢Fï¼¾FªÚ'èµÏÙê7>+Ù\ðÒŒŽíCíº‡"k±5°+@sŽ_H»5‚ŒûÕ]Maõ«¡`àRæ­ß²ÂƯ–o†ai �ÐÜá¼ÃÁC›ú…ý¨®q
ìäL€ŠûOç/­š�ÑWE4ìúî¯ Ðª®/³=³�ýéüb t Ý␍)dV5Üí>¸"üøÁ–}?$øÞøÒS�´ <ª‘J‚å‘°†•²Ÿ  ~@¨2QºoÞu’hÞ'GÌåOHÀ=ž›ÑA|YB*‚çMö&‚ˆ«”¹~|xøJƒî]R¶-�‡2ëÀ\€»ÈþÔ¯K¶û&|ÌïÕ-’ ?1mñò­9áî?ò±Ò’ŸîBîµ´-a�®˜ˆbÝ-ci î³Ïq@]yÜ£c:Ô…ºæd· ³UÆ€µzàÌŒß@3Ù¿×…ÙÂÜ).»j_I.› Á"ù’³­Ê¯|Yì¦>êÖ=Ø"‡xúÐÀ …ôçîЃÈ]±ûo°Þo1 1¬¡c9g‰áö¿ƒ`Ûbo·Õ³m/÷¾ØÞ’1½¤vÇe“Ú–ô'M;È�h¶«\Ð^u'µå˜ñTq§i>·Œ±Ô¨€çnŽ␍²d“Bé7&ÃsàÖŸDÂÂÂâq<òËk=[´9„)AüÁdã ̞墔­Y�%{‘‰X%EpïÜZE:C‘MîNåž␍ÓÓÔ‰ZŸàöQÀ‰^ÜvQMD]l3àÝ£\·´=B<fHï/ãÌl%å¿zu.ÓÅä’älë␍ŽaGŒ=ÅूàuÖ ´Ãö´;Ê} {·O½hϺcŸ!oÐ"Yé§OvãÕ…ú«í Áµ 瘎Ò–SÚ¢xìäÙCò ÕÝ}Ê�´
44Rh£B7±æÎ\ªÁRh ðACä`:’”E/6²Ô LS¦«ÍÜá#)€t+úlæd³$›ÁóM
*$�Ùù ?èì3N{z2`‰NWÈ;颰O␍ Ÿt{Ëq×
Æœ Œ9íe“ÈÐþG¾�”4fTy¡©@ãôûͦڇݷîySâèjT!uô™øò�ê·îU¬µÇ§O¡Ùõœ°‘Ÿ&#¥r©PÑ(R:•7=…’¡K�…—]´Ì¾ý¾÷¿:*Ñ×m"-d=nþÕQxÖ™]|;G0¾é`1)¸a—=†Í4W›Ù¾¾-9[ìjœ%m¨Ç(ä\+4.”Þ ÊÐÓŠ†%Îù±§OwJ"ô¿['@Õ›œÁErn$QDÚ¶ žÌŠW°KË7Wö™¶Ýô� Çˆ¨Û�ƒ`¸ qkÜýB”Þ’d€Íœ­ÌôåZ$Ø«аÙýƒw òÁ3qÔˆeux8µI?îØó-ž^\+-±×”“=k<šÊ,;=Ÿ½ÝyÝ­é]nêÎù!£²™Žœ(hÚRæÍ{�åúIù\’|þíÕÍn!à<‚߀ó Ðe@Îúðlìr:]*ìªÂ1‹¤r§²Ì�bÜPåb'û�Kmã nÅ7®äo¤Vô�f‘>´øÆF�ð6çÉÞ�BwÐq!œ17‘-pº­}k6/8“éð¼HXšºz[ìDœÞ"êq^!�AØ|ç‰ôñLâË"s5ïö,Ýóx`„L=ÎåG_¨_{èQh\|Û·æ–®v…‹ZE¹ˆîªTß ™Ñ[çÊßJ x €›Z·+Л5¶.}¹_Mºã4Gþ-§íÝ m[ƒ¹Ä5lXü»¡^W)[Z�~þh¨ÅÎ ¬
êû•`sm2‰›t/W¹Lm¶�Qâì1j­BC�x"ÒÑg*Ü�I0Œ…öcìî�ÈîŽ_iµ³ÍÒÕ®§÷»Ø:Hu\²î]=M.YZCå^)©›¯‹vcŸßm YKSžš»C%¿E £<Å¥cð̯¥²+‹£äty[Fðé›È£·ÒÇÂ×wß©Šn$aW3j ëø?«ØŒþÃ9xy±þp“­~1(~{FÒ»¯þ‹ê–Ràzÿ.xO]qP™®äÕ<§^ƲOò º8†¼p±‹ºÅç‹Ã)sˆ‹xÿ!üŒmá¾t,î,”î VX¸`DЙºNHWý´b+3/tô
²,C¸Nb{Û”÷ÑI4ÿ_R³Vö»@ÔgBO38¬Kjø’hvè&«ºŒýhRŸØ•›xêwêÊ`Ïù’_Å$†5tRÁ…r‡P†Ò~®~›TíïH�䜳äž2”e¬␍Œ␍'@Mþ~2ù–1œ&oÿ'P¹÷²{-ÈSëw �~Öä)¦„þ2‹kã~2– N1ì-ûd+S=0bwâÔ =Ž\Ï�w§¨)/&Pa"6ë¦@õñCл3gÞVëŸ4Û§<IÇf^ÅÉáo0¤n×™»]r#€DâbÊá�PöSë³oôË'`Â&Ö=gDç¼oÂ&\è˜(4Èe“·Pü:ÿˆ_0��"3éæÝ˜Væ&´é�¯Ædµs¿6VãJ�ÊÔ£mëôÅäÓ¦»ÕQ°
Ó—èÆ‹ñ+¶È¡"p$Z(]±�ÿ‘]î6à ]%#ˆ?ÔQÊì¿N¸»ÆQ*˲eðã1R0&ÜÏz@¶²$ÿáÃRruš!Z½fµ-U¿Êë
ñ‹º•ǧóø‚Ê`¢ª¬ƒ“¹CŸEõ�p@¤³¶él88DÑ&½wª¤PžÜÛšb¬Éi¶?q?×QË+ÀÛË�Ã
endstream␍endobj␍10 0 obj␍<</BitsPerComponent 8/ColorSpace 11 0 R/Filter[/ASCII85Decode/FlateDecode]/Height 16/Length 177/Width 60>>stream
8;Yhn>7SFk#igu`GlP,B3^^n<o<FZ/q\VmL(59*qrsYlHT&A"mkB1=2FE#MTIRg'3
Vf$!H"nRVYl([l<m:MH1GH?;E)CM+IEnPB"/dI%">p[#um^tW3'&uU]94N0I_^lK[
7W/[/Vc>n8*U`,[/GHaY%Xt"!.EM4$3qGWW!s!Ibd)5~>
endstream␍endobj␍11 0 obj␍[/Indexed/DeviceRGB 255 12 0 R]␍endobj␍12 0 obj␍<</Filter[/ASCII85Decode/FlateDecode]/Length 428>>stream
8;X]O>EqN@%''O_@%e@?J;%+8(9e>X=MR6S?i^YgA3=].HDXF.R$lIL@"pJ+EP(%0
b]6ajmNZn*!='OQZeQ^Y*,=]?C.B+\Ulg9dhD*"iC[;*=3`oP1[!S^)?1)IZ4dup`
E1r!/,*0[*9.aFIR2&b-C#s<Xl5FH@[<=!#6V)uDBXnIr.F>oRZ7Dl%MLY\.?d>Mn
6%Q2oYfNRF$$+ON<+]RUJmC0I<jlL.oXisZ;SYU[/7#<&37rclQKqeJe#,UF7Rgb1
VNWFKf>nDZ4OTs0S!saG>GGKUlQ*Q?45:CI&4J'_2j<etJICj7e7nPMb=O6S7UOH<
PO7r\I.Hu&e0d&E<.')fERr/l+*W,)q^D*ai5<uuLX.7g/>$XKrcYp0n+Xl_nU*O(
l[$6Nn+Z_Nq0]s7hs]`XX1nZ8&94a\~>
endstream␍endobj␍5 0 obj␍<</Intent 13 0 R/Name(Layer 1)/Type/OCG/Usage 14 0 R>>␍endobj␍13 0 obj␍[/View/Design]␍endobj␍14 0 obj␍<</CreatorInfo<</Creator(Adobe Illustrator 23.0)/Subtype/Artwork>>>>␍endobj␍9 0 obj␍<</AIS false/BM/Normal/CA 1.0/OP false/OPM 1/SA true/SMask/None/Type/ExtGState/ca 1.0/op false>>␍endobj␍6 0 obj␍[5 0 R]␍endobj␍15 0 obj␍<</CreationDate(D:20191003083330-04'00')/Creator(Adobe Illustrator CC 23.0 \(Windows\))/ModDate(D:20191003083330-04'00')/Producer(Adobe PDF library 15.00)/Title(Civilytics Consulting Logo)>>␍endobj␍xref
0 16
0000000000 65535 f
0000000016 00000 n
0000000144 00000 n
0000046685 00000 n
0000000000 00000 f
0000065098 00000 n
0000065396 00000 n
0000046736 00000 n
0000047043 00000 n
0000065284 00000 n
0000064217 00000 n
0000064536 00000 n
0000064584 00000 n
0000065168 00000 n
0000065199 00000 n
0000065419 00000 n
trailer
<</Size 16/Root 1 0 R/Info 15 0 R/ID[<30007C6334CC694E837AAC27F3F1E545><D742BCF03DAF0A4C93758D41DDD7508B>]>>
startxref
65626
%%EOF
Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

+65
View File
@@ -0,0 +1,65 @@
# Quarto 1.5+ brand file
# Optional but recommended — Quarto auto-applies these to HTML, PDF, and Revealjs.
# https://quarto.org/docs/authoring/brand.html
meta:
name: Civilytics Consulting
description: Turning public data into clear, actionable analysis for public good.
logo:
small: assets/logo/civilytics-mark.svg
medium: assets/logo/civilytics-wordmark.svg
large: assets/logo/civilytics-wordmark.svg
color:
palette:
paper: "#FAF7F2"
paper-2: "#F2EDE4"
ink: "#0E1A2B"
ink-2: "#2B3A52"
ink-3: "#5A6A82"
navy: "#22406A"
ember: "#C25311"
ember-2: "#923D00"
teal: "#1F6F70"
plum: "#6B3A5E"
moss: "#4A6B2F"
brass: "#B8751C"
background: paper
foreground: ink
primary: navy
secondary: ember
success: moss
info: navy
warning: "#9A5F18"
danger: "#A6271D"
light: paper-2
dark: ink
link: navy
typography:
fonts:
- family: "Source Serif 4"
source: google
- family: "Inter"
source: google
- family: "JetBrains Mono"
source: google
- family: "Libre Franklin"
source: google
base:
family: Inter
size: 1rem
line-height: 1.65
headings:
family: "Libre Franklin"
weight: 800
style: normal
line-height: 1.08
color: ink
monospace:
family: "JetBrains Mono"
size: 0.92em
link:
color: navy
decoration: underline
+82
View File
@@ -0,0 +1,82 @@
---
title: "Who pays when rent outpaces wages?"
subtitle: "A 12-county analysis of cost-burdened renter households, 2019–2024."
author:
- name: "Jared Knowles"
affiliation: "Civilytics Consulting"
date: "2026-04-15"
abstract: |
We combine ACS 5-year microdata with HUD Fair Market Rent estimates
to track changes in rent burden across 12 metropolitan counties.
Between 2019 and 2024, the share of renter households spending more
than 30% of income on housing rose by 6.4 percentage points; the
increase was concentrated in counties where median wages stagnated.
categories: [Housing, Affordability, ACS]
format:
html:
theme: ../theme/civilytics.scss
css: ../theme/extras.css
toc: true
toc-location: right
typst:
template-partials:
- ../typst/typst-template.typ
- ../typst/typst-show.typ
pdf:
include-in-header: ../latex/civilytics.tex
include-before-body: ../latex/civilytics-title.tex
execute:
echo: false
warning: false
---
## Findings at a glance
::: {.stat-callout}
::: {}
[6.4 pp]{.stat-num}
[Increase in rent-burdened share, 2019→2024]{.stat-label .accent}
:::
::: {}
[1 in 2]{.stat-num}
[Renters in the studied counties now cost-burdened]{.stat-label}
:::
::: {}
[$412]{.stat-num}
[Median monthly rent gap, lowest-wage quintile]{.stat-label}
:::
:::
[Methodology note]{.eyebrow}
## Background
Rent has outpaced wages in every county we studied. In some, the gap is
modest and recent; in others, it has been widening for a decade. This
report disaggregates the trend along three lines: county, income
quintile, and household composition.
```{r}
#| label: fig-trend
#| fig-cap: "Cost-burdened renter share, 12 metro counties, 2019–2024."
#| fig-width: 7
#| fig-height: 4.2
library(ggplot2); library(civilytics)
ggplot(economics, aes(date, unemploy / pop)) +
geom_line(color = "#C25311", linewidth = 1) +
labs(title = "Cost-burdened renter share, 2019–2024",
subtitle = "Share spending more than 30% of household income on rent",
x = NULL, y = NULL,
caption = "Source: ACS 5-yr microdata; Civilytics analysis.") +
scale_y_continuous(labels = scales::percent_format()) +
theme_civilytics()
```
> Across all 12 counties, the steepest increases came in places where
> median wages were already in the bottom quartile of the metro region.
## Recommendations
1. Targeted rental assistance keyed to local wage trajectories.
2. Quarterly publication of rent-burden indicators by county.
3. Coordinated reporting between HUD and county human-services offices.
+65
View File
@@ -0,0 +1,65 @@
---
title: "Quarterly Analysis"
subtitle: "A brief look at the numbers."
author: "Civilytics Consulting"
date: today
format: civilytics-reveal-revealjs
---
## Findings at a glance
::: {.columns}
::: {.column width="50%"}
[Key metric]{.stat-number}
- Point one
- Point two
- Point three
:::
::: {.column width="50%"}
```{r}
#| fig-width: 6
#| fig-height: 4
library(ggplot2)
library(civilytics)
ggplot(mpg, aes(displ, hwy, colour = class)) +
geom_point(size = 2.5) +
scale_color_civilytics() +
theme_civilytics_slide() +
labs(title = "Engine Size vs Fuel Economy",
x = "Displacement (L)", y = "Highway MPG")
```
:::
:::
## Section divider {.section}
Big idea goes here.
## Data table
| County | Burden (%) | Change |
|:-------------|:----------:|-------:|
| Dane | 38.2 | +4.1 |
| Milwaukee | 52.7 | +7.3 |
| Hennepin | 41.5 | +3.9 |
: Cost-burdened renter share, selected counties.
## A blockquote slide {.pullquote}
> Rent has outpaced wages in every county we studied.
Civilytics Consulting, 2026
## Thank you {.thank-you}
Questions?
- jared@civilytics.com
- civilytics.com
@@ -0,0 +1,56 @@
title: Civilytics Reveal
author: Civilytics Consulting
version: 1.0.0
quarto-required: ">=1.4.0"
contributes:
formats:
revealjs:
# ---- Theme ----
theme: [default, civilytics.scss]
# ---- Slide geometry ----
width: 1280
height: 720
margin: 0
min-scale: 0.2
max-scale: 2.0
center: false
# ---- Navigation / chrome ----
controls: true
controls-layout: edges
progress: true
slide-number: "c/t"
hash-type: number
history: true
navigation-mode: linear
transition: fade
transition-speed: fast
background-transition: fade
# ---- Code ----
highlight-style: github
code-line-numbers: true
code-copy: true
code-overflow: wrap
# ---- Math ----
html-math-method: mathjax
# ---- Tables ----
tbl-cap-location: top
# ---- Links / fragments ----
link-external-newwindow: true
incremental: false
# ---- Brand chrome (injected by civilytics.js) ----
include-in-header:
- file: civilytics-head.html
include-after-body:
- file: civilytics-after.html
# ---- Footer / logo ----
# Override in the document front-matter if desired:
# footer: "Civilytics Consulting · 2026"
# logo: _extensions/civilytics-reveal/assets/civilytics-mark.svg
@@ -0,0 +1,80 @@
<!-- Civilytics Reveal — brand chrome injector -->
<script>
(function () {
// The Civilytics wordmark is the bold serif "Civilytics" lockup with the pulse
// waveform riding inline at the end. It ships as a baked SVG in two variants:
// ink-on-paper (default) and paper-on-ink (reverse) for dark backgrounds.
// We render it as an <img> so the official artwork is preserved exactly —
// the file picks up its color from the SVG itself, not from CSS currentColor.
var ASSET_BASE = (function () {
// Find the URL this script's <link rel="stylesheet" href="..civilytics.css..">
// was loaded from, so we can resolve sibling assets the same way.
var links = document.querySelectorAll('link[rel="stylesheet"]');
for (var i = 0; i < links.length; i++) {
var href = links[i].getAttribute('href') || '';
var m = href.match(/^(.*\/)civilytics\.css(\?|$)/);
if (m) return m[1] + 'assets/';
}
// Fallback: assume Quarto-style sibling layout
return '_extensions/civilytics-reveal/assets/';
})();
function makeWordmarkImg(reverse) {
var img = document.createElement('img');
img.className = 'civilytics-wordmark';
img.alt = 'Civilytics';
img.src = ASSET_BASE + (reverse ? 'civilytics-wordmark-reverse.svg' : 'civilytics-wordmark.svg');
return img;
}
function injectWordmark(slide, reverse) {
if (!slide) return;
if (slide.querySelector(':scope > .civilytics-wordmark')) return;
slide.insertBefore(makeWordmarkImg(reverse), slide.firstChild);
}
function init() {
if (!window.Reveal) { setTimeout(init, 50); return; }
var root = document.querySelector('.reveal');
if (!root) return;
// Title slide — paper background, ink wordmark
document.querySelectorAll(
'.slides #title-slide, .slides section.title-slide'
).forEach(function (s) { injectWordmark(s, false); });
// Thank-you slide — ink background, reversed wordmark
document.querySelectorAll('.slides section.thank-you').forEach(function (s) {
injectWordmark(s, true);
});
// Brand footer (pulse glyph + "Civilytics") bottom-left on body slides.
// Uses inline SVG so it inherits the slide's text color via currentColor.
if (!root.querySelector('.civilytics-footer')) {
var footer = document.createElement('div');
footer.className = 'civilytics-footer';
footer.setAttribute('aria-hidden', 'true');
footer.innerHTML =
'<svg viewBox="0 0 30 14" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="square" stroke-linejoin="miter">' +
'<path d="M0 8 L5 8 L8 3 L12 13 L16 1 L20 11 L23 8 L30 8"/>' +
'</svg>' +
'<span>Civilytics</span>';
root.appendChild(footer);
}
function updateChrome() {
var current = Reveal.getCurrentSlide();
if (!current) return;
var hide = current.matches('.title-slide, #title-slide, .section-divider, .section, .thank-you, .full-bleed, .no-chrome');
document.body.classList.toggle('civilytics-hide-chrome', !!hide);
}
Reveal.on('ready', updateChrome);
Reveal.on('slidechanged', updateChrome);
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();
</script>
@@ -0,0 +1,3 @@
<!-- Civilytics Reveal — fonts preconnect (theme CSS also @imports, this just warms the connection) -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+44
View File
@@ -0,0 +1,44 @@
% Civilytics — title-page partial.
% Replaces Quarto's default \maketitle. Uses values from YAML
% (\thetitle, \theauthor, \thedate) plus an \ifabstract block.
% Guard: \thesubtitle is normally defined by civilytics.tex's subtitle
% capture; provide a fallback so this partial degrades gracefully if used
% without that preamble. See civilyticsR issue #13.
\providecommand{\thesubtitle}{}
\begin{titlepage}
\pagecolor{paper}
\color{ink}
\vspace*{0.5in}
{\sffamily\bfseries\scriptsize\color{ember}\MakeUppercase{— Civilytics Consulting}\par}
\vspace{12pt}
{\displayfont\fontsize{32pt}{34pt}\selectfont\bfseries\color{ink}\thetitle\par}
\vspace{8pt}
\ifx\thesubtitle\@empty\else
{\rmfamily\itshape\fontsize{14pt}{18pt}\selectfont\color{ink2}\thesubtitle\par}
\fi
\vspace{18pt}
\noindent\rule{\linewidth}{2pt}\par
\vspace{1pt}
\noindent{\color{rule}\rule{\linewidth}{0.4pt}}\par
\vspace{8pt}
\noindent
\begin{minipage}[t]{0.5\linewidth}
{\sffamily\scriptsize\color{ink3}\MakeUppercase{Authors}\par}
\vspace{2pt}
{\sffamily\small\color{ink}\theauthor\par}
\end{minipage}\hfill
\begin{minipage}[t]{0.4\linewidth}\raggedleft
{\sffamily\scriptsize\color{ink3}\MakeUppercase{Published}\par}
\vspace{2pt}
{\sffamily\small\color{ink}\thedate\par}
\end{minipage}\par
\vspace{1.5cm}
% Pulse mark, in ember
\begin{center}
{\color{ember}\rule{40pt}{2pt}}
\end{center}
\end{titlepage}
\clearpage
+135
View File
@@ -0,0 +1,135 @@
% =============================================================
% Civilytics — LaTeX preamble for Quarto PDF
% Usage in YAML:
% format:
% pdf:
% include-in-header: quarto/latex/civilytics.tex
% include-before-body: quarto/latex/civilytics-title.tex
% Requires: xelatex or lualatex (for system fonts).
% =============================================================
\usepackage{xcolor}
\usepackage{fontspec}
\usepackage{titlesec}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage{caption}
\usepackage[hidelinks]{hyperref}
\usepackage{microtype}
\usepackage{tcolorbox}
\tcbuselibrary{skins,breakable}
% --- Civilytics palette ---
\definecolor{paper}{HTML}{FAF7F2}
\definecolor{paper2}{HTML}{F2EDE4}
\definecolor{ink}{HTML}{0E1A2B}
\definecolor{ink2}{HTML}{2B3A52}
\definecolor{ink3}{HTML}{5A6A82}
\definecolor{rule}{HTML}{D6CEBD}
\definecolor{ruleStrong}{HTML}{B8AE97}
\definecolor{navy}{HTML}{22406A}
\definecolor{ember}{HTML}{C25311}
\definecolor{emberDark}{HTML}{923D00}
\definecolor{teal}{HTML}{1F6F70}
\definecolor{plum}{HTML}{6B3A5E}
% --- Page color ---
\pagecolor{paper}
\color{ink}
% --- Fonts (require local install or fontspec lookup) ---
% Bold uses the family's native Bold weight (present in every Source Serif 4
% install). Do NOT hard-require a "SemiBold" face: the package installs no
% system fonts for the PDF path, and standard Source Serif 4 ships only
% Regular/Bold/Italic/BoldItalic. See civilyticsR issue #14.
\setmainfont{Source Serif 4}[
UprightFont = *,
ItalicFont = * Italic,
Ligatures = TeX,
]
\setsansfont{Inter}[Ligatures = TeX]
\setmonofont{JetBrains Mono}[Scale = 0.92]
\newfontfamily\displayfont{Libre Franklin}[Ligatures = TeX]
% --- Subtitle capture ---
% Quarto/pandoc defines \subtitle (which appends to \@title) but never
% \thesubtitle, which the title page uses. This preamble is emitted before
% pandoc's \providecommand{\subtitle}, so our definition wins: capture the
% subtitle into \thesubtitle instead. See civilyticsR issue #13.
\makeatletter
\providecommand{\thesubtitle}{}
\def\subtitle#1{\renewcommand{\thesubtitle}{#1}}
\makeatother
% --- Use the Civilytics title page, not pandoc's default ---
% civilytics-title.tex (include-before-body) IS the title page. Quarto emits
% its default \maketitle + abstract *before* include-before-body, which would
% print a second, unstyled title. Neutralise both here, in the preamble
% (runs at \begin{document}, before the default title). The branded title page
% does not display the abstract. See civilyticsR issue #13.
\AtBeginDocument{%
\renewcommand{\maketitle}{}%
\renewenvironment{abstract}{\setbox0=\vbox\bgroup}{\egroup}%
}
% --- Hyperlinks ---
\hypersetup{
colorlinks = true,
linkcolor = navy,
urlcolor = navy,
citecolor = navy,
filecolor = navy,
}
% --- Section headings ---
\titleformat{\section}[block]
{\bfseries\Large\displayfont\color{ink}}
{}{0pt}
{\titlerule[0.4pt]\vspace{4pt}}[\vspace{-6pt}]
\titleformat{\subsection}[block]
{\bfseries\large\displayfont\color{ink}}{}{0pt}{}
\titleformat{\subsubsection}[block]
{\bfseries\normalsize\displayfont\color{ink}}{}{0pt}{}
% --- Page header / footer ---
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[L]{\sffamily\scriptsize\color{ink3}\MakeUppercase{Civilytics Consulting}}
\fancyhead[R]{\sffamily\scriptsize\color{ink3}\thetitle}
\fancyfoot[L]{\sffamily\scriptsize\color{ink3}civilytics.com}
\fancyfoot[C]{\sffamily\scriptsize\color{ink3}\thepage}
\fancyfoot[R]{\sffamily\scriptsize\color{ink3}\textcopyright\ 2026}
% --- Captions ---
\captionsetup{
font={sf,small,color=ink3},
labelfont={sf,bf,color=ink3},
labelsep=period,
justification=raggedright,
singlelinecheck=false,
}
% --- Pullquote ---
\newtcolorbox{pullquote}{
enhanced, breakable, frame hidden, colback=paper,
borderline west = {2pt}{0pt}{ember},
left=14pt, right=4pt, top=4pt, bottom=4pt,
fontupper={\itshape\rmfamily\large\color{ink}},
}
% --- Code blocks (Pandoc + listings or minted both inherit colors below) ---
\definecolor{codebg}{HTML}{0E1A2B}
\definecolor{codefg}{HTML}{FAF7F2}
% --- Lists tighter ---
\setlist{itemsep=2pt, topsep=4pt}
% --- Tabular numerals ---
\newcommand{\tnum}[1]{{\addfontfeature{Numbers={Tabular,Lining}}#1}}
% --- Ember accent rule above section starts ---
\newcommand{\emberrule}{{\color{ember}\rule{60pt}{3pt}}\par\vspace{4pt}}
+73
View File
@@ -0,0 +1,73 @@
/*-- scss:defaults --*/
// =============================================================
// Civilytics tokens — single source of truth for colors + type.
// Mirrored from colors_and_type.css so figures, themes, and
// preview pages stay in sync.
// =============================================================
// Neutrals — warm paper → civic ink
$paper: #FAF7F2 !default;
$paper-2: #F2EDE4 !default;
$paper-3: #E6DFD1 !default;
$rule: #D6CEBD !default;
$rule-strong: #B8AE97 !default;
$ink: #0E1A2B !default;
$ink-2: #2B3A52 !default;
$ink-3: #5A6A82 !default;
$ink-4: #8C97AB !default;
// Brand — Civic Navy
$navy-900: #0E1A2B; $navy-800: #132339; $navy-700: #1A2E4A;
$navy-600: #22406A; $navy-500: #2E5590; $navy-400: #4A74B0;
$navy-300: #7A9BCA; $navy-200: #B3C6E0; $navy-100: #DDE6F2; $navy-50: #EEF3FA;
// Accent — Ember
$accent-900: #451A00; $accent-800: #6B2B00; $accent-700: #923D00;
$accent-600: #C25311; $accent-500: #DB6C25; $accent-400: #EA8A49;
$accent-300: #F2A976; $accent-200: #F8C8A3; $accent-100: #FBE0C6; $accent-50: #FDF1E4;
// Supporting (data-viz)
$teal-600: #1F6F70; $teal-300: #7CB3B3; $teal-100: #D3E6E6;
$plum-600: #6B3A5E; $plum-300: #B392A7; $plum-100: #E7DAE1;
$moss-600: #4A6B2F; $moss-300: #9CB47D; $moss-100: #DEE8CF;
$brass-600: #B8751C; $brass-100: #F9E6C8;
// Semantic
$success: $moss-600; $warning: #9A5F18; $danger: #A6271D; $info: $navy-500;
// Bootstrap-friendly aliases (used by Quarto's HTML theme)
$body-bg: $paper !default;
$body-color: $ink !default;
$primary: $navy-600 !default;
$secondary: $accent-600 !default;
$success-bs: $success !default;
$info-bs: $info !default;
$warning-bs: $warning !default;
$danger-bs: $danger !default;
$light: $paper-2 !default;
$dark: $ink !default;
$link-color: $navy-600 !default;
$link-hover-color: $navy-700 !default;
// Type stacks
$font-display: 'Libre Franklin', 'Franklin Gothic', 'Inter', system-ui, sans-serif !default;
$font-serif: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif !default;
$font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif !default;
$font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace !default;
$font-family-sans-serif: $font-sans !default;
$font-family-monospace: $font-mono !default;
$font-family-base: $font-sans !default;
// Sizing
$font-size-base: 1rem !default;
$line-height-base: 1.65 !default;
// Borders + radii
$border-color: $rule !default;
$border-radius: 4px !default;
$border-radius-sm: 2px !default;
$border-radius-lg: 8px !default;
$border-radius-xl: 14px !default;
+331
View File
@@ -0,0 +1,331 @@
/*-- scss:defaults --*/
// =============================================================
// Civilytics — Quarto HTML report + website theme
// Built on Bootstrap defaults via Quarto's SCSS pipeline.
// Inherits all tokens from _tokens.scss.
// =============================================================
@import "_tokens.scss";
// Quarto-specific defaults
$navbar-bg: $paper;
$navbar-fg: $ink;
$navbar-hl: $accent-600;
$footer-bg: $ink;
$footer-fg: $paper;
$code-bg: $paper-2;
$code-color: $accent-700;
$pre-bg: $ink;
$pre-color: $paper;
// Tighter table look
$table-border-color: $rule;
$table-color: $ink;
// Headings inherit display family + tight tracking
$h1-font-size: 2.875rem;
$h2-font-size: 2.125rem;
$h3-font-size: 1.625rem;
$h4-font-size: 1.25rem;
$headings-font-family: $font-display;
$headings-font-weight: 800;
$headings-line-height: 1.08;
$headings-color: $ink;
$callout-color-note: $navy-600;
$callout-color-tip: $teal-600;
$callout-color-caution: $accent-700;
$callout-color-warning: $warning;
$callout-color-important: $danger;
/*-- scss:rules --*/
// =============================================================
// Editorial layer — overrides Bootstrap + Quarto defaults so
// rendered .qmd files look like Civilytics publications, not
// generic blog posts.
// =============================================================
@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@500;600;700;800;900&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
body {
font-family: $font-sans;
font-size: 1rem;
line-height: 1.7;
color: $ink;
background: $paper;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
// Headings — display sans for headlines, tight tracking
h1, h2, h3, h4, h5, h6 {
font-family: $font-display;
letter-spacing: -0.025em;
text-wrap: balance;
color: $ink;
}
h1 { font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-weight: 800; letter-spacing: -0.03em; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid $rule; }
h3 { font-weight: 700; margin-top: 1.75rem; }
h4 { font-weight: 700; }
h5, h6 { font-family: $font-sans; font-weight: 600; text-transform: none; }
// Article-body prose — long-form reading uses Source Serif 4
.quarto-title-block { margin-bottom: 2.5rem; }
.quarto-title .title {
font-family: $font-display;
font-weight: 900;
font-size: 3.25rem;
line-height: 1.0;
letter-spacing: -0.04em;
margin-bottom: 0.75rem;
}
.quarto-title .subtitle {
font-family: $font-serif;
font-style: italic;
font-weight: 400;
font-size: 1.375rem;
color: $ink-2;
line-height: 1.4;
max-width: 60ch;
}
.quarto-title-meta {
font-family: $font-sans;
font-size: 0.8125rem;
color: $ink-3;
text-transform: uppercase;
letter-spacing: 0.08em;
border-top: 3px double $ink;
border-bottom: 1px solid $rule;
padding: 0.75rem 0;
margin-top: 1.5rem;
}
.quarto-title-meta .quarto-title-meta-heading { color: $ink-4; font-size: 0.6875rem; }
.quarto-title-meta .quarto-title-meta-contents { color: $ink; font-size: 0.875rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
// Lead / abstract — italic serif lockup
.abstract, p.abstract {
font-family: $font-serif;
font-style: italic;
font-size: 1.25rem;
line-height: 1.5;
color: $ink;
border-left: 2px solid $accent-600;
padding-left: 1.25rem;
margin: 2rem 0 2.5rem;
max-width: 62ch;
}
// Body paragraphs in article
main p, main li {
font-family: $font-serif;
font-size: 1.0625rem;
line-height: 1.65;
color: $ink;
text-wrap: pretty;
}
main ul, main ol { padding-left: 1.5em; }
main li { margin-bottom: 0.4em; }
// Links — civic navy, thickening underline
a { color: $navy-600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 120ms ease; }
a:hover { color: $navy-700; text-decoration-thickness: 2px; }
a:visited { color: $plum-600; }
// Pullquote / blockquote
blockquote {
font-family: $font-serif;
font-style: italic;
font-size: 1.625rem;
line-height: 1.4;
color: $ink;
border-left: 3px solid $accent-600;
padding: 0.5rem 0 0.5rem 1.5rem;
margin: 2rem 0;
}
blockquote p { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; }
// Code — light by default
code, kbd, samp {
font-family: $font-mono;
font-size: 0.92em;
font-feature-settings: "tnum" 1, "zero" 1;
}
code:not(pre code) {
background: $paper-2;
color: $accent-700;
padding: 0.1em 0.4em;
border-radius: 2px;
border: 1px solid $rule;
}
// Code blocks — light variant (default), with a dark-emphasis option below
div.sourceCode, pre.sourceCode {
background: $paper-2;
border: 1px solid $rule;
border-radius: 8px;
}
div.sourceCode pre {
background: transparent;
color: $ink;
padding: 1rem 1.25rem;
font-size: 0.875rem;
line-height: 1.55;
margin: 0;
}
// Highlight tokens (Quarto/Pandoc default classes)
pre.sourceCode {
.kw { color: $navy-700; font-weight: 600; } // keyword
.dt { color: $teal-600; } // data type
.st { color: $accent-700; } // string
.co { color: $ink-3; font-style: italic; } // comment
.fu { color: $navy-600; } // function
.op, .sc { color: $ink-2; } // operator
.dv, .fl { color: $plum-600; } // numbers
.va { color: $brass-600; } // variable
}
// Dark variant — opt in by adding {.dark} to the code chunk
.cell.dark div.sourceCode,
div.sourceCode.dark,
pre.dark {
background: $ink;
border-color: $navy-800;
pre, code { color: $paper; }
.kw { color: lighten($navy-300, 5%); }
.dt { color: $teal-300; }
.st { color: $accent-300; }
.co { color: $ink-4; }
.fu { color: $navy-200; }
.op, .sc { color: $paper-3; }
.dv, .fl { color: $plum-300; }
}
// Tables — editorial grid
.table, table {
font-family: $font-sans;
font-size: 0.9375rem;
border-collapse: collapse;
width: 100%;
font-variant-numeric: tabular-nums;
margin: 1.5rem 0;
}
.table thead th, table thead th {
font-family: $font-sans;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: $ink-3;
border-top: 2px solid $ink;
border-bottom: 1px solid $rule-strong;
padding: 0.6rem 0.75rem;
text-align: left;
}
.table tbody td, table tbody td {
border-bottom: 1px solid $rule;
padding: 0.55rem 0.75rem;
color: $ink;
}
.table tbody tr:last-child td, table tbody tr:last-child td { border-bottom: 2px solid $ink; }
.table.numeric td, table .numeric { font-family: $font-mono; }
// Figures + captions
figure, .quarto-figure { margin: 2rem 0; }
figcaption, .figure-caption, .quarto-figcaption {
font-family: $font-sans;
font-size: 0.8125rem;
color: $ink-3;
line-height: 1.45;
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 1px solid $rule;
text-align: left;
}
// Callouts — keep Quarto markup, restyle as editorial sidebars
.callout {
border-radius: 8px;
border: 1px solid $rule;
background: $paper-2;
margin: 1.5rem 0;
border-left: 3px solid $navy-600;
}
.callout-note { border-left-color: $navy-600; }
.callout-tip { border-left-color: $teal-600; }
.callout-caution { border-left-color: $accent-700; }
.callout-warning { border-left-color: $warning; }
.callout-important { border-left-color: $danger; }
.callout-title { font-family: $font-sans; font-weight: 600; font-size: 0.9375rem; color: $ink; text-transform: none; letter-spacing: 0; }
.callout-body p { font-family: $font-sans !important; font-size: 0.9375rem !important; line-height: 1.55 !important; }
// Eyebrow / kicker (Quarto category renders as `.quarto-categories`)
.quarto-categories {
display: inline-flex;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.quarto-categories .quarto-category {
font-family: $font-sans;
font-size: 0.6875rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
color: $accent-600;
background: transparent;
border: none;
padding: 0;
}
.quarto-categories .quarto-category::before { content: "— "; color: $accent-600; }
// Navbar (used by website projects)
.navbar {
background: rgba(250, 247, 242, 0.92) !important;
backdrop-filter: blur(12px);
border-bottom: 1px solid $rule;
padding: 0.875rem 0;
}
.navbar-brand { font-family: $font-display; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; color: $ink !important; }
.navbar-nav .nav-link { font-family: $font-sans; font-weight: 500; font-size: 0.9375rem; color: $ink-2 !important; padding: 0.4rem 0.85rem !important; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: $accent-600 !important; }
// Footer
.nav-footer, footer.footer {
background: $ink;
color: $paper;
font-family: $font-sans;
font-size: 0.875rem;
padding: 2rem 0;
border-top: 4px solid $accent-600;
}
.nav-footer a, footer.footer a { color: $paper; text-decoration: underline; text-decoration-thickness: 1px; }
// TOC — right-side sidebar
#TOC, .sidebar.toc-active, nav#TOC {
font-family: $font-sans;
font-size: 0.8125rem;
}
#TOC ul, nav#TOC ul { list-style: none; padding-left: 0.75rem; border-left: 1px solid $rule; }
#TOC li, nav#TOC li { margin: 0.25rem 0; }
#TOC a, nav#TOC a { color: $ink-3; text-decoration: none; }
#TOC a:hover, #TOC a.active, nav#TOC a:hover, nav#TOC a.active { color: $accent-600; border-left: 2px solid $accent-600; padding-left: 0.5rem; margin-left: -0.75rem; }
// HR — editorial divider
hr { border: none; border-top: 1px solid $rule; margin: 2.5rem 0; }
hr.section-break { border: none; height: 4px; background: linear-gradient(to right, $accent-600 60px, $rule 60px); margin: 3rem 0; }
// Listing pages (website blog/index)
.quarto-listing .listing-item {
background: white;
border: 1px solid $rule;
border-top: 3px solid $accent-600;
border-radius: 8px;
padding: 1.5rem;
transition: border-color 120ms ease;
}
.quarto-listing .listing-item:hover { border-color: $rule-strong; }
.quarto-listing .listing-title a { color: $ink; text-decoration: none; font-family: $font-display; font-weight: 800; }
.quarto-listing .listing-date { font-family: $font-sans; font-size: 0.75rem; color: $ink-3; text-transform: uppercase; letter-spacing: 0.08em; }
// Selection
::selection { background: $accent-200; color: $ink; }
+63
View File
@@ -0,0 +1,63 @@
/* Civilytics — extras layered on top of the SCSS theme.
Use for utilities that don't need to participate in the
Bootstrap variable cascade. */
/* Stat callout — drop into reports for hero numbers */
.stat-callout {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 2rem;
margin: 2rem 0 2.5rem;
padding: 1.5rem 0;
border-top: 3px double #0E1A2B;
border-bottom: 1px solid #D6CEBD;
}
.stat-callout .stat-num {
font-family: 'Source Serif 4', Georgia, serif;
font-weight: 700;
font-size: 3rem;
line-height: 1;
letter-spacing: -0.02em;
color: #0E1A2B;
font-variant-numeric: tabular-nums;
display: block;
}
.stat-callout .stat-label {
font-family: 'Inter', system-ui, sans-serif;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #5A6A82;
margin-top: 0.4rem;
}
.stat-callout .stat-label.accent { color: #C25311; }
/* Pulse glyph utility — matches design system */
.civilytics-pulse {
display: inline-block;
vertical-align: middle;
width: 30px;
height: 14px;
}
/* Section eyebrow — use above an h1/h2 */
.eyebrow {
font-family: 'Inter', system-ui, sans-serif;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
color: #C25311;
margin: 0 0 0.5rem;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.eyebrow::before {
content: "";
display: inline-block;
width: 24px;
height: 2px;
background: #C25311;
}
+17
View File
@@ -0,0 +1,17 @@
// Civilytics — Typst show/entry partial for Quarto (typst-show.typ).
// Pairs with typst-template.typ. Quarto appends the rendered document body
// after this partial, so this file intentionally ends with the show rule and
// no trailing body token. (Do not write that token in a comment here: Quarto
// interpolates its template variables even inside comments.)
// Title/subtitle/date are wrapped in [ ] so arbitrary text (including words
// that are Typst keywords like "for"/"in") is treated as content, not code.
// See civilyticsR issue #12.
#show: doc => civilytics(
title: [$title$],
$if(subtitle)$subtitle: [$subtitle$],$endif$
$if(by-author)$authors: ($for(by-author)$"$it.name.literal$",$endfor$),$endif$
$if(date)$date: [$date$],$endif$
$if(abstract)$abstract: [$abstract$],$endif$
toc: $if(toc)$true$else$false$endif$,
doc
)
+237
View File
@@ -0,0 +1,237 @@
// =============================================================
// Civilytics — Typst template partial for Quarto PDF (typst-template.typ).
// Shipped as a Quarto template-partial (paired with typst-show.typ) rather
// than a full `template:` so Quarto keeps its own `definitions` partial —
// which defines Skylighting/token functions needed for syntax-highlighted
// code blocks. See civilyticsR issue #12.
// Usage in YAML:
// format:
// typst:
// template-partials:
// - quarto/typst/typst-template.typ
// - quarto/typst/typst-show.typ
// =============================================================
#let paper-bg = rgb("#FAF7F2")
#let ink = rgb("#0E1A2B")
#let ink-2 = rgb("#2B3A52")
#let ink-3 = rgb("#5A6A82")
#let rule = rgb("#D6CEBD")
#let rule-strong = rgb("#B8AE97")
#let navy = rgb("#22406A")
#let ember = rgb("#C25311")
#let ember-dark = rgb("#923D00")
#let plum = rgb("#6B3A5E")
#let teal = rgb("#1F6F70")
#let serif-stack = ("Source Serif 4", "Source Serif Pro", "Georgia", "Times New Roman")
#let sans-stack = ("Inter", "Helvetica Neue", "Arial")
#let display-stack = ("Libre Franklin", "Inter", "Helvetica Neue")
#let mono-stack = ("JetBrains Mono", "Menlo", "Consolas")
#let civilytics(
title: none,
subtitle: none,
authors: (),
date: none,
abstract: none,
toc: true,
doc,
) = {
// Page setup
set page(
paper: "us-letter",
margin: (top: 1in, bottom: 1in, left: 1.1in, right: 1.1in),
fill: paper-bg,
header: context {
if counter(page).get().first() > 1 {
set text(font: sans-stack, size: 8pt, fill: ink-3, tracking: 0.06em)
upper[Civilytics Consulting]
h(1fr)
upper(if title != none { title } else { "" })
v(2pt)
line(length: 100%, stroke: 0.4pt + rule)
}
},
footer: context {
set text(font: sans-stack, size: 8pt, fill: ink-3)
line(length: 100%, stroke: 0.4pt + rule)
v(4pt)
grid(
columns: (1fr, auto, 1fr),
align: (left, center, right),
[civilytics.com],
counter(page).display("1 / 1", both: true),
[© 2026]
)
},
)
// Body text
set text(font: serif-stack, size: 10.5pt, fill: ink, lang: "en")
set par(justify: false, leading: 0.6em, first-line-indent: 0pt)
// Headings
show heading.where(level: 1): it => {
v(1.4em)
block[
#set text(font: display-stack, weight: 900, size: 22pt, fill: ink, tracking: -0.025em)
#it.body
]
v(0.2em)
line(length: 60pt, stroke: 3pt + ember)
v(0.6em)
}
show heading.where(level: 2): it => {
v(1.1em)
line(length: 100%, stroke: 0.5pt + rule)
v(0.5em)
block[
#set text(font: display-stack, weight: 800, size: 16pt, fill: ink, tracking: -0.02em)
#it.body
]
v(0.3em)
}
show heading.where(level: 3): it => {
v(0.8em)
block[
#set text(font: display-stack, weight: 700, size: 13pt, fill: ink, tracking: -0.015em)
#it.body
]
v(0.2em)
}
show heading.where(level: 4): it => block[
#set text(font: sans-stack, weight: 600, size: 11pt, fill: ink-2)
#it.body
]
// Links
show link: it => text(fill: navy, underline(it))
// Inline code
show raw.where(block: false): it => box(
fill: rgb("#F2EDE4"),
inset: (x: 3pt, y: 1pt),
outset: (y: 2pt),
radius: 1pt,
text(font: mono-stack, size: 0.92em, fill: ember-dark)[#it]
)
// Code blocks
show raw.where(block: true): it => block(
fill: ink,
width: 100%,
inset: 12pt,
radius: 4pt,
)[
#set text(font: mono-stack, size: 8.5pt, fill: paper-bg)
#it
]
// Block quote
show quote.where(block: true): it => block(
stroke: (left: 2pt + ember),
inset: (left: 14pt, top: 4pt, bottom: 4pt),
spacing: 1.2em,
)[
#set text(font: serif-stack, size: 13pt, style: "italic", fill: ink)
#it.body
]
// Figures
show figure: it => block(spacing: 1.4em)[
#it.body
#v(4pt)
#line(length: 100%, stroke: 0.4pt + rule)
#v(2pt)
#set text(font: sans-stack, size: 8.5pt, fill: ink-3)
#it.caption
]
// Tables
set table(
stroke: (x, y) => (
top: if y == 0 { 1.5pt + ink } else if y == 1 { 0.6pt + rule-strong } else { 0pt },
bottom: if y == 0 { 0pt } else { 0.4pt + rule },
),
inset: (x: 8pt, y: 6pt),
)
show table.cell.where(y: 0): set text(
font: sans-stack, size: 8pt, weight: 600, fill: ink-3, tracking: 0.06em
)
// ----- Title block -----
if title != none {
block[
#set text(font: sans-stack, size: 8pt, weight: 600, fill: ember, tracking: 0.1em)
#upper[— Civilytics Consulting]
]
v(8pt)
block[
#set text(font: display-stack, weight: 900, size: 32pt, fill: ink, tracking: -0.035em)
#set par(leading: 0.4em)
#title
]
if subtitle != none {
v(8pt)
block[
#set text(font: serif-stack, style: "italic", size: 14pt, fill: ink-2)
#set par(leading: 0.55em)
#subtitle
]
}
v(18pt)
line(length: 100%, stroke: 3pt + ink)
v(2pt)
line(length: 100%, stroke: 0.4pt + rule)
v(8pt)
// Authors + date row
grid(
columns: (1fr, 1fr),
align: (left, right),
[
#set text(font: sans-stack, size: 7.5pt, fill: ink-3, tracking: 0.08em)
#upper[Authors] \
#set text(font: sans-stack, size: 10pt, fill: ink, weight: 500, tracking: 0em)
#if authors.len() > 0 {
authors.map(a => if type(a) == str { a } else { a.name }).join(", ")
}
],
[
#set text(font: sans-stack, size: 7.5pt, fill: ink-3, tracking: 0.08em)
#upper[Published] \
#set text(font: sans-stack, size: 10pt, fill: ink, weight: 500, tracking: 0em)
#if date != none { date }
]
)
v(24pt)
if abstract != none {
block(
stroke: (left: 2pt + ember),
inset: (left: 14pt),
)[
#set text(font: serif-stack, style: "italic", size: 12pt, fill: ink)
#set par(leading: 0.55em)
#abstract
]
v(20pt)
}
if toc {
block[
#set text(font: sans-stack, size: 7.5pt, fill: ink-3, tracking: 0.08em)
#upper[Contents]
]
v(4pt)
line(length: 100%, stroke: 0.4pt + rule)
v(8pt)
outline(title: none, indent: auto, depth: 3)
v(20pt)
pagebreak()
}
}
doc
}
+28 -5
View File
@@ -4,18 +4,41 @@
\alias{add_logo} \alias{add_logo}
\title{Add a logo to a ggplot2 object} \title{Add a logo to a ggplot2 object}
\usage{ \usage{
add_logo(plot, logo, margin_param = NULL) add_logo(
plot,
logo,
margin_param = NULL,
font_scale = 1,
position = c("bottom-right", "bottom-left", "top-right", "top-left"),
logo_height = 0.5
)
} }
\arguments{ \arguments{
\item{plot}{a ggplot2 grob} \item{plot}{a ggplot2 object, or a patchwork composition}
\item{logo}{a logo grob created by make_logo_grob()} \item{logo}{a logo grob created by make_logo_grob()}
\item{margin_param}{a numeric specifying what margin to add or subtract to align the logo} \item{margin_param}{Optional numeric. Replaces the plot margin (in points)
on the side next to the logo. `NULL` (default) leaves the plot's margins
alone.}
\item{font_scale}{Numeric. Multiplicative scaling factor applied to the
base text size before composing. Default `1` leaves typography unchanged.}
\item{position}{Character. Corner placement for the logo: `"bottom-right"`
(default), `"bottom-left"`, `"top-right"`, or `"top-left"`. Controls
whether the logo is placed above or below the plot.}
\item{logo_height}{Numeric. Height in inches of the band reserved for the
logo. Default `0.5`.}
} }
\value{ \value{
a grob with a logo attached to it ready to plot
} }
\description{ \description{
Add a logo to a ggplot2 object The logo gets its own band of reserved height (`logo_height`, in inches)
below or above the plot, so it cannot overlap the plot's caption or push
anything off the canvas. Patchwork compositions are converted with
[patchwork::patchworkGrob()] so every panel and the
[patchwork::plot_annotation()] survive.
} }
+22 -5
View File
@@ -2,9 +2,17 @@
% Please edit documentation in R/logo.R % Please edit documentation in R/logo.R
\name{add_logo_ga} \name{add_logo_ga}
\alias{add_logo_ga} \alias{add_logo_ga}
\title{Add a logo to a ggplot2 object} \title{Add a logo to multiple ggplot2 objects}
\usage{ \usage{
add_logo_ga(plot_list, logo, nrow = 1, widths = NULL, margin_param = NULL) add_logo_ga(
plot_list,
logo,
nrow = 1,
widths = NULL,
margin_param = NULL,
font_scale = 1,
logo_height = 0.5
)
} }
\arguments{ \arguments{
\item{plot_list}{a list containing ggplot2 objects} \item{plot_list}{a list containing ggplot2 objects}
@@ -15,18 +23,26 @@ add_logo_ga(plot_list, logo, nrow = 1, widths = NULL, margin_param = NULL)
\item{widths}{an optional vector the same length as plot_list with the widths for each plot} \item{widths}{an optional vector the same length as plot_list with the widths for each plot}
\item{margin_param}{a number giving the adjustment up or down to help manually align logo and captions} \item{margin_param}{Optional number. Replaces the bottom plot margin (in points).
`NULL` (default) leaves plot margins alone.}
\item{font_scale}{Numeric. Multiplicative scaling factor applied to text
sizes before composing. Default `1`. See [add_logo()] for details.}
\item{logo_height}{Numeric. Height in inches of the band reserved for the
logo below the plots. Default `0.5`.}
} }
\value{ \value{
a grid object
} }
\description{ \description{
Add a logo to a ggplot2 object Add a logo to multiple ggplot2 objects
} }
\note{ \note{
The resulting object needs to be drawn to the screen using grid.draw() The resulting object needs to be drawn to the screen using grid.draw()
} }
\examples{ \examples{
\dontrun{
library(ggplot2); library(grid) library(ggplot2); library(grid)
tmp_plot <- ggplot(mtcars) + aes(x = hp, y = disp) + geom_point() + theme_civilytics() tmp_plot <- ggplot(mtcars) + aes(x = hp, y = disp) + geom_point() + theme_civilytics()
tmp_logo <- make_logo_grob() tmp_logo <- make_logo_grob()
@@ -34,3 +50,4 @@ plot_and_logo <- add_logo(tmp_plot, tmp_logo)
grid.draw(plot_and_logo) grid.draw(plot_and_logo)
dev.off() dev.off()
} }
}
+25
View File
@@ -0,0 +1,25 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prop_conf.R
\name{agresti_coull_interval}
\alias{agresti_coull_interval}
\title{Calculate the Agresti-Coull interval}
\usage{
agresti_coull_interval(num, den, conf.level = 0.95)
}
\arguments{
\item{num}{number of successes}
\item{den}{number of trials}
\item{conf.level}{default 0.95, confidence level for the interval}
}
\value{
three values forming the lower bound, observed proportion, and upper bound
}
\description{
Calculate the Agresti-Coull interval
}
\examples{
agresti_coull_interval(20, 40)
agresti_coull_interval(2, 100, conf.level = 0.99)
}
+71
View File
@@ -0,0 +1,71 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/notifications.R
\name{beep}
\alias{beep}
\title{Send a CLI beep / desktop notification}
\usage{
beep(
msg = "done",
type = c("beep", "notify", "webhook", "all"),
url = NULL,
status = "done",
timeout = 5,
quiet = FALSE
)
}
\arguments{
\item{msg}{Character. Optional message to include in the notification.
When \code{type = "notify"}, this becomes the notification body.}
\item{type}{Character. Notification method:
\itemize{
\item \code{"beep"} (default): emit a terminal bell character.
Works in any terminal that supports the bell.
\item \code{"notify"}: send a desktop notification via \code{notify-send} (Linux) or
\code{osascript} (macOS). Falls back to \code{"beep"} if neither tool is found.
\item \code{"webhook"}: POST a JSON payload to a URL. Requires \code{url} argument.
\item \code{"all"}: play beep + send desktop notification (webhook only if \code{url}
is provided).
}}
\item{url}{Character. Webhook URL for \code{type = "webhook"} or \code{"all"}.
A JSON payload is POSTed with keys \code{message}, \code{status}, and \code{timestamp}.}
\item{status}{Character. Status label for the notification (default \code{"done"}).
Used in the notification title and webhook payload.}
\item{timeout}{Numeric. Seconds to wait for the webhook POST to complete
(default \code{5}). Ignored for non-webhook types.}
\item{quiet}{Logical. If \code{TRUE}, suppress the terminal beep even when
\code{type} includes \code{"beep"}. Useful for silent background runs.}
}
\value{
Invisible \code{NULL}.
}
\description{
Plays an audible beep in the terminal and/or sends a desktop notification
when a long-running R script completes or reaches a milestone.
}
\section{Requirements}{
\itemize{
\item \code{type = "notify"} requires \code{notify-send} (Linux) or \code{osascript} (macOS).
\item \code{type = "webhook"} requires network access to the provided URL.
}
}
\section{Examples}{
\preformatted{
# Simple terminal beep
beep()
# Desktop notification with message
beep("Analysis complete!", type = "notify")
# Send to a webhook (e.g., Slack, Discord, custom endpoint)
beep("Job finished", type = "webhook",
url = "https://hooks.slack.com/services/...")
# Beep + desktop notification
beep("Processing done", type = "all")
}
}
+54
View File
@@ -0,0 +1,54 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/civilytics-package.R
\docType{package}
\name{civilytics-package}
\alias{civilytics}
\alias{civilytics-package}
\title{civilytics: Brand Themes, Color Palettes, and Utility Functions for Civilytics}
\description{
Provides a complete ggplot2 brand theme system for Civilytics Consulting,
including editorial light, dark, and slide-optimized themes; 10 curated
color palettes; logo composition; and data-wrangling helpers for
public-sector analysis.
}
\section{Themes}{
\itemize{
\item [theme_civilytics()] -- editorial theme with warm paper background
\item [theme_civilytics_dark()] -- navy background variant
\item [theme_civilytics_slide()] -- transparent background, larger text
}
}
\section{Color palettes}{
\itemize{
\item [civilytics_colors] -- 53 named brand colors
\item [civilytics_palettes] -- 10 visualization palettes
\item [civilytics_palette()] -- extract colors by palette name
\item [scale_color_civilytics()] / [scale_fill_civilytics()] -- ggplot2 scales
}
}
\section{Quarto templates}{
\itemize{
\item [use_civilytics_revealjs()] -- install Reveal.js slide extension
\item [use_civilytics_theme()] -- install HTML/PDF/Typst document theme
\item [use_civilytics_brand()] -- install brand.yml only (Quarto 1.5+)
}
}
\seealso{
Useful links:
\itemize{
\item \url{https://gitea.civilytics.org/Civilytics/civilyticsR}
\item Report bugs at \url{https://gitea.civilytics.org/Civilytics/civilyticsR/issues}
}
}
\author{
\strong{Maintainer}: Jared E. Knowles \email{jared@civilytics.com}
}
\keyword{internal}
+23
View File
@@ -0,0 +1,23 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/colors.R
\docType{data}
\name{civilytics_colors}
\alias{civilytics_colors}
\title{Civilytics brand colors}
\format{
A named character vector of hex color codes.
}
\usage{
civilytics_colors
}
\description{
A named character vector of all Civilytics brand colors, matching the CSS
custom properties in the Civilytics design system (`--cv-*` variables).
Includes full ramps for navy, ember, and violet, plus supporting hues
(teal, plum, moss, brass) and semantic status colors.
}
\examples{
civilytics_colors["ink"]
civilytics_colors[c("navy_600", "ember_600", "teal_600")]
}
\keyword{datasets}
+49
View File
@@ -0,0 +1,49 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fonts.R
\name{civilytics_load_fonts}
\alias{civilytics_load_fonts}
\title{Load Civilytics brand fonts}
\usage{
civilytics_load_fonts(
force = FALSE,
showtext = getOption("civilytics.showtext", TRUE)
)
}
\arguments{
\item{force}{Logical. If \code{TRUE}, reload fonts even if they were already
loaded in this session. Default \code{FALSE}.}
\item{showtext}{Logical. Turn on \code{showtext::showtext_auto()} after
registering the fonts. Default is \code{getOption("civilytics.showtext", TRUE)}.}
}
\value{
Invisibly returns \code{TRUE} if fonts were loaded, \code{FALSE} if skipped
(already loaded and \code{force = FALSE}).
}
\description{
Downloads Inter, Libre Franklin, Source Serif 4 and JetBrains Mono from
Google Fonts via \code{sysfonts::font_add_google()}, then, unless
\code{showtext = FALSE}, calls \code{showtext::showtext_auto()} so that all graphics
devices render text with those fonts. This is called automatically when the
package loads; use this function to retry if the initial load failed (e.g.,
the machine was offline at load time).
}
\details{
Subsequent calls within the same session are no-ops unless \code{force = TRUE}.
\strong{Using ragg.} \code{showtext::showtext_auto()} draws text at 96 dpi whatever the
device resolution, so on a \code{ragg::agg_png(res = 300)} device text comes out
at about a third of its requested size. For ragg, set
\code{options(civilytics.showtext = FALSE)} before loading the package, or call
\code{showtext::showtext_auto(FALSE)} afterwards. The brand fonts must then be
installed on the system, because ragg reads system fonts rather than the
ones registered through sysfonts.
}
\examples{
\dontrun{
civilytics_load_fonts()
# For ragg devices: register the fonts but leave showtext off
civilytics_load_fonts(force = TRUE, showtext = FALSE)
}
}
+90
View File
@@ -0,0 +1,90 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logo.R
\name{civilytics_logo}
\alias{civilytics_logo}
\title{Add a Civilytics logo to a ggplot (pipe-friendly)}
\usage{
civilytics_logo(
plot,
type = c("wordmark", "mark"),
variant = c("light", "dark"),
position = c("bottom-right", "bottom-left", "top-right", "top-left"),
margin_param = NULL,
font_scale = 1,
logo_height = 0.5
)
}
\arguments{
\item{plot}{A ggplot object.}
\item{type}{Character. `"wordmark"` (default) or `"mark"`. Passed to
[make_logo_grob()].}
\item{variant}{Character. `"light"` (default) or `"dark"`. Passed to
[make_logo_grob()].}
\item{position}{Character. Corner placement for the logo: `"bottom-right"`
(default), `"bottom-left"`, `"top-right"`, or `"top-left"`.}
\item{margin_param}{Numeric or `NULL`. Manual margin adjustment passed to
[add_logo()].}
\item{font_scale}{Numeric. Multiplies the plot's base text size before
composing. Default `1` leaves typography unchanged.}
\item{logo_height}{Numeric. Height in inches of the band reserved for the
logo. Default `0.5`.}
}
\value{
A grob (from [gridExtra::arrangeGrob()]) ready to draw with
[grid::grid.draw()].
}
\description{
A convenience wrapper that creates the logo grob and attaches it to a
corner of the plot in one call. Designed for use with the base pipe `|>`.
}
\details{
**Important:** R's `|>` has *higher* precedence than `+`, so you must
wrap the ggplot chain in parentheses before piping:
```
(ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme_civilytics()) |>
civilytics_logo()
```
}
\examples{
\dontrun{
library(ggplot2); library(grid)
# Pipe usage — parentheses required around the ggplot chain
(ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme_civilytics()) |>
civilytics_logo() |>
grid.draw()
# Top-right placement
(ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme_civilytics()) |>
civilytics_logo(position = "top-right") |>
grid.draw()
# Bottom-left with mark
(ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme_civilytics()) |>
civilytics_logo(type = "mark", position = "bottom-left") |>
grid.draw()
# Dark theme with mark in top-left
(ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme_civilytics_dark()) |>
civilytics_logo(variant = "dark", type = "mark",
position = "top-left") |>
grid.draw()
}
}
+24
View File
@@ -0,0 +1,24 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/colors.R
\name{civilytics_pal}
\alias{civilytics_pal}
\title{Civilytics palette function (closure)}
\usage{
civilytics_pal(name = "qual", reverse = FALSE)
}
\arguments{
\item{name}{Character. Palette name. See `names(civilytics_palettes)`.}
\item{reverse}{Logical. Reverse the palette order. Default `FALSE`.}
}
\value{
A function that takes integer `n` and returns `n` hex color codes.
}
\description{
Returns a closure `function(n)` suitable for passing to
[ggplot2::discrete_scale()] or similar scale constructors.
}
\examples{
pal_fn <- civilytics_pal("qual")
pal_fn(4)
}
+30
View File
@@ -0,0 +1,30 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/colors.R
\name{civilytics_palette}
\alias{civilytics_palette}
\title{Get colors from a Civilytics palette}
\usage{
civilytics_palette(name = "qual", n = NULL, reverse = FALSE)
}
\arguments{
\item{name}{Character. Palette name. See `names(civilytics_palettes)`.}
\item{n}{Integer or `NULL`. Number of colors to return. If `NULL`, returns
all defined stops.}
\item{reverse}{Logical. Reverse the palette order. Default `FALSE`.}
}
\value{
A character vector of hex color codes.
}
\description{
Returns a character vector of hex codes from a named Civilytics palette.
For qualitative palettes, colors beyond the palette length recycle with a
warning. For sequential and diverging palettes, colors are interpolated
via [grDevices::colorRampPalette()].
}
\examples{
civilytics_palette() # all 7 qualitative colors
civilytics_palette("seq_navy", n = 5) # 5-stop navy ramp
civilytics_palette("div_navy_ember", n = 11, reverse = TRUE)
}
+50
View File
@@ -0,0 +1,50 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/colors.R
\docType{data}
\name{civilytics_palettes}
\alias{civilytics_palettes}
\title{Civilytics visualization palettes}
\format{
A named list of character vectors of hex color codes.
}
\usage{
civilytics_palettes
}
\description{
Named list of curated color palettes for data visualization. Qualitative
palettes use distinct hues for categorical data; sequential palettes ramp
through a single hue for ordered data; diverging palettes fan out from a
neutral midpoint.
}
\section{Qualitative (categorical data)}{
\describe{
\item{`qual`}{7 distinct hues: navy, ember, plum, violet, red, teal, ink-3}
\item{`qual_warm`}{Warm-leaning: ember, red, magenta, plum, violet}
\item{`qual_cool`}{Cool-leaning: navy, violet, plum, teal}
}
}
\section{Sequential (ordered/continuous data)}{
\describe{
\item{`seq_ember`}{Light to dark ember (9 stops)}
\item{`seq_navy`}{Light to dark navy (9 stops)}
\item{`seq_violet`}{Light to dark violet (9 stops)}
\item{`seq_paper_ink`}{Paper through ember/plum to ink (8 stops, good for heatmaps)}
}
}
\section{Diverging (data with a meaningful midpoint)}{
\describe{
\item{`div_navy_ember`}{Navy <-> paper <-> ember (9 stops)}
\item{`div_violet_ember`}{Violet <-> paper <-> ember (9 stops)}
}
}
\examples{
names(civilytics_palettes)
civilytics_palettes[["qual"]]
}
\keyword{datasets}
+21
View File
@@ -0,0 +1,21 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prop_conf.R
\name{clopper_pearson}
\alias{clopper_pearson}
\title{Get a simple Clopper Pearson interval}
\usage{
clopper_pearson(num, den, conf.level = 0.95)
}
\arguments{
\item{num}{number of successes}
\item{den}{number of trials}
\item{conf.level}{default 0.95, set the confidence interval to return}
}
\value{
three values forming the upper and lower bounds of the confidence region and the true value
}
\description{
Get a simple Clopper Pearson interval
}
+1 -1
View File
@@ -10,7 +10,7 @@ countDots(x)
\item{x}{a character vector} \item{x}{a character vector}
} }
\value{ \value{
An integer counting the number of "." occurences in a vector
} }
\description{ \description{
Count the number of single period entries in a vector Count the number of single period entries in a vector
+27
View File
@@ -0,0 +1,27 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quarto.R
\name{.copy_logos}
\alias{.copy_logos}
\title{Copy logo SVGs from inst/img/ to a target directory}
\usage{
.copy_logos(
dest_dir,
path,
force,
files = c("civilytics-mark.svg", "civilytics-mark-reverse.svg",
"civilytics-wordmark.svg", "civilytics-wordmark-reverse.svg", "civilytics-pulse.svg")
)
}
\arguments{
\item{dest_dir}{Destination directory relative to `path`.}
\item{path}{Project root.}
\item{force}{Overwrite existing files?}
\item{files}{Character vector of logo filenames to copy.}
}
\description{
Copy logo SVGs from inst/img/ to a target directory
}
\keyword{internal}
+24
View File
@@ -0,0 +1,24 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quarto.R
\name{.copy_pkg_file}
\alias{.copy_pkg_file}
\title{Copy a package file to a project directory}
\usage{
.copy_pkg_file(src, dst, path, force)
}
\arguments{
\item{src}{Relative path within the installed package (under `inst/`).}
\item{dst}{Destination path relative to `path`.}
\item{path}{Project root.}
\item{force}{Overwrite existing files?}
}
\value{
Invisible logical indicating success.
}
\description{
Copy a package file to a project directory
}
\keyword{internal}
+16
View File
@@ -0,0 +1,16 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme.R
\name{.map_theme_extras}
\alias{.map_theme_extras}
\title{Shared map-theme overrides}
\usage{
.map_theme_extras()
}
\value{
A partial ggplot2 [ggplot2::theme()] object.
}
\description{
Strips away axes, ticks, gridlines, and axis titles/labels — the elements
that are meaningless on a choropleth or spatial plot.
}
\keyword{internal}
Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

+23
View File
@@ -0,0 +1,23 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_fips}
\alias{get_fips}
\title{Get the FIPS code for a given state abbreviation}
\usage{
get_fips(stabbr)
}
\arguments{
\item{stabbr}{a two letter abbreviation for a US state}
}
\value{
FIPS codes that match the abbreviation
}
\description{
Get the FIPS code for a given state abbreviation
}
\examples{
\dontrun{
get_fips("MT")
get_fips("PR")
}
}
+1 -4
View File
@@ -10,11 +10,8 @@ get_png(filename)
\item{filename}{a character with file path to a png file} \item{filename}{a character with file path to a png file}
} }
\value{ \value{
a plotted rasteGrob of a png image
} }
\description{ \description{
Plot a PNG file as a rasterGrob for inclusion in ggplot2 Plot a PNG file as a rasterGrob for inclusion in ggplot2
} }
\examples{
}
+22
View File
@@ -0,0 +1,22 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_stabbr}
\alias{get_stabbr}
\title{Get the state abbreviation from a given FIPS Code}
\usage{
get_stabbr(fips)
}
\arguments{
\item{fips}{a character value that captures the FIPS code with leading 0}
}
\value{
a character value, length 2, with the state abbreviation
}
\description{
Get the state abbreviation from a given FIPS Code
}
\examples{
\dontrun{
get_stabbr("06")
}
}
+4 -1
View File
@@ -10,8 +10,11 @@ grade_level_to_num(x)
\item{x}{character description of grade levels from NCES style data} \item{x}{character description of grade levels from NCES style data}
} }
\value{ \value{
a numeric vector
} }
\description{ \description{
Recode grade level from character to numeric Recode grade level from character to numeric
} }
\examples{
grade_level_to_num(c("KG", "Pre-K", "12", "10", "09"))
}
+1 -1
View File
@@ -16,6 +16,6 @@ a logical, TRUE if a caption exists and FALSE if it does not
Test whether a ggplot2 object has a caption Test whether a ggplot2 object has a caption
} }
\examples{ \examples{
p1 <- ggplot2::qplot(mpg, wt, data = mtcars) p1 <- ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) + ggplot2::geom_point()
has_caption(p1) # FALSE has_caption(p1) # FALSE
} }
+25 -6
View File
@@ -4,16 +4,35 @@
\alias{make_logo_grob} \alias{make_logo_grob}
\title{Get a Civilytics Logo grob} \title{Get a Civilytics Logo grob}
\usage{ \usage{
make_logo_grob() make_logo_grob(
type = c("wordmark", "mark"),
variant = c("light", "dark"),
position = c("bottom-right", "bottom-left", "top-right", "top-left")
)
}
\arguments{
\item{type}{Character. `"wordmark"` (default) uses the full wordmark.
`"mark"` uses the compact C-pulse icon only.}
\item{variant}{Character. `"light"` (default) uses the dark logo for light
backgrounds. `"dark"` uses the reverse (light) logo for dark backgrounds
(pairs with [theme_civilytics_dark()]).}
\item{position}{Character. Corner placement for the logo: `"bottom-right"`
(default), `"bottom-left"`, `"top-right"`, or `"top-left"`. Controls
horizontal alignment of the logo grob.}
} }
\value{ \value{
a gg object which contains the logo file stored as a Grob suitable for manipulating in A ggplot object (class `"gg"`) containing the logo grob.
grid
} }
\description{ \description{
Get a Civilytics Logo grob Returns a ggplot object containing the Civilytics logo as a rasterGrob,
ready to compose with plots via [add_logo()], [add_logo_ga()], or the
pipe-friendly [civilytics_logo()].
} }
\examples{ \examples{
logo <- make_logo_grob() logo <- make_logo_grob() # wordmark, light
class(logo) # gg logo <- make_logo_grob("mark", "dark") # mark, dark
logo <- make_logo_grob(position = "bottom-left") # left-aligned
class(logo) # "gg" "ggplot"
} }
+26
View File
@@ -0,0 +1,26 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/join_utilities.R
\name{match_test}
\alias{match_test}
\title{Test the join between two sets of identifiers}
\usage{
match_test(x, y, distinct = TRUE)
}
\arguments{
\item{x}{a vector of identifiers to check against y}
\item{y}{a vector of identifiers to check against x}
\item{distinct}{logical, should duplicate values of x and y be removed before testing}
}
\value{
nothing, print a summary of match statistics to the console
}
\description{
Test the join between two sets of identifiers
}
\examples{
x <- LETTERS
y <- c(letters, LETTERS)
match_test(x, y)
}
Loaded 100 of 145 files, more files were not shown because too many files have changed in this diff. Show more