A serializable description of a choropleth map. Build one with
setup_ChoroplethConfig() rather than calling this constructor directly.
Usage
ChoroplethConfig(
dat_path = NULL,
title = NULL,
origin = NULL,
writer = NULL,
location = NULL,
value = NULL,
tooltip = NULL,
resolution = "country",
classification = "quantile",
num_classes = 5,
colormap = "blues",
opacity = 1,
show_boundaries = TRUE,
outline_width = 0.2,
show_legend = TRUE,
legend_position = "bottom-right",
tooltip_position = "top-right",
value_label = NULL
)Arguments
- dat_path
Optional Character: Path to the data, read at draw time. The serializable alternative to passing
datatodraw().- title
Optional Character: Chart title. Declared here because it is the one property every chart type has;
paletteis not (four take acolormapinstead), and axis labels and margins are cartesian-only.- origin
Optional Named character {"user", "default", "derived"}: Where each value came from, one entry per settable property. Absent on an authored config; written by the interface that resolved it.
- writer
Optional Named character: Which interface wrote the config, as
nameandversion. Absent on an authored config.- location
Optional Character: Column holding the region identifiers.
- value
Optional Character: Column holding the value to shade by.
- tooltip
Optional Character: Column holding per-region tooltip text.
- resolution
Character {"country", "state", "county"}: Which boundary set the locations refer to.
- classification
Character {"quantile", "equal", "jenks"}: How values are binned into classes.
- num_classes
Numeric
[2, 12]: Number of color classes.- colormap
Character: Continuous color scheme for the classes.
- opacity
Numeric
[0, 1]: Fill opacity.- show_boundaries, show_legend
Logical: Whether to draw each.
- outline_width
Numeric
[0, Inf): Boundary line width.- legend_position, tooltip_position
Character: Corner each overlay is anchored to.
- value_label
Optional Character: Label for the value in the legend and tooltip.
NULLderives it from the bound column.