Skip to content

Commit

Permalink
add map examples
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherkenny committed Aug 15, 2023
1 parent 208406a commit a7706cf
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
9 changes: 7 additions & 2 deletions R/538.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
#' @return ggplot scale function
#'
#' @examples
#' scale_fill_538()
#' scale_color_538()
#' library(ggplot2)
#' data(oregon)
#'
#' ggplot(oregon, aes(fill = ndv / (ndv + nrv))) +
#' geom_sf(size = 0) +
#' scale_fill_538(name = '') +
#' theme_map()
#' @concept colors
#' @export
scale_fill_538 <- function(...) {
Expand Down
15 changes: 7 additions & 8 deletions R/wiki.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
#' @return ggplot scale function
#'
#' @examples
#' scale_fill_wiki_rep()
#' scale_fill_wiki_rep()
#' scale_fill_wiki_dem()
#' scale_fill_wiki_dem()
#' scale_fill_wiki_rep_pres()
#' scale_fill_wiki_rep_pres()
#' scale_fill_wiki_dem_pres()
#' scale_fill_wiki_dem_pres()
#' library(ggplot2)
#' data(oregon)
#'
#' ggplot(oregon, aes(fill = ndv / (ndv + nrv))) +
#' geom_sf(size = 0) +
#' scale_fill_wiki_dem(name = 'Dem Share') +
#' theme_map()
#' @concept colors
#' @export
scale_fill_wiki_rep <- function(...) {
Expand Down
9 changes: 7 additions & 2 deletions man/scale_538.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions man/scale_wiki.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a7706cf

Please sign in to comment.