Files
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

83 lines
2.0 KiB
Plaintext

# 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)
export(countNA)
export(dbSafeNames)
export(findDots)
export(get_fips)
export(get_png)
export(get_stabbr)
export(grade_level_to_num)
export(has_caption)
export(make_logo_grob)
export(match_test)
export(measure_caption)
export(na_sum)
export(na_zero)
export(nvals)
export(outersect)
export(perturb_count)
export(plot_jpeg)
export(postcode_lookup)
export(pretty_count)
export(pretty_per)
export(race_short_names)
export(random_round)
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)
importFrom(ggplot2,annotation_custom)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,theme)
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)
importFrom(png,readPNG)
importFrom(stats,qbeta)
importFrom(stats,qnorm)
importFrom(stats,runif)
importFrom(stringdist,stringsim)
importFrom(stringr,str_count)
importFrom(utils,flush.console)