Files
civilyticsR/DESCRIPTION
jared 4f51a49903
R-CMD-check / R CMD check (pull_request) Successful in 4m20s
feat(flextable): add reusable Civilytics flextable branding helpers
Generalize the flextable brand styling and "export to PNG + stamp logo"
pattern repeated across Civilytics projects into two small functions:

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

flextable, officer, and ragg are added to Suggests (not Imports) to keep
the base install light; both functions reference them fully qualified and
guard with requireNamespace() + an install hint. Real round-trip tests
cover styling, 1-row idempotence, PNG export, and extra_height.
2026-06-22 16:53:37 -04:00

41 lines
1.1 KiB
Plaintext

Package: civilytics
Type: Package
Title: Brand Themes, Color Palettes, and Utility Functions for Civilytics
Version: 0.2.0
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 (>= 4.1.0)
Imports:
ggplot2 (>= 4.0.0),
jpeg,
jsonlite,
png,
stringr,
gridExtra,
grid,
stringdist,
showtext,
sysfonts
Encoding: UTF-8
Suggests:
testthat (>= 3.0.0),
tidycensus,
quarto,
flextable,
officer,
ragg
Config/testthat/edition: 3
Config/roxygen2/version: 8.0.0
RoxygenNote: 7.3.3