Package 'ekiotable'

Title: EKIO Visual Identity System for Tables
Description: EKIO-branded styling for 'gt' tables. Applies the same brand color and type tokens used by the 'ekioplot' package, so charts and tables produced for EKIO share one visual identity.
Authors: Vinicius Oike [aut, cre, cph] (ORCID: <https://orcid.org/0009-0005-8015-9189>)
Maintainer: Vinicius Oike <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2026-10-09 12:21:28 UTC
Source: https://github.com/viniciusoike/ekiotable

Help Index


Brazilian resident population by age and sex, 2022 Census

Description

Resident population of Brazil by single year of age and sex at the 2022 Census, with each age assigned to a generation.

Usage

generations_brazil

Format

A tibble with 300 rows and 5 variables:

sexo

Sex, as recorded by IBGE: Total, Homens (men), or Mulheres (women).

idade

Age label in Portuguese, as recorded by IBGE, e.g. "1 ano", "2 anos", "100 anos ou mais".

valor

Number of residents at that age and sex.

age

Age in years, parsed from idade. Ranges from 1 to 100; the source table has no age 0.

generation

Factor with levels ordered from youngest to oldest: Alpha (1 to 11), ⁠Gen Z⁠ (12 to 27), Millennial (28 to 43), ⁠Gen X⁠ (44 to 59), Boomers (60 to 79), Elder (80 or more).

Source

IBGE, Censo Demográfico 2022, SIDRA table 9514 (sidra.ibge.gov.br/tabela/9514). Rows keep the total declared age (⁠Forma de declaração da idade = "Total"⁠) and single-year ages.

Examples

generations_brazil

Apply the EKIO Theme to GT Tables

Description

EKIO styling for gt table objects. It uses a blue column-label band, blue rules above unfilled group headings, and tabular figures for body numerals. The table sits on the same warm offwhite surface as ekioplot::theme_ekio(), so a chart and a table in one document share a background. No footer is added.

Usage

gt_theme_ekio(
  data,
  table_width = "100%",
  font_size = 14,
  stripe = TRUE,
  font_title = NULL,
  font_body = NULL,
  font_numeric = NULL,
  font_labels = NULL,
  background = "offwhite"
)

Arguments

data

A gt table object.

table_width

Character. Width of the table (default: "100%").

font_size

Numeric. Base font size in pixels (default: 14).

stripe

Logical. Apply alternating row striping (default: TRUE).

font_title, font_body, font_numeric, font_labels

A font family or registry key (lora, lato, georgia, roboto_slab, fira_code, host_grotesk, ibm_plex_mono). NULL uses the corresponding ⁠ekiotable.font_<role>⁠ option. Title and body then use ekioplot.font_title and ekioplot.font_text, respectively, before falling back to Lora and Lato. Numeric and label fonts inherit the resolved body font unless explicitly set or configured through their role option. Fonts must be available to the renderer; this function does not install them.

background

Character. Table surface, using the same vocabulary as ekioplot::theme_ekio(): "offwhite" (default, ⁠#FBFBF6⁠, a warm white), "white", "card" (⁠#FFFFFC⁠, for tables on dashboard cards), "cold" (⁠#F6F7F8⁠, a cool white), or "transparent" to let the page show through. A hex code is also accepted, though only the named surfaces are checked for contrast against the brand scales.

Value

A styled gt table object.

Examples

library(gt)
head(mtcars, 10) |>
  gt() |>
  gt_theme_ekio()

Apply a Dense Dashboard Theme to GT Tables

Description

[Experimental]

A tight theme for tables in dashboards and other dense screens. Rows are separated by thin gray rules instead of stripes, column labels are plain semibold text over a blue rule, and numeric cells use a monospace font with tabular figures. Stub, group, and summary styling follow gt_theme_hokusai(), and so do the palettes.

Usage

gt_theme_ekio_dashboard(
  data,
  density = c("compact", "dense"),
  palette = c("mountain", "wind", "blossom", "lake"),
  table_width = "100%",
  font_size = NULL,
  font_title = NULL,
  font_body = NULL,
  font_numeric = NULL,
  font_labels = NULL,
  font_stub = NULL
)

Arguments

data

A gt table object.

density

One of "compact" (default) or "dense". Compact uses 4px row padding and a 13px base size; dense uses 2px and 12px.

palette

One of "mountain" (default), "wind", "blossom", or "lake". Each uses blues and paper tones extracted from a different print.

table_width

Character. Width of the table (default: "100%").

font_size

Numeric. Body font size in pixels. NULL (default) uses the size set by density. Column labels match the body; the title is 4px larger and notes 1px smaller.

font_title, font_body, font_labels

A font family or registry key. NULL resolves as in gt_theme_ekio().

font_numeric

A font family or registry key for numeric body cells and summary values. NULL uses the ekiotable.font_numeric option and then IBM Plex Mono. The font must be available to the renderer; this function does not load it.

font_stub

A font family or registry key for stub (row label) cells. NULL uses the ekiotable.font_stub option and then the resolved body font, so row labels stay with the body typography unless you move them.

Details

Apply the theme before any cell-specific highlighting. Other font arguments and options follow gt_theme_ekio(). Dashboards usually need less than the full width; set table_width or use gt::cols_width() when a narrow table leaves a gap after the stub.

Value

A styled gt table object.

Examples

head(mtcars) |>
  gt::gt() |>
  gt_theme_ekio_dashboard()

head(mtcars) |>
  gt::gt(rownames_to_stub = TRUE) |>
  gt_theme_ekio_dashboard(density = "dense", palette = "lake")

Apply a Minimal Hokusai Theme to GT Tables

Description

The recommended theme for reports, articles, and general use. Blue typography and fine horizontal rules take their colors from Hokusai prints. Column labels sit on a blue band, body rows are striped, and color never encodes data values. No footer is added.

Usage

gt_theme_hokusai(
  data,
  palette = c("mountain", "wind", "blossom", "lake"),
  table_width = "100%",
  font_size = 14,
  stripe = TRUE,
  font_title = NULL,
  font_body = NULL,
  font_numeric = NULL,
  font_labels = NULL,
  font_stub = NULL,
  gridlines = FALSE,
  reversed = TRUE
)

Arguments

data

A gt table object.

palette

One of "mountain" (default), "wind", "blossom", or "lake". Each uses blues and paper tones extracted from a different print.

table_width

Character. Width of the table (default: "100%").

font_size

Numeric. Body font size in pixels (default: 14). Column labels and the subtitle are 2px larger, the title 8px larger, and source notes and footnotes 1px smaller.

stripe

Logical. Apply subtle alternating row shading (default: TRUE).

font_title, font_body, font_numeric, font_labels

A font family or registry key (lora, lato, georgia, roboto_slab, fira_code, host_grotesk, ibm_plex_mono). NULL uses the corresponding ⁠ekiotable.font_<role>⁠ option. Title and body then use ekioplot.font_title and ekioplot.font_text, respectively, before falling back to Lora and Lato. Numeric and label fonts inherit the resolved body font unless explicitly set or configured through their role option. Fonts must be available to the renderer; this function does not install them.

font_stub

A font family or registry key for stub (row label) cells. NULL uses the ekiotable.font_stub option and then the resolved body font, so row labels stay with the body typography unless you move them.

gridlines

Logical. Show light-gray horizontal and vertical cell rules (default: FALSE). Section and outer accent rules remain visible.

reversed

Logical. Fill column labels and spanners with the palette blue and use the palette paper color for their text and rules (default: TRUE). FALSE sets labels in dark gray on the white canvas.

Details

Four palette variants ("mountain", "wind", "blossom", "lake") pair blues with paper tones on a neutral white canvas. All palettes include a shared neutral gray scale (gray_50 to gray_900). Zebra stripes use gray_100, gridlines use gray_200, and structural dividers use gray_300.

Body text uses dark gray; subtitles and notes use a softer dark gray. Blue marks titles and summaries. Row group headings keep the body color under a blue rule. Summary rows carry no fill: a thin gray rule opens each group summary and a double blue rule opens the grand summary.

Column labels sit above the body in size and are set in semibold. Stub cells are also semibold. Families that ship semibold under a separate family name, such as Host Grotesk, are named in the label and stub font stacks so the weight resolves.

Apply the theme before any cell-specific highlighting. Font arguments and options follow gt_theme_ekio().

Value

A styled gt table object.

Examples

head(mtcars) |>
  gt::gt() |>
  gt_theme_hokusai()

head(mtcars) |>
  gt::gt() |>
  gt_theme_hokusai(palette = "lake", reversed = FALSE, gridlines = TRUE)