Skip to contents

Validation

Validate a CSV data frame against the ANA metric map before flagging.

validate_csv()
Validate a CSV data frame against the ANA metric map
parse_metric_type()
Parse an ANA metric type string
get_default_reference()
Load the ANA reference JSON

Flagging

Apply ANA thresholds and roll up metric → subfactor → factor → system → preliminary flag.

flag_data()
Flag a data frame of metric values against the ANA reference
rollup_statuses()
Roll up a vector of status strings to a single status
evaluate_group_status()
Evaluate flag status for a single threshold group
compute_prelim_flags()
Apply the ANA prelim-flag decision tree to system-level statuses

Metric metadata

Traverse the reference JSON hierarchy and build flat lookup tables.

build_metric_meta_df()
Build a tidy tibble of metric metadata from reference JSON
get_all_metric_ids()
Get all metric IDs from reference JSON
get_metric_metadata()
Get metadata for a single metric by ID
build_subfactor_list()
Build a list of subfactor entries with metric codes and threshold groups

Deep-dive Excel export

Build a formatted XLSX workbook for a single unit of analysis.

build_deep_dive()
Build a deep-dive Excel workbook for a single unit of analysis
dd_col_count()
Total column count for a deep-dive sheet
dd_col_widths()
Column widths vector for a deep-dive sheet
dd_table_headers()
Table header row labels for a deep-dive sheet

Colour helpers

Pure colour utilities used by the deep-dive exporter; also useful for custom theming.

default_color_map()
Default ANA system colour map
sys_hex()
Get the base hex colour for a system
sys_text_color()
Text colour (black or white) for contrast on a system background
hex_to_argb()
Convert a CSS hex colour to Excel ARGB format
mix_with_white()
Mix a hex colour with white
luminance()
Perceived luminance of a hex colour