Skip to contents

Default colors and cutoffs for percentile and ratio displays

Usage

ejscreen_color_defaults(type = c("pctile", "ratio", "ejscreen"))

Arguments

type

"pctile" for four color bins, "ratio" for ratios to an average, or "ejscreen" for the historical eleven EJSCREEN map bins.

Value

A list with colorbins (interior cutoffs), colorfills, and colorlabels. Percentile map endpoints 0 and 100 are not included.

Details

The settings are defined in inst/global_defaults_package.R, in global_defaults_package$default_color_coding. This function retrieves them via global_or_param(), so Shiny options override package settings. Namespace-only calls read the same file locally if defaults are not initialized. These defaults are shared by the color helpers, barplots, Excel heatmaps, and county maps. The four percentile colors cover [0, 80), [80, 90), [90, 95), and [95, 100]. Ratio cutoffs are 1.05, 2, and 3. The historical EJSCREEN scheme splits the range below 80 into eight gray bins. Labels summarize whole percentiles; fractional values use the same cutoffs. Changing the returned list does not change package defaults.

Examples

EJAM:::ejscreen_color_defaults()           # four percentile bins
EJAM:::ejscreen_color_defaults("ratio")    # ratios to an average
EJAM:::ejscreen_color_defaults("ejscreen") # eleven historical map bins