Description Usage Arguments Value
Create a categorical choropleth
1 2 3 4 5 6 7 8 9 | create_base_plot_cat(
choropleth_data,
color_palette,
na_color,
drop_levels,
iceland,
are_there_missings,
unit_text
)
|
choropleth_data |
An sf object with the categorical data in column
|
color_palette |
A named character vector with colors. If you use this
with categorical variables, make sure that the color_palette has a value
for each categories except for missing values, and it is named to the
category name (factor level) as it is found in you |
na_color |
Defaults to |
drop_levels |
Weather to drop categorical levels on the choropleth
if they are not present in the data. Defaults to |
iceland |
A logical variable to show Iceland on the map. |
are_there_missings |
A logical variable if missing data is present. |
unit_text |
Defaults to |
A ggplot object containing the choropleth map.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.