Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0a7b618a7
|
||
|
|
119aa7aa0f
|
||
|
|
f3ec052144
|
||
|
|
a2a0fce265
|
||
|
|
7bc547a995
|
||
|
|
c16e6cec19
|
||
|
|
dab960aaf1
|
||
|
|
dfcad3d0b8
|
||
|
|
0561df4221
|
||
|
|
d6e3ba2fb4
|
||
|
|
4f697e2d52
|
||
|
|
76aebe2b49
|
||
|
|
446843bc86
|
||
|
|
04a5ee958b
|
||
|
|
cd1af67a3a
|
||
|
|
496b9ed9ac
|
||
|
|
7cad98b434
|
||
|
|
2c7c9a6dbc
|
||
|
|
6051e4bb5c
|
||
|
|
9dea017381 | ||
|
|
967e7e1111 | ||
|
|
f32093c662 | ||
|
|
e257180f15 | ||
|
|
0ef0f310e2 | ||
|
|
4fb5c488f8
|
||
|
|
96dc1c4c6b | ||
|
|
6ea9265236 | ||
|
|
b9d427eb76
|
||
|
|
a904d2313a
|
||
|
|
761a72da18 | ||
|
|
4f51a49903
|
||
|
|
5fc8155965
|
||
|
|
41162597cf | ||
|
|
2a74ec2bd3 | ||
|
|
366ac39fac | ||
|
|
fc8bf1866b | ||
|
|
75b9a73165 | ||
|
|
2f1cdcde52 | ||
|
|
136c53643c
|
||
|
|
41fe2b6170
|
||
|
|
ac8e3eb60e
|
||
|
|
98e0949d27
|
||
|
|
328d9d2fd6
|
||
|
|
95b8ba1da4
|
||
|
|
f134621df5
|
||
|
|
31d3e2886d
|
||
|
|
34622ccf88
|
||
|
|
f9b51cc558
|
||
|
|
875251068a
|
||
|
|
515bae8685
|
||
|
|
099fff1d1d
|
||
|
|
7371069379
|
||
|
|
3a6f20b723
|
||
|
|
c93c469267
|
||
|
|
2d70d9aecf
|
||
|
|
bf6f7cc480
|
||
|
|
b84fc2f7d0
|
||
|
|
d17a4fbc7c
|
||
|
|
53299c7e88
|
||
|
|
38cdaa8ea7
|
||
|
|
01c9d1c796 | ||
|
|
b59cbeb9b6 |
No files matched your search
@@ -1,8 +1,12 @@
|
||||
^.*\.Rproj$
|
||||
^\.Rproj\.user$
|
||||
^\.github$
|
||||
^\.gitea$
|
||||
^README\.Rmd$
|
||||
^NEWS\.md$
|
||||
^Makefile$
|
||||
^Jenkinsfile$
|
||||
^Dockerfile$
|
||||
^LICENSE\.md$
|
||||
^\.claude$
|
||||
^\.playwright-mcp$
|
||||
^civilytics-site\.png$
|
||||
^Rplots\.pdf$
|
||||
@@ -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}
|
||||
@@ -2,3 +2,10 @@
|
||||
.Rhistory
|
||||
.RData
|
||||
.Ruserdata
|
||||
.compass-cache/
|
||||
# roborev snapshots
|
||||
/.roborev/
|
||||
|
||||
# Test run debris
|
||||
tests/testthat/Rplots.pdf
|
||||
tests/testthat/_problems/
|
||||
@@ -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 ---
|
||||
'''
|
||||
@@ -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,26 +1,42 @@
|
||||
Package: civilytics
|
||||
Type: Package
|
||||
Title: Utilities Functions for Civilytics
|
||||
Version: 0.2.0
|
||||
Author: Jared E. Knowles <jared@civilytics.com>
|
||||
Maintainer: Jared E. Knowles <jared@civilytics.com>
|
||||
Description: House R functions for Civilytics Consulting LLC
|
||||
This package implements a variety of useful functions for creating and
|
||||
branding analyses produced by Civilytics Consulting LLC.
|
||||
Title: Brand Themes, Color Palettes, and Utility Functions for Civilytics
|
||||
Version: 0.3.2
|
||||
Authors@R:
|
||||
person("Jared", "E. Knowles", email = "jared@civilytics.com",
|
||||
role = c("aut", "cre"))
|
||||
Description: Provides a complete ggplot2 brand theme system for Civilytics
|
||||
Consulting LLC, including editorial light, dark, and slide-optimized themes;
|
||||
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:
|
||||
R (>= 2.15.1)
|
||||
R (>= 4.1.0)
|
||||
Imports:
|
||||
ggplot2,
|
||||
ggplot2 (>= 4.0.0),
|
||||
jpeg,
|
||||
jsonlite,
|
||||
png,
|
||||
stringr,
|
||||
gridExtra,
|
||||
tidycensus,
|
||||
grid,
|
||||
stringdist
|
||||
stringdist,
|
||||
showtext,
|
||||
sysfonts
|
||||
Encoding: UTF-8
|
||||
LazyData: true
|
||||
Suggests:
|
||||
testthat
|
||||
RoxygenNote: 7.3.2
|
||||
testthat (>= 3.0.0),
|
||||
tidycensus,
|
||||
quarto,
|
||||
flextable,
|
||||
officer,
|
||||
patchwork,
|
||||
ragg,
|
||||
withr
|
||||
Config/testthat/edition: 3
|
||||
Config/roxygen2/version: 8.0.0
|
||||
RoxygenNote: 7.3.3
|
||||
@@ -1,60 +0,0 @@
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile true
|
||||
}
|
||||
stages {
|
||||
stage('Docker setup') {
|
||||
steps {
|
||||
sh '''
|
||||
R --version
|
||||
java --version
|
||||
'''
|
||||
}
|
||||
|
||||
}
|
||||
stage('Build and test') {
|
||||
stages {
|
||||
stage("Build package") {
|
||||
steps {
|
||||
sh '''
|
||||
R CMD build .
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Check') {
|
||||
steps {
|
||||
sh '''
|
||||
R CMD check --no-manual civilytics_0.2.0.tar.gz
|
||||
'''
|
||||
|
||||
sh '''
|
||||
R CMD INSTALL civilytics_0.2.0.tar.gz
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('testthat'){
|
||||
steps {
|
||||
sh '''
|
||||
R -e 'testthat::test_local(".")'
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('test coverage') {
|
||||
steps {
|
||||
sh '''
|
||||
R -e 'covr::package_coverage(".")'
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Clean') {
|
||||
steps {
|
||||
|
||||
sh '''
|
||||
rm -rf civilytics_0.2.0.tar.gz civilytics.Rcheck
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,15 @@
|
||||
# Generated by roxygen2: do not edit by hand
|
||||
|
||||
export(beep)
|
||||
export(add_logo)
|
||||
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(countDots)
|
||||
@@ -31,19 +39,37 @@ export(rnh)
|
||||
export(round_to_nearest_half)
|
||||
export(safe_max)
|
||||
export(safe_ratio)
|
||||
export(save_branded_flextable_png)
|
||||
export(scale_color_civilytics)
|
||||
export(scale_fill_civilytics)
|
||||
export(simpleCap)
|
||||
export(stamp_logo_png)
|
||||
export(star_subs)
|
||||
export(style_flextable_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(tidycensus)
|
||||
importFrom(ggplot2,annotation_custom)
|
||||
importFrom(ggplot2,ggplot)
|
||||
importFrom(ggplot2,theme)
|
||||
importFrom(graphics,plot)
|
||||
importFrom(ggplot2,theme_void)
|
||||
importFrom(grDevices,dev.off)
|
||||
importFrom(grDevices,png)
|
||||
importFrom(graphics,rasterImage)
|
||||
importFrom(grid,grid.draw)
|
||||
importFrom(grid,grid.newpage)
|
||||
importFrom(grid,grid.raster)
|
||||
importFrom(grid,rasterGrob)
|
||||
importFrom(gridExtra,arrangeGrob)
|
||||
importFrom(jpeg,readJPEG)
|
||||
@@ -53,3 +79,4 @@ importFrom(stats,qnorm)
|
||||
importFrom(stats,runif)
|
||||
importFrom(stringdist,stringsim)
|
||||
importFrom(stringr,str_count)
|
||||
importFrom(utils,flush.console)
|
||||
@@ -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.
|
||||
@@ -1,3 +1,31 @@
|
||||
#' @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
|
||||
@@ -7,4 +35,6 @@
|
||||
## 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"))
|
||||
@@ -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),
|
||||
...
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
#' @return a numeric column of data
|
||||
#' @export
|
||||
countCleanr <- function(x){
|
||||
if(class(x) == "character"){
|
||||
if ("character" %in% class(x)) {
|
||||
x[x == "None not reported"] <- "0"
|
||||
x[x == "Not applicable"] <- NA
|
||||
x <- as.numeric(x)
|
||||
@@ -110,8 +110,14 @@ nvals <- function(x){
|
||||
#' my_string <- c("Happy school", "Easy school", "cool School", "big school")
|
||||
#' simpleCap(my_string)
|
||||
simpleCap <- function(x) {
|
||||
stopifnot(class(x) == "character")
|
||||
s <- strsplit(x, " ")[[1]]
|
||||
stopifnot("character" %in% class(x))
|
||||
|
||||
# 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),
|
||||
sep = "", collapse = " ")
|
||||
}, character(1)))
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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."
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,14 @@
|
||||
# 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 check against x
|
||||
#' @param distinct logical, should duplicate values of x and y be removed before testing
|
||||
#' @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 nothing, print a summary of match statistics to the console
|
||||
#' @return Invisibly returns `NULL`; prints a formatted summary of match
|
||||
#' statistics to the console via [writeLines()].
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
@@ -16,33 +19,34 @@ match_test <- function(x, y, distinct = TRUE) {
|
||||
if (distinct) {
|
||||
x <- unique(x)
|
||||
y <- unique(y)
|
||||
cat("**** Distinct Matches ****")
|
||||
cat("\n")
|
||||
|
||||
}
|
||||
|
||||
# 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)
|
||||
|
||||
cat("**** Match Summary ****")
|
||||
cat("\n")
|
||||
cat("X in Y")
|
||||
cat("\n")
|
||||
cat(paste0("Of the ", total_x, " X values, ", xiny, " (",
|
||||
100*round(xiny/total_x, 2), "%) were matched."))
|
||||
cat("\n")
|
||||
cat("********************************************")
|
||||
cat("\n")
|
||||
cat("Y in X")
|
||||
cat("\n")
|
||||
cat(paste0("Of the ", total_y, " Y values, ", yinx, " (",
|
||||
100*round(yinx/total_y, 2), "%) were matched."))
|
||||
cat("\n")
|
||||
cat("******************************************")
|
||||
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)
|
||||
}
|
||||
@@ -9,11 +9,14 @@
|
||||
#' @importFrom jpeg readJPEG
|
||||
#' @importFrom graphics rasterImage
|
||||
#' @examples
|
||||
#' img <- system.file("img","civilytics_logo.jpg",package="civilytics")
|
||||
#' \dontrun{
|
||||
#' # Supply a path to your own JPEG file
|
||||
#' img <- "my_photo.jpg"
|
||||
#' plot_jpeg(img)
|
||||
#' }
|
||||
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]
|
||||
if (upscale){
|
||||
res <- res * 3
|
||||
@@ -41,32 +44,78 @@ get_png <- function(filename) {
|
||||
|
||||
#' 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)
|
||||
#' 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.
|
||||
#'
|
||||
#' @param plot a ggplot2 object, or a patchwork composition
|
||||
#' @param logo a logo grob created by make_logo_grob()
|
||||
#' @param margin_param a numeric specifying what margin to add or subtract to align the logo
|
||||
#' @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 gridExtra arrangeGrob
|
||||
#' @export
|
||||
add_logo <- function(plot, logo, margin_param = NULL) {
|
||||
if(has_caption(plot)) {
|
||||
# convert the caption size to a negative number and on the "pt" scale
|
||||
# p1$theme$plot.caption$size * 1.1
|
||||
# Count the number of lines, which is this + 1
|
||||
# For each line, we can add a certain negative space to align the logo
|
||||
cap_lines <- measure_caption(plot)
|
||||
if (!is.null(margin_param)) {
|
||||
plot <- plot + theme(plot.margin = unit(c(7, 7, margin_param, 7), "pt"))
|
||||
} else {
|
||||
plot <- plot + theme(plot.margin = unit(c(7, 7, cap_lines * -52, 7), "pt"))
|
||||
}
|
||||
} else {
|
||||
plot <- plot + theme(plot.margin = unit(c(7, 7, -14, 7), "pt"))
|
||||
add_logo <- function(plot, logo, margin_param = NULL, font_scale = 1,
|
||||
position = c("bottom-right", "bottom-left",
|
||||
"top-right", "top-left"),
|
||||
logo_height = 0.5) {
|
||||
position <- match.arg(position)
|
||||
at_top <- grepl("top", position)
|
||||
is_patchwork <- inherits(plot, "patchwork")
|
||||
|
||||
# Capture the plot's background color so we can fill the entire composed
|
||||
# grob with it. The logo grob stays transparent (theme_void).
|
||||
bg_fill <- plot$theme$plot.background$fill
|
||||
|
||||
if (!is.null(font_scale) && font_scale != 1) {
|
||||
base_size <- plot$theme$text$size
|
||||
if (is.null(base_size)) base_size <- 14
|
||||
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),
|
||||
padding = unit(0.1, "line"))
|
||||
if (!is.null(margin_param)) {
|
||||
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
|
||||
@@ -79,8 +128,8 @@ add_logo <- function(plot, logo, margin_param = NULL) {
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' p1 <- ggplot2::qplot(mpg, wt, data = mtcars)
|
||||
#' measure_caption(p1) # Should equal 1 since no caption is required
|
||||
#' p1 <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
|
||||
#' measure_caption(p1) # Should equal 1 since no caption is present
|
||||
measure_caption <- function(gg) {
|
||||
if (has_caption(gg)) {
|
||||
stringr::str_count(gg$labels$caption, pattern = "\n") + 1
|
||||
@@ -99,19 +148,24 @@ measure_caption <- function(gg) {
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' p1 <- ggplot2::qplot(mpg, wt, data = mtcars)
|
||||
#' p1 <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
|
||||
#' has_caption(p1) # FALSE
|
||||
has_caption <- function(gg) {
|
||||
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 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 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 a grid object
|
||||
#' @note The resulting object needs to be drawn to the screen using grid.draw()
|
||||
@@ -121,53 +175,285 @@ has_caption <- function(gg) {
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' library(ggplot2); library(grid)
|
||||
#' tmp_plot <- ggplot(mtcars) + aes(x = hp, y = disp) + geom_point() + theme_civilytics()
|
||||
#' tmp_logo <- make_logo_grob()
|
||||
#' plot_and_logo <- add_logo(tmp_plot, tmp_logo)
|
||||
#' grid.draw(plot_and_logo)
|
||||
#' 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)) {
|
||||
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) {
|
||||
len <- length(plot_list)
|
||||
plot_list[[len]] <- plot_list[[len]] + margin
|
||||
} else {
|
||||
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
|
||||
#'
|
||||
#' @return a gg object which contains the logo file stored as a Grob suitable for manipulating in
|
||||
#' grid
|
||||
#' 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()].
|
||||
#'
|
||||
#' @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
|
||||
#' @import ggplot2
|
||||
#' @importFrom ggplot2 ggplot theme_void annotation_custom
|
||||
#' @examples
|
||||
#' logo <- make_logo_grob()
|
||||
#' class(logo) # gg
|
||||
make_logo_grob <- function() {
|
||||
logo_grob <- ggplot(mapping = aes(x = 0:1, y = 1)) +
|
||||
#' logo <- make_logo_grob() # wordmark, light
|
||||
#' logo <- make_logo_grob("mark", "dark") # mark, dark
|
||||
#' logo <- make_logo_grob(position = "bottom-left") # left-aligned
|
||||
#' 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() +
|
||||
annotation_custom(get_png(system.file("img", "civilytics_logo.png",
|
||||
package="civilytics")), xmin= 0.7, xmax = 1)
|
||||
logo_grob
|
||||
annotation_custom(logo, xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf)
|
||||
}
|
||||
|
||||
#' 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)
|
||||
}
|
||||
@@ -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) != ""
|
||||
}
|
||||
@@ -72,14 +72,21 @@ waldInterval <- function(x, n, conf.level = 0.95){
|
||||
|
||||
#' Calculate the Agresti-Coull interval
|
||||
#'
|
||||
#' @param num a number of successes
|
||||
#' @param den a number of trials
|
||||
#' @param conf.level default 0.95, set the confidence interval to return
|
||||
#' @param num number of successes
|
||||
#' @param den number of trials
|
||||
#' @param conf.level default 0.95, confidence level for the interval
|
||||
#'
|
||||
#' @return an interval
|
||||
agresti_coull_interval <- function(num, den, conf.level) {
|
||||
num <- num + 2
|
||||
den <- den + 4
|
||||
return(num/den)
|
||||
|
||||
#' @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))
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
@@ -1,27 +1,133 @@
|
||||
#' Make the Civilytics plot theme
|
||||
#' Civilytics ggplot2 theme
|
||||
#'
|
||||
#' @param font_size default 14, a number representing the base font for the theme
|
||||
#' @param font_family default "", a character for the font family to use in the theme
|
||||
#' @param line_size default 0.5, the line size to use for the theme
|
||||
#' @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
|
||||
#' @param rel_large default 16/14, the scale factor to create a large font from the base font_size
|
||||
#' @importFrom graphics plot
|
||||
#' @return a ggplot2 theme object suitable for combining with ggplot objects to theme them
|
||||
#' A complete ggplot2 theme built on [theme_grey()] using the
|
||||
#' Civilytics brand color palette and typography. Requires ggplot2 >= 4.0.0
|
||||
#' for the `ink`, `paper`, and `accent` base-theme parameters.
|
||||
#'
|
||||
#' Produces an editorial, Pew-style layout: visible x-axis line to ground
|
||||
#' the data, light horizontal gridlines for reference, no panel border or
|
||||
#' y-axis line. Plot title and caption are left-aligned to the full plot
|
||||
#' 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
|
||||
theme_civilytics <-
|
||||
function (font_size = 14,
|
||||
font_family = "",
|
||||
#'
|
||||
#' @examples
|
||||
#' \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,
|
||||
rel_small = 12 / 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
|
||||
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(
|
||||
line = element_line(
|
||||
color = "black",
|
||||
color = ink,
|
||||
linewidth = line_size,
|
||||
linetype = 1,
|
||||
lineend = "butt"
|
||||
@@ -35,7 +141,7 @@ theme_civilytics <-
|
||||
text = element_text(
|
||||
family = font_family,
|
||||
face = "plain",
|
||||
color = "black",
|
||||
color = ink,
|
||||
size = font_size,
|
||||
hjust = 0.5,
|
||||
vjust = 0.5,
|
||||
@@ -44,125 +150,475 @@ theme_civilytics <-
|
||||
margin = margin(),
|
||||
debug = FALSE
|
||||
),
|
||||
axis.line = element_line(
|
||||
color = "black",
|
||||
linewidth = line_size,
|
||||
# -- Axes --
|
||||
axis.line = element_blank(),
|
||||
axis.line.x = element_line(
|
||||
color = ink,
|
||||
linewidth = 0.6,
|
||||
lineend = "square"
|
||||
),
|
||||
axis.line.x = NULL,
|
||||
axis.line.y = NULL,
|
||||
axis.text = element_text(color = "black",
|
||||
size = small_size),
|
||||
axis.text.x = element_text(margin = margin(t = small_size / 4),
|
||||
vjust = 1),
|
||||
axis.text.x.top = element_text(margin = margin(b = small_size / 4),
|
||||
vjust = 0),
|
||||
axis.text.y = element_text(margin = margin(r = small_size / 4),
|
||||
hjust = 1),
|
||||
axis.text.y.right = element_text(margin = margin(l = small_size / 4),
|
||||
hjust = 0),
|
||||
axis.ticks = element_line(color = "black",
|
||||
linewidth = line_size),
|
||||
axis.ticks.length = unit(half_line / 2,
|
||||
"pt"),
|
||||
axis.title.x = element_text(margin = margin(t = half_line / 2),
|
||||
vjust = 1),
|
||||
axis.title.x.top = element_text(margin = margin(b = half_line / 2),
|
||||
vjust = 0),
|
||||
axis.line.y = element_blank(),
|
||||
axis.text = element_text(
|
||||
color = ink_2,
|
||||
size = rel(rel_small)
|
||||
),
|
||||
axis.text.x = element_text(
|
||||
margin = margin(t = small_size / 4),
|
||||
vjust = 1
|
||||
),
|
||||
axis.text.x.top = element_text(
|
||||
margin = margin(b = small_size / 4),
|
||||
vjust = 0
|
||||
),
|
||||
axis.text.y = element_text(
|
||||
margin = margin(r = small_size / 4),
|
||||
hjust = 1
|
||||
),
|
||||
axis.text.y.right = element_text(
|
||||
margin = margin(l = small_size / 4),
|
||||
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(
|
||||
size = rel(rel_small),
|
||||
color = ink_3,
|
||||
angle = 90,
|
||||
margin = margin(r = half_line /
|
||||
2),
|
||||
margin = margin(r = 10),
|
||||
vjust = 1
|
||||
),
|
||||
axis.title.y.right = element_text(
|
||||
size = rel(rel_small),
|
||||
color = ink_3,
|
||||
angle = -90,
|
||||
margin = margin(l = half_line / 2),
|
||||
vjust = 0
|
||||
),
|
||||
# -- Legend --
|
||||
legend.background = element_blank(),
|
||||
legend.spacing = unit(font_size, "pt"),
|
||||
legend.spacing.x = NULL,
|
||||
legend.spacing.y = NULL,
|
||||
legend.margin = margin(0,
|
||||
0, 0, 0),
|
||||
legend.margin = margin(0, 0, 4, 0),
|
||||
legend.key = element_blank(),
|
||||
legend.key.size = unit(1.1 *
|
||||
font_size, "pt"),
|
||||
legend.key.size = unit(12, "pt"),
|
||||
legend.key.height = NULL,
|
||||
legend.key.width = NULL,
|
||||
legend.text = element_text(size = rel(rel_small)),
|
||||
legend.text.align = NULL,
|
||||
legend.title = element_text(hjust = 0),
|
||||
legend.title.align = NULL,
|
||||
legend.position = "right",
|
||||
legend.text = element_text(
|
||||
size = rel(rel_small),
|
||||
color = ink_2
|
||||
),
|
||||
legend.title = element_text(
|
||||
hjust = 0,
|
||||
face = "bold",
|
||||
size = rel(rel_tiny),
|
||||
color = ink_3
|
||||
),
|
||||
legend.position = "top",
|
||||
legend.direction = NULL,
|
||||
legend.justification = c("left",
|
||||
"center"),
|
||||
legend.justification = c("left", "center"),
|
||||
legend.box = NULL,
|
||||
legend.box.margin = margin(0,
|
||||
0, 0, 0),
|
||||
legend.box.margin = margin(0, 0, 0, 0),
|
||||
legend.box.background = element_blank(),
|
||||
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.grid = element_blank(),
|
||||
panel.grid.major = NULL,
|
||||
panel.grid.minor = NULL,
|
||||
panel.grid.major.x = NULL,
|
||||
panel.grid.major.y = NULL,
|
||||
panel.grid.minor.x = NULL,
|
||||
panel.grid.minor.y = NULL,
|
||||
panel.spacing = unit(half_line,
|
||||
"pt"),
|
||||
panel.grid.minor = element_blank(),
|
||||
panel.grid.major.x = if (grid %in% c("x", "both")) grid_line else no_line,
|
||||
panel.grid.major.y = if (grid %in% c("y", "both")) grid_line else no_line,
|
||||
panel.spacing = unit(16, "pt"),
|
||||
panel.spacing.x = NULL,
|
||||
panel.spacing.y = NULL,
|
||||
panel.ontop = FALSE,
|
||||
strip.background = element_rect(fill = "grey80"),
|
||||
# -- Facet strips --
|
||||
strip.background = element_rect(fill = strip_color, color = NA),
|
||||
strip.text = element_text(
|
||||
family = font_family,
|
||||
face = "bold",
|
||||
size = rel(rel_small),
|
||||
margin = margin(half_line / 2, half_line /
|
||||
2, half_line / 2,
|
||||
half_line / 2)
|
||||
color = ink,
|
||||
margin = margin(
|
||||
half_line / 2, half_line / 2,
|
||||
half_line / 2, half_line / 2
|
||||
)
|
||||
),
|
||||
strip.text.x = NULL,
|
||||
strip.text.y = element_text(angle = -90),
|
||||
strip.placement = "inside",
|
||||
strip.placement.x = NULL,
|
||||
strip.placement.y = NULL,
|
||||
strip.switch.pad.grid = unit(half_line / 2,
|
||||
"pt"),
|
||||
strip.switch.pad.wrap = unit(half_line / 2,
|
||||
"pt"),
|
||||
plot.background = element_blank(),
|
||||
strip.switch.pad.grid = unit(half_line / 2, "pt"),
|
||||
strip.switch.pad.wrap = unit(half_line / 2, "pt"),
|
||||
# -- Plot-level --
|
||||
plot.background = element_rect(fill = bg_color, color = NA),
|
||||
plot.title = element_text(
|
||||
family = title_family,
|
||||
face = "bold",
|
||||
size = rel(rel_large),
|
||||
hjust = 0,
|
||||
vjust = 1,
|
||||
margin = margin(b = half_line)
|
||||
margin = margin(b = 4)
|
||||
),
|
||||
plot.title.position = "plot",
|
||||
plot.subtitle = element_text(
|
||||
size = rel(rel_small),
|
||||
size = rel(1),
|
||||
color = ink_2,
|
||||
hjust = 0,
|
||||
vjust = 1,
|
||||
margin = margin(b = half_line)
|
||||
lineheight = 1.3,
|
||||
margin = margin(b = 14)
|
||||
),
|
||||
plot.caption = element_text(
|
||||
size = rel(rel_tiny),
|
||||
hjust = 0, # set hjust to 0
|
||||
color = ink_3,
|
||||
hjust = 0,
|
||||
vjust = 1,
|
||||
lineheight = 1,
|
||||
margin = margin(t = half_line)
|
||||
lineheight = 1.3,
|
||||
margin = margin(t = 14)
|
||||
),
|
||||
plot.caption.position = "plot",
|
||||
plot.tag = element_text(
|
||||
face = "bold",
|
||||
color = accent,
|
||||
size = rel(rel_tiny),
|
||||
hjust = 0,
|
||||
vjust = 0.7
|
||||
),
|
||||
plot.tag.position = c(0, 1),
|
||||
plot.margin = margin(half_line,
|
||||
half_line, half_line, half_line),
|
||||
plot.margin = margin(16, 18, 16, 16),
|
||||
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()
|
||||
}
|
||||
@@ -149,6 +149,9 @@ race_short_names <- function(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
|
||||
@@ -156,9 +159,12 @@ race_short_names <- function(x) {
|
||||
#' @examples
|
||||
#' x <- c(2, NA, 4, 9)
|
||||
#' na_sum(x) # 15
|
||||
na_sum <- function(x) {
|
||||
#' 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))
|
||||
}
|
||||
@@ -171,7 +177,6 @@ na_sum <- function(x) {
|
||||
#' Title
|
||||
#'
|
||||
#' @param x a vector of state names
|
||||
## #' @importFrom datasets state.abb state.name
|
||||
#' @return state abbreviations matching state naems provided in X
|
||||
#' @export
|
||||
#'
|
||||
@@ -234,14 +239,21 @@ outersect <- function(x, y, ...) {
|
||||
#' @param stabbr a two letter abbreviation for a US state
|
||||
#'
|
||||
#' @return FIPS codes that match the abbreviation
|
||||
#' @import tidycensus
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' get_fips("MT")
|
||||
#' get_fips("PR")
|
||||
#' get_fips("CC")
|
||||
#' }
|
||||
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]
|
||||
@@ -253,12 +265,20 @@ get_fips <- function(stabbr) {
|
||||
#' @param fips a character value that captures the FIPS code with leading 0
|
||||
#'
|
||||
#' @return a character value, length 2, with the state abbreviation
|
||||
#' @import tidycensus
|
||||
#' @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) {
|
||||
@@ -442,6 +462,6 @@ round_to_nearest_half <- function(x) {
|
||||
#' @examples
|
||||
#' rnh(c(0.2, 0.3, 0.4, 0.8, 0.09, 0.9))
|
||||
rnh <- function(x) {
|
||||
tmp <- Vectorize(civilytics::round_to_nearest_half)
|
||||
tmp <- Vectorize(round_to_nearest_half)
|
||||
tmp(x)
|
||||
}
|
||||
@@ -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")
|
||||
```
|
||||
@@ -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+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgA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srxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+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("remotes")</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">"https://gitea.civilytics.org/Civilytics/civilyticsR.git"</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">"Fuel economy by engine displacement"</span>,</span>
|
||||
<span id="cb2-9"><a href="#cb2-9" tabindex="-1"></a> <span class="at">subtitle =</span> <span class="st">"Highway MPG vs. engine size for 234 vehicles"</span>,</span>
|
||||
<span id="cb2-10"><a href="#cb2-10" tabindex="-1"></a> <span class="at">caption =</span> <span class="st">"Source: EPA fuel economy data (ggplot2::mpg)"</span>,</span>
|
||||
<span id="cb2-11"><a href="#cb2-11" tabindex="-1"></a> <span class="at">x =</span> <span class="st">"Engine displacement (litres)"</span>,</span>
|
||||
<span id="cb2-12"><a href="#cb2-12" tabindex="-1"></a> <span class="at">y =</span> <span class="st">"Highway MPG"</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/1u5kfDy8P0M8WCyLSf2HjKqpq8WG37te0xmg0TPlgnbBpkEIaRmOrq6twYY93a5ra6n3bn1ai41PcnBeiA3je26vVBsaDACsYDXAV1RU1dTWtTsZM9N0leKyMny4uqa2x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9fYf23B5oM32qXMDe+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,iVBORw0KGgoAAAANSUhEUgAAAqAAAANgCAMAAADEfSr3AAAC9FBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4OGisPDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZEC4aGhoaLkobGxscHBwdHR0fHx8fb3AgICAhISEiIiIiQGojIyMkJCQlJSUmJiYoKCgpKSkqG00qKiorKyssLCwtLS0uLi4uVZAvLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9Kms9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFGgBFRUVGRkZHR0dISEhJSUlKSkpKdLBLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhaWlpaaoJbW1tcOopcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqamprKwBrOl5ra2tubm5vb29wcHBxcXFycnJzc3N0dHR1Vqh1dXV2dnZ3d3d4eHh6enp6m8p7e3t8fHx9fX1+fn5/f3+AgICBgYGCgoKDg4OFhYWGhoaHh4eJiYmNjY2Ojo6Pj4+QkJCSPQCSkpKTk5OVlZWWlpaXl5eYmJiZmZmafsKdnZ2enp6fn5+goKChoaGioqKjo6OkpKSlpaWmJx2mpqanp6eoqKipqamqqqqrq6usrKytra2urq6vr6+ysrKzs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TWjqTRwRWZCf2WuhUZgLtEJuWHONNFjAikL1DYW5FrGwyOKGwhzvS2z8oEhw8U0iMxbNF9lv7RV9ZVmubEgcMTbgH/BPEg0/119Advb0Pn1MtUoaDh1qlHLVy6RatUW8QOMHRVr0hEiz/fCotfeQ6t1ySeKIm9/pycol0WjK9VclUlix3gJaJNGCqnmyJfoy6hkcPxi96+x7iG60S17iiEeyckE0unL9HW9dMFHkDtWg1EesdtlA25OBxg8OCDS/3wiiFHP8nXq4Q/UpCaheK7WqxzYeVp0hNarbE4DGDyYDbVGtlcv7jSBKMcffK/n5dzVdLXNV9+bJwtXTpVW1TaSmsSQBaPxgElBf4T1Lc+y9pBFEKeb62181zlda94a11TEvPzBzm7XR21wamLM8AWj8YK7s8DzkVmydlDO5tf8IohQb4ov66D1od5ddd2ZOiMjbEEAj4rPfraNl5oSIvMGOjA6gZHQAJaMDKBkdQMnoAEpGB1AyuuEC/b8Ucpf43xRyVvhdCrkn8d8p5C7x2xRyl/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">"Vehicle counts by class"</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">"y"</span>)</span></code></pre></div>
|
||||
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAFQCAIAAADvJFsWAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nO3dZ1wURwPH8Tna0UHEXkBQEY0VS+y9t6hoYixRNJrYYhKjxpJEozHWGKPG3jXG+gixd2PvNfbesIGgdOSeF2vWk3KCLFwcft8PL/Zm93Zmh+H+bD1dbFS4AAAAcrEwdwMAAID2CHgAACREwAMAICECHgAACRHwAABIiIAHAEBCBDwAABIi4AEAkBABDwCAhAh4AAAkRMADACAhAh4AAAkR8AAASIiABwBAQgQ8AAASIuABAJAQAQ8AgIQIeAAAJETAAwAgIat0vj8qOrpYhSYJCQnKyzLvFQv6c0ayS165drN+q27x8fFCiIL58+7bvOztaixarlFUTLQyvXn1nOLFCpte3sevcWR0lDK9Zc1cXx/vTKgUmviPd/t/vHkAsrj0BrydrW0hj/xnz19WXh44eur6zTuFPPInXTJw085nzyOU6VLv+bx1jSFhYep0ZFT0G5d/8vSpOh0RGZU5lWYdj0NC5y5erRNCCGFnZ9u3R0cNV/4f7/b/ePMAZHHpD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
||||
<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">"seq_ember"</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">"Old Faithful eruption density"</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">"none"</span>)</span></code></pre></div>
|
||||
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAFQCAIAAADvJFsWAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOydd3gU1dfHz/b0hBASSkJCQu+CFAEpgkgRpItiAUFExIb+FBUUe8PyolhAkaYCUqQLiBRBEJQOgQQICQkJENLL1pn3j8VlSc4ms5ndbLL5fh4ent2zd+69OzPZM997zz1XYSzOIwAAAAB4F0pPdwAAAAAArgcOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPBC4OABAAAALwQOHgAAAPB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3V3XwutVjP3g9cmPzJ6xdotf/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"><-</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">"Engine size vs. highway fuel economy"</span>,</span>
|
||||
<span id="cb5-6"><a href="#cb5-6" tabindex="-1"></a> <span class="at">subtitle =</span> <span class="st">"Colored by number of cylinders"</span>,</span>
|
||||
<span id="cb5-7"><a href="#cb5-7" tabindex="-1"></a> <span class="at">caption =</span> <span class="st">"Source: ggplot2::mpg"</span>,</span>
|
||||
<span id="cb5-8"><a href="#cb5-8" tabindex="-1"></a> <span class="at">colour =</span> <span class="st">"Cylinders"</span>,</span>
|
||||
<span id="cb5-9"><a href="#cb5-9" tabindex="-1"></a> <span class="at">x =</span> <span class="st">"Displacement (L)"</span>, <span class="at">y =</span> <span class="st">"Highway MPG"</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+zOzswSGuurEAAAAAAki1RnVwAAAAAA4gcBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACQQBHgAAAJBAEOABAAAACUQSMf/spZuDgj8Is+XWDUtWLpwp4u6EZ9V7ZB21Hlv2875gY2XWYbtus65YZ7Gz7OVZ30DFll8+OG9rbc5/e/EetNbuveui0+knzt+46/0iJ6+AxWIhhBTl5eM+PO2Yvf88xxmATiRqgK+urq2nNgizZW1NnYj7apXSiorvu66r78hdt1lXrLPYlVVW4st19VSB24v3oLV2713Xzj+Pn7tyjz1FyP/IYvHzHGcAOpGoAR4A0OVUVddevO6Nr8rISNtamsrIyHRilQAAYtdxAV5FWanD9oUQUlSQq66pQwiRSCTVjt11m3XFOnc6OGhtkJqRxWAw8NWb5w4NdO3TifUBALQHcQb4+1eOefR3FmOBokiP9u/sKrRa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lNmF0/fRmIJw5x78e+jUtve3zZzz+YvV2OHXsntWUbdi9Zu/PanccpqZksFsvYUG/6pFFkMln4OiOEXgeG/XvuOr66fvkv7EMTRa8wmUyeOtETX7336CXWvPwu7FNhUQlCSEZG2mvc8Hb6dhzYHz2oqTTrr9dS/TFiOWeE2buVhYmJsT62XFdPDf3wGSH05m04au5lQAhCqKik9POXeISQmooyfs0hJyvj7ua0ee2iU4d+o1DIePmcHd0ZTY8k3Fx6Gejp4On3v7XB4q2vnkMGqKkqow4k+lknrpKfv3qLJ04aO5x9++mTRuXGBUUGeT+7dwbr3fbi9fd+qZ5DB7Bv7Dm4P74cFPyBRuPsBCPMr4co5ZuzPUORa14+ezdSWRlp7v3+gGcI6CztHuBlZKUFb8SXoX43517f/zOv3LQnNj6ZRqMlp2as/d+fePoQ974cT6ZF9yUuGV/2mrOa/dGDQffvt27lldUFhcU8S5gxeTS+TKU2eD95vX7bX32HT7fqM3L+ym0+z9+w32gKVFBYvPJbL3eEkFOvHlvWLRJvhVHzVvri0rLXAWEIodvfbuXHjPDA47p4v50YdeQ5M3oYWyt9QChC6HVgGEJITlYGf0CbmpaVlp6NHUmE0Iih/bE7SxyNRnv09PWyDbv6Dptu1GOQprmrXV/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,iVBORw0KGgoAAAANSUhEUgAAAqAAAAJwCAIAAADZYES9AAAAC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+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+Hh6amuPnW6urbeOpm0rTkZEEIIIVRd6GxnACGEEEKVhwEeIYQQqkIY4BFCCKEqhAEeIYQQqkIY4BFCCKEqhAE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DpjLfc487BKwTNlmnvZJcyyh07t6u775kXN7vPof970flfveTKLW/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/+EBOTpKT5LRPk5xzQmOxWIAQQgih1kWkuQuAEEIIIcHDAI8QQgi1QhjgEUIIoVYIAzxCCCHUCmGARwghhFohDPAIIYRQK4QBHiGEEGqFMMAjhBBCrRAGeIQQQqgVwgCPEEIItUIY4BFCCKFWCAM8Qggh1AphgEcIIYRaIQzwCCGEUCuEAR4hhBBqhTDAI4QQQq0QBniEEEKoFcIAjxBCCLVCGOARQgihVggDPEIIIdQKYYBHCCGEWiEM8AghhFArhAEeIYQQaoUwwCOEEEKtEAZ4hBBCqBXCAI8QQgi1QhjgEUIIoVYIAzxCCCHUCmGARwghhFohDPAIIYRQK4QBHiGEEGqFxIS9gXlL15eWlfG1iIS4xPmTe4VUngaYv+zvktJScnLTX8tN2hk1Y3kErtXvoFCx1fANa5eamRjzvrhQ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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">"navy_600"</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">"Highway MPG by vehicle class"</span>,</span>
|
||||
<span id="cb8-6"><a href="#cb8-6" tabindex="-1"></a> <span class="at">x =</span> <span class="st">"Displacement (L)"</span>, <span class="at">y =</span> <span class="st">"Highway MPG"</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">"y"</span>)</span></code></pre></div>
|
||||
<img role="img" aria-label src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAIAAAD17khjAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOzdZ1gTWRcA4Jseeu8gSBURFBuCoqiABRv23ntfP1exrr3s6q666tp7711RREXACgqoCAoiRXqHkJ7vx+AwJJRAgglw3ocfM3faYSaTk5m59w6JW1aEAAAAANC0kBUdAAAAAADkDxI8AAA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t1HYbH28u1EqpyIej3f34bMHj0Pfx3xOz8jE70lKIpFIY4b5/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>|></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"><-</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">"Fuel economy by engine displacement"</span>,</span>
|
||||
<span id="cb9-6"><a href="#cb9-6" tabindex="-1"></a> <span class="at">caption =</span> <span class="st">"Source: EPA fuel economy data (ggplot2::mpg)"</span>,</span>
|
||||
<span id="cb9-7"><a href="#cb9-7" tabindex="-1"></a> <span class="at">x =</span> <span class="st">"Displacement (L)"</span>, <span class="at">y =</span> <span class="st">"Highway MPG"</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+DyLq0afbpFDFCCCHMoMe6LSM9WvUKgSqwZeVCctKuHz71T0SumO0UPP6bb7x0seYOSV7i9BNLfj+bUbmFKRYhP+34xoZS/WFzrxdUP6AmPl1tiby7vy44Fy9ubBrMqOf6P0e4q3wf4GQlPHsRJ0QIIYSbOxSTqg4AfCGwZeUgjj+wfPLWd0KEEAq98Sjf4P6yvlrNHZScSE5abOTThMpmBXf0riAQqk7wzb9eUP2AepAjJ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z+ITW7VeLTLq0smT8vxFnVokVyREacrrOw8jIhLS03OLyjkiESIRQsXJUmOGxaRk7ZvehjRtEyhpj1blXgC+EJUneBLJOLine truncated
|
||||
|
||||
<h3 id="compact-mark">Compact mark</h3>
|
||||
<p>Use <code>type = "mark"</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"><-</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">"Engine size vs. highway fuel economy"</span>,</span>
|
||||
<span id="cb10-6"><a href="#cb10-6" tabindex="-1"></a> <span class="at">colour =</span> <span class="st">"Cylinders"</span>,</span>
|
||||
<span id="cb10-7"><a href="#cb10-7" tabindex="-1"></a> <span class="at">x =</span> <span class="st">"Displacement (L)"</span>, <span class="at">y =</span> <span class="st">"Highway MPG"</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">"mark"</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+W98OSJxb6czowIIVSjlfs5QmfE2j1/jGK3TzAvjGnu3X+2d2dHoRnatC7ti2Cx2K3Iqu37xbYyGC1CSwRixfU5wsDH2x2zO0IvB42fyCgNZNXtvWb7gr5sEBXG37h873ZESlYxn+YYOXr6DR//2gh3PYbKD5CVP79x9eTtyMT8akrH2NEncPykEf3tO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/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"><-</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">"Vehicle counts"</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">"y"</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"><-</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">"navy_600"</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">"Displacement vs. MPG"</span>, <span class="at">x =</span> <span class="st">"Displacement (L)"</span>, <span class="at">y =</span> <span class="st">"Highway MPG"</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">"y"</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"><-</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/bppGbCYAOTZx3MzbusrSJNdjmPUKmz5v31jhPywbKIZRXT61OVELWPwuou3YXZ0WMNG4wQ5SlnNh49NptmcoilpVbifqtSTNn1r8rWUL3iBdXfj6jv02D5wtddOvojz9u3nzmXolmllkbI9fMe8ic1T9O6cVr7FNATVMFk2n/IYNNa39uaeqRM9kNf+2y5COncmrfYjkPHxrA1WeIzeH49e9jXbMflNA7KNQapa0hMKWHvlgwbtr8cdPe+vJcJWol4GklL06N/nnJnIEvbrigVmWigPLqadW5S0im4vzJuKqG35MnH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DadIAmgdbBtg/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("wordmark", "light")</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("wordmark", "dark")</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("mark", "light")</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("mark", "dark")</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">"README.Rmd"</span>)</span></code></pre></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,25 +1,258 @@
|
||||
|
||||
# civilytics
|
||||
|
||||
<!-- badges: start -->
|
||||
<!-- badges: end -->
|
||||
|
||||
The goal of civilytics is to ...
|
||||
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
|
||||
|
||||
You can install the released version of civilytics from [CRAN](https://CRAN.R-project.org) with:
|
||||
Install from the Civilytics Gitea server:
|
||||
|
||||
``` r
|
||||
install.packages("civilytics")
|
||||
# install.packages("remotes")
|
||||
remotes::install_git("https://gitea.civilytics.org/Civilytics/civilyticsR.git")
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
This is a basic example which shows you how to solve a common problem:
|
||||
## Quick start
|
||||
|
||||
``` r
|
||||
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")
|
||||
```
|
||||
|
After Width: | Height: | Size: 682 KiB |
|
Before Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 321 KiB |
|
After Width: | Height: | Size: 149 KiB |
@@ -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 |
|
After Width: | Height: | Size: 20 KiB |
@@ -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 |
@@ -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 |
|
After Width: | Height: | Size: 69 KiB |
@@ -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 |
|
After Width: | Height: | Size: 57 KiB |
@@ -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 |
|
Before Width: | Height: | Size: 217 KiB |
@@ -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
AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK
DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f
Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgANAEAAwER
AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA
AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB
UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE
1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ
qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYEC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6r5FkhvbWwsuXmDVdPKSWoiZp
QY5Zoqxs7IwUCtd18NlWR6T5C81/lt5+1nWvK1gdc8m+Y3+salpEMkUd7Z3Clm524maKOVKu1EDg
0NP2RVVNPzHTz5528n32ieX9Cl0xLlVa4udWkgieRInV/Qt4oZJjzkK8S0vBQPGuyqSfnh5V/MPz
F5x8nX/lzy+by18qX66jJcy3VrCs7epBKI40eQOKeiQSwHt44q9A88eVl88/l7qWhX1s1nPqdqfT
hnKM0FyvxwlmiaRDwlVSeLGoxVAfkx5N1Typ5A0+w1pi+vTKs2qsziQiQIsUcXNSwPowRRxbEj4d
sVYHaeWfzJT/AJyBuPPz+V5V0Ge1GnrH9bsTcLHwRfVZBPx+0leIbp74q3+X/lb8ydK/OvzH5u1L
yy0Gi+ZFEIIvLN5bcK0fGSRVl+JaIeQWp8K4qj/+cgPI/wDimbyjfaLei11+11lNNiuoDWQRXALX
Aqu9YEhMlD0UN44q9esLG10+xtrC0jEVraRJBbxDoscahEUfJRirwfy55T/NbyH5k856V5e0Vb6D
zXem70fzEZ4hBYiRpPiuYpKO7QrIDxC/ERtWuKovzV5Z/M25/PTy/wCdbHy293o/l22eweR7uySe
6DrcRvOieqqryFxyVWp7gdAqq6n5L8+eQ/zZ1Pzx5Q0geYtB8xoBrekxzJDcwy8gWli9RlV/iHId
ftMKDZsVZRqMH5j+aPKfm1ryw/RC6jo11YaD5dMsElw1xLBIBcXFwvwRs7MqKgk4qKljXoqwz82P
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‡Þõè' | ||||