diff --git a/DESCRIPTION b/DESCRIPTION index 094ca81..abf7710 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,7 +11,9 @@ Authors@R: c( person("Brian", "Adams", email = "btadams478@gmail.com", role = "ctb", comment = "theme testing & feedback"), person("Thomas", "Wood", role = "ctb", - comment = "Significant suggestions & testing that made new features possible") + comment = "Significant suggestions & testing that made new features possible"), + person("Mathew", "Kiang", role = "ctb", + comment = "Minor fix for NA handling") ) Maintainer: Bob Rudis Description: Cartogram heatmaps are an alternative to choropleth maps for 'USA' States diff --git a/R/statebins.R b/R/statebins.R index 5433122..1fd60bb 100644 --- a/R/statebins.R +++ b/R/statebins.R @@ -43,10 +43,10 @@ #' theme_statebins(legend_position="right") statebins <- function(state_data, state_col="state", value_col="value", - dark_label = "black", light_label = "white", na_label = "white", - font_size=3, + dark_label="black", light_label="white", + na_label="white", font_size=3, state_border_col="white", state_border_size=2, - round = FALSE, radius = grid::unit(6, "pt"), + round=FALSE, radius=grid::unit(6, "pt"), ggplot2_scale_function=ggplot2::scale_fill_distiller, ...) { diff --git a/R/util.R b/R/util.R index a818050..9af4620 100644 --- a/R/util.R +++ b/R/util.R @@ -1,4 +1,5 @@ -.sb_invert <- function(hex_color, dark_color="black", light_color="white", na_color = "white") { +.sb_invert <- function(hex_color, dark_color="black", light_color="white", + na_color="white") { hex_color <- gsub("#", "", hex_color) @@ -14,7 +15,6 @@ YIQ >= 128, dark_color, light_color) ) ) - } # sanity checks for state values