- df
The data frame with a column of full state names and a second variable column of their respective values.
The column name for the states must be "NAME". If 'df' is NULL, then only a sf object with the state geometries are returned.
- states_col
A required string (if 'df' is not NULL) that sets the column name from 'df' containing the state names of interest. These are
full state names, either capitalized or lower case.
- value_col
A required string (if 'df' is not NULL) that sets the column name from 'df' where values(discrete or continuous) are defined.
If the column has discrete values then it must be a factor.
- title
A string that sets the plot title.
- title_fontsz
A numeric that sets the title's font size. The default is 18.
- text_col
An optional string that sets the column name from 'df' for labeling each state polygon.
- text_size
A numeric value that sets the size of labeled state text.
- text_color
A string that sets the color of labeled state text.
- text_fontface
A string that sets the fontface of labeled state text.
Acceptable values: "plain", "bold", "italic", "bold.italic". The default is "plain".
- output_dir
A full directory path where the shapefile and its associated files will be downloaded.
The default is the directory defined by the value returned by tempdir().
- delete_files
A logical which if TRUE will delete the shapefile and associated files in 'output_dir'.
The default is TRUE.
- vintage
A numeric that sets the vintage of interest. The default is 2020.
- general
A logical which if TRUE will download a less detailed, more generalized version of the state geometries.
- resol
If 'general' is TRUE, then the resolution to return. Acceptable values are strings
"500k", "5m", "20m".
- na_rm
A logical which if TRUE, missing observations are removed. If FALSE, the default,
missing observations are removed with a warning.
- scale_breaks
A required string/numeric vector that defines the scale breaks.
- scale_values
A string/numeric vector that defines the possible values. For factor values, this is required
and is a vector string of colors.
- scale_limits
A required string/numeric vector that defines the scale limits.
- scale_labels
An optional string vector that defines the scale labels. Vector must be the same length
as scale_breaks.
- scale_colors
Vector of colors to use for n-color gradient.
- scale_na_value
A string that sets the color for missing values.
- own_scale
A logical which if TRUE, then your own scaling may be appended to the plot without using the above
scale_* parameters.
- sf_color
A string that sets the polygon border line color.
- sf_fill
A string that sets the polygon area fill color.
- sf_linewidth
A numeric that sets the border line thickness.
- sf_alpha
A numeric that sets the alpha level attribute of the polygon fill.
- display_plot
A logical that if TRUE will display the plot. The default is TRUE.
If FALSE, then a ggplot2 object is returned
- show_legend
A logical that controls the appearance of the legend.
- legend_pos
A string that sets the legend position. Acceptable values are "right",
"top", "bottom".
- legend_key_width
A numeric that sets the legend width in cm.
- legend_key_height
A numeric that sets the legend height in cm.
- legend_key_backgrd
A string that sets the legend's background color.