|
|
@ -7,3 +7,4 @@
|
||||||
^_pkgdown\.yml$
|
^_pkgdown\.yml$
|
||||||
^docs$
|
^docs$
|
||||||
^pkgdown$
|
^pkgdown$
|
||||||
|
^data-raw$
|
||||||
|
|
|
||||||
1
.gitignore
vendored
|
|
@ -3,3 +3,4 @@
|
||||||
.Rdata
|
.Rdata
|
||||||
.httr-oauth
|
.httr-oauth
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
R/test.R
|
||||||
|
|
|
||||||
62
DESCRIPTION
|
|
@ -1,23 +1,39 @@
|
||||||
Package: visualizeR
|
Package: visualizeR
|
||||||
Type: Package
|
Type: Package
|
||||||
Title: What a color! What a viz!
|
Title: What a color! What a viz!
|
||||||
Version: 0.1.0
|
Version: 0.8.9000
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
person(
|
person(
|
||||||
'Noblet', 'Guillaume',
|
'Noblet', 'Guillaume',
|
||||||
email = 'gnoblet@zaclys.net',
|
email = 'gnoblet@zaclys.net',
|
||||||
role = c('aut', 'cre')
|
role = c('aut', 'cre')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
URL: https://github.com/gnoblet/visualizeR,
|
URL: https://github.com/gnoblet/visualizeR,
|
||||||
https://gnoblet.github.io/visualizeR/
|
https://gnoblet.github.io/visualizeR/
|
||||||
Maintainer: Guillaume Noblet <gnoblet@zaclys.net>
|
Maintainer: Guillaume Noblet <gnoblet@zaclys.net>
|
||||||
Description: It basically provides colors as hex codes, color palettes, and some viz functions (graphs and maps).
|
Description: It basically provides colors as hex codes, color palettes, and some viz functions (graphs and maps).
|
||||||
Depends: R (>= 4.1.0)
|
Depends: R (>= 4.1.0)
|
||||||
License: GPL (>= 3)
|
License: GPL (>= 3)
|
||||||
Encoding: UTF-8
|
Encoding: UTF-8
|
||||||
LazyData: true
|
LazyData: true
|
||||||
RoxygenNote: 7.1.2
|
RoxygenNote: 7.2.3
|
||||||
Imports: ggplot2, rlang, grDevices, simplevis
|
Imports:
|
||||||
Suggests: knitr
|
ggplot2,
|
||||||
VignetteBuilder: knitr
|
rlang (>= 0.4.11),
|
||||||
|
grDevices,
|
||||||
|
glue,
|
||||||
|
scales,
|
||||||
|
ggtext,
|
||||||
|
ggrepel,
|
||||||
|
tidyr,
|
||||||
|
dplyr,
|
||||||
|
ggalluvial,
|
||||||
|
viridisLite,
|
||||||
|
waffle
|
||||||
|
Suggests:
|
||||||
|
knitr,
|
||||||
|
roxygen2,
|
||||||
|
sf,
|
||||||
|
tmap
|
||||||
|
VignetteBuilder: knitr
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
exportPattern("^[[:alpha:]]+")
|
exportPattern("^[^\\.]")
|
||||||
|
|
|
||||||
112
NEWS.md
|
|
@ -1,4 +1,108 @@
|
||||||
# visualizeR 0.1.0
|
# visualizeR 0.8.9000
|
||||||
|
|
||||||
* Added a `NEWS.md` file to track changes to the package.
|
* Add `waffle()`.
|
||||||
* Initiate repo
|
* Add a `pal_default()` function as a fallback for scale functions and as an initiative in `theme_reach()`. It uses `viridis::magma()`.
|
||||||
|
* Update of AGORA palettes.
|
||||||
|
* Some other small bug fixes.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.7.9000
|
||||||
|
|
||||||
|
* Add `dumbbell()`.
|
||||||
|
* Add `alluvial()`
|
||||||
|
* Add `donut()`
|
||||||
|
* Add `lollipop()`
|
||||||
|
* Add further parameters to `theme_reach()`, including grid lines args.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.6.9000
|
||||||
|
|
||||||
|
* Add `dumbbell()`.
|
||||||
|
* Add further parameters to `theme_reach()`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.5.9000
|
||||||
|
|
||||||
|
* Add wrapping of title, subtitle and caption thanks to `ggtext`
|
||||||
|
* Add wrapping of labels for `bar()` x-discrete scale.
|
||||||
|
* Add further parameters to `theme_reach()`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.4.9000
|
||||||
|
|
||||||
|
* Breaking changes: remove dependency to `ggblanket`.
|
||||||
|
* Full rewrite of `theme_reach()`.
|
||||||
|
* `bar_reach` is now `bar()` and theming is passed through argument `theme` for which default is `theme_reach()`.
|
||||||
|
* `point_reach` is now `point()` and theming is passed through argument `theme` for which default is `theme_reach()`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.3.9000
|
||||||
|
|
||||||
|
* Breaking changes: update to `ggblanket` v1.6.1.
|
||||||
|
* Add plotting functions for indicator maps.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.2.9000
|
||||||
|
|
||||||
|
* Breaking changes: almost all functions got refinements, and there are new functions, typically `hbar()` becomes `bar_reach()` and `point_reach()` is added.
|
||||||
|
* Following `theme_reach()` is now used by all plotting functions.
|
||||||
|
* Add README.md.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.1.7.9000
|
||||||
|
|
||||||
|
* Fixed some color palettes.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.1.6.9000
|
||||||
|
|
||||||
|
* IMPACT colors and palettes are added: function `cols_impact()` `pal_impact()`.
|
||||||
|
* Color palettes from REACH are added (2 to 7 continuous palettes) ; see updated `cols_reach()` and `pal_reach()`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.1.5.9000
|
||||||
|
|
||||||
|
* Move from `simplevis` to successor `ggblanket`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.1.4.9000
|
||||||
|
|
||||||
|
* `hbar()` gains a new boolean argument `reverse` to pass to `pal_reach()` or `pal_agora()`, indicating if the color palette should be reversed or not.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.1.3.9000
|
||||||
|
|
||||||
|
* Small change to `hbar()`: removes error arg within `simplevis::gg_hbar()` call.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.1.2.9000
|
||||||
|
|
||||||
|
* There was a duplicate `scale_color()` function, which should have been and is now `scale_fill()`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.1.1.9000
|
||||||
|
|
||||||
|
* Added two horizontal bar functions: `hbar()`, `hbar_percent()` (#3)
|
||||||
|
* Added some internals to check for missing columns and bad arguments (#3)
|
||||||
|
* Modified some `theme_reach()` documentation
|
||||||
|
* Add `buffer_bbox()` function to produce a buffered bbox, e.g. for use with `tmap`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# visualizeR 0.1.0
|
||||||
|
|
||||||
|
* Added a `NEWS.md` file to track changes to the package
|
||||||
|
* Initiate repo
|
||||||
|
|
|
||||||
104
R/alluvial.R
Normal file
|
|
@ -0,0 +1,104 @@
|
||||||
|
#' @title Simple alluvial chart
|
||||||
|
#'
|
||||||
|
#' @param df A data frame.
|
||||||
|
#' @param from A character column of upstream stratum.
|
||||||
|
#' @param to A character column of downstream stratum.
|
||||||
|
#' @param value A numeric column of values.
|
||||||
|
#' @param group The grouping column to fill the alluvium with.
|
||||||
|
#' @param alpha Fill transparency. Default to 0.5.
|
||||||
|
#' @param from_levels Order by given from levels?
|
||||||
|
#' @param value_title The value/y scale title. Default to NULL.
|
||||||
|
#' @param group_title The group title. Default to NULL.
|
||||||
|
#' @param title Plot title. Default to NULL.
|
||||||
|
#' @param subtitle Plot subtitle. Default to NULL.
|
||||||
|
#' @param caption Plot caption. Default to NULL.
|
||||||
|
#' @param rect_color Stratum rectangles' fill color.
|
||||||
|
#' @param rect_border_color Stratum rectangles' border color.
|
||||||
|
#' @param rect_text_color Stratum rectangles' text color.
|
||||||
|
#' @param theme Whatever theme. Default to theme_reach().
|
||||||
|
#'
|
||||||
|
#' @return A donut chart to be used parsimoniously
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
alluvial <- function(
|
||||||
|
df,
|
||||||
|
from,
|
||||||
|
to,
|
||||||
|
value,
|
||||||
|
group = NULL,
|
||||||
|
alpha = 0.5,
|
||||||
|
from_levels = NULL,
|
||||||
|
value_title = NULL,
|
||||||
|
group_title = NULL,
|
||||||
|
title = NULL,
|
||||||
|
subtitle = NULL,
|
||||||
|
caption = NULL,
|
||||||
|
rect_color = cols_reach("white"),
|
||||||
|
rect_border_color = cols_reach("main_grey"),
|
||||||
|
rect_text_color = cols_reach("main_grey"),
|
||||||
|
theme = theme_reach(axis_y = FALSE,
|
||||||
|
legend_position = "none")
|
||||||
|
){
|
||||||
|
|
||||||
|
if(!is.null(from_levels)) df <- dplyr::mutate(df, "{{from}}" := factor({{ from }}, levels = from_levels))
|
||||||
|
|
||||||
|
# General mapping
|
||||||
|
g <- ggplot2::ggplot(
|
||||||
|
data = df,
|
||||||
|
mapping = ggplot2::aes(
|
||||||
|
y = {{ value }},
|
||||||
|
axis1 = {{ from }},
|
||||||
|
axis3 = {{ to }}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add alluvium
|
||||||
|
g <- g +
|
||||||
|
ggalluvial::geom_alluvium(
|
||||||
|
ggplot2::aes(
|
||||||
|
fill = {{ group }},
|
||||||
|
color = {{ group }}
|
||||||
|
),
|
||||||
|
alpha = alpha)
|
||||||
|
|
||||||
|
# Add stratum
|
||||||
|
g <- g +
|
||||||
|
ggalluvial::geom_stratum(
|
||||||
|
fill = rect_color,
|
||||||
|
color = rect_border_color
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add stratum text
|
||||||
|
|
||||||
|
stratum <- ggalluvial::StatStratum
|
||||||
|
|
||||||
|
g <- g +
|
||||||
|
ggplot2::geom_text(
|
||||||
|
stat = stratum,
|
||||||
|
ggplot2::aes(label = ggplot2::after_stat(!!rlang::sym("stratum"))),
|
||||||
|
color = cols_reach("main_grey")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Add title, subtitle, caption, x_title, y_title
|
||||||
|
g <- g + ggplot2::labs(
|
||||||
|
y = value_title,
|
||||||
|
title = title,
|
||||||
|
subtitle = subtitle,
|
||||||
|
caption = caption,
|
||||||
|
fill = group_title,
|
||||||
|
color = group_title
|
||||||
|
)
|
||||||
|
|
||||||
|
# Remove x-axis
|
||||||
|
g <- g + ggplot2::theme(
|
||||||
|
axis.line.x = ggplot2::element_blank(),
|
||||||
|
axis.ticks.x = ggplot2::element_blank(),
|
||||||
|
axis.text.x = ggplot2::element_blank(),
|
||||||
|
axis.title.x = ggplot2::element_blank()
|
||||||
|
)
|
||||||
|
|
||||||
|
g <- g + theme
|
||||||
|
|
||||||
|
return(g)
|
||||||
|
}
|
||||||
141
R/bar.R
Normal file
|
|
@ -0,0 +1,141 @@
|
||||||
|
#' @title Simple bar chart
|
||||||
|
#'
|
||||||
|
#' @param df A data frame.
|
||||||
|
#' @param x A numeric column.
|
||||||
|
#' @param y A character column or coercible as a character column.
|
||||||
|
#' @param group Some grouping categorical column, e.g. administrative areas or population groups.
|
||||||
|
#' @param flip TRUE or FALSE. Default to TRUE or horizontal bar plot.
|
||||||
|
#' @param percent TRUE or FALSE. Should the x-labels (and text labels if present) be displayed as percentages? Default to TRUE.
|
||||||
|
#' @param wrap Should x-labels be wrapped? Number of characters.
|
||||||
|
#' @param position Should the chart be stacked? Default to "dodge". Can take "dodge" and "stack".
|
||||||
|
#' @param alpha Fill transparency.
|
||||||
|
#' @param x_title The x scale title. Default to NULL.
|
||||||
|
#' @param y_title The y scale title. Default to NULL.
|
||||||
|
#' @param group_title The group legend title. Default to NULL.
|
||||||
|
#' @param title Plot title. Default to NULL.
|
||||||
|
#' @param subtitle Plot subtitle. Default to NULL.
|
||||||
|
#' @param caption Plot caption. Default to NULL.
|
||||||
|
#' @param add_text TRUE or FALSE. Add the value as text.
|
||||||
|
#' @param add_text_suffix If percent is FALSE, should we add a suffix to the text label?
|
||||||
|
#' @param theme Whatever theme. Default to theme_reach().
|
||||||
|
#'
|
||||||
|
#' @return A bar chart
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
bar <- function(df, x, y, group = NULL, flip = TRUE, percent = TRUE, wrap = NULL, position = "dodge", alpha = 1, x_title = NULL, y_title = NULL, group_title = NULL, title = NULL, subtitle = NULL, caption = NULL, add_text = FALSE, add_text_suffix = "", theme = theme_reach()){
|
||||||
|
|
||||||
|
# To do :
|
||||||
|
# - automate bar width and text size, or at least give the flexibility and still center text
|
||||||
|
# - add facet possibility
|
||||||
|
|
||||||
|
# Prepare group, x and y names
|
||||||
|
# if (is.null(x_title)) x_title <- rlang::as_name(rlang::enquo(x))
|
||||||
|
# if (is.null(y_title)) y_title <- rlang::as_name(rlang::enquo(y))
|
||||||
|
# if (is.null(group_title)) group_title <- rlang::as_name(rlang::enquo(group))
|
||||||
|
|
||||||
|
# Mapping
|
||||||
|
g <- ggplot2::ggplot(
|
||||||
|
df,
|
||||||
|
mapping = ggplot2::aes(x = {{ x }}, y = {{ y }}, fill = {{ group }}, color = {{ group }}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add title, subtitle, caption, x_title, y_title
|
||||||
|
g <- g + ggplot2::labs(
|
||||||
|
title = title,
|
||||||
|
subtitle = subtitle,
|
||||||
|
caption = caption,
|
||||||
|
x = x_title,
|
||||||
|
y = y_title,
|
||||||
|
color = group_title,
|
||||||
|
fill = group_title
|
||||||
|
)
|
||||||
|
|
||||||
|
width <- 0.5
|
||||||
|
dodge_width <- 0.5
|
||||||
|
|
||||||
|
# Should the graph use position_fill?
|
||||||
|
if (position == "stack"){
|
||||||
|
g <- g + ggplot2::geom_col(
|
||||||
|
alpha = alpha,
|
||||||
|
width = width,
|
||||||
|
position = ggplot2::position_stack()
|
||||||
|
)
|
||||||
|
} else if (position == "dodge"){
|
||||||
|
g <- g + ggplot2::geom_col(
|
||||||
|
alpha = alpha,
|
||||||
|
width = width,
|
||||||
|
position = ggplot2::position_dodge2(
|
||||||
|
width = dodge_width,
|
||||||
|
preserve = "single")
|
||||||
|
)
|
||||||
|
} else{
|
||||||
|
g <- g + ggplot2::geom_col(
|
||||||
|
alpha = alpha,
|
||||||
|
width = width
|
||||||
|
)
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# Labels to percent and expand scale
|
||||||
|
if (percent) {
|
||||||
|
g <- g + ggplot2::scale_y_continuous(
|
||||||
|
labels = scales::label_percent(
|
||||||
|
accuracy = 1,
|
||||||
|
decimal.mark = ",",
|
||||||
|
suffix = " %"),
|
||||||
|
expand = c(0.01, 0.1)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
g <- g + ggplot2::scale_y_continuous(expand = c(0.01, 0.1))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is.null(wrap)) {
|
||||||
|
g <- g + ggplot2::scale_x_discrete(labels = scales::label_wrap(wrap))
|
||||||
|
}
|
||||||
|
|
||||||
|
# Because a text legend should always be horizontal, especially for an horizontal bar graph
|
||||||
|
if (flip){
|
||||||
|
g <- g + ggplot2::coord_flip()
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add text to bars
|
||||||
|
if (flip) hjust_flip <- 1.5 else hjust_flip <- 0.5
|
||||||
|
if (flip) vjust_flip <- 0.5 else vjust_flip <- 1.5
|
||||||
|
|
||||||
|
if (add_text & position != "dodge") {
|
||||||
|
rlang::abort("Adding text labels and positions different than dodges as not been implemented yet")
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add text labels
|
||||||
|
if (add_text) {
|
||||||
|
if (percent) {
|
||||||
|
g <- g + ggplot2::geom_text(
|
||||||
|
ggplot2::aes(
|
||||||
|
label = scales::label_percent(
|
||||||
|
accuracy = 1,
|
||||||
|
decimal.mark = ",",
|
||||||
|
suffix = " %")({{ y }}),
|
||||||
|
group = {{ group }}),
|
||||||
|
hjust = hjust_flip,
|
||||||
|
vjust = vjust_flip,
|
||||||
|
color = "white",
|
||||||
|
fontface = "bold",
|
||||||
|
position = ggplot2::position_dodge(width = dodge_width))
|
||||||
|
} else {
|
||||||
|
g <- g + ggplot2::geom_text(
|
||||||
|
ggplot2::aes(
|
||||||
|
label = paste0(round({{ y }}), add_text_suffix),
|
||||||
|
group = {{ group }}),
|
||||||
|
hjust = hjust_flip,
|
||||||
|
vjust = vjust_flip,
|
||||||
|
color = "white",
|
||||||
|
fontface = "bold",
|
||||||
|
position = ggplot2::position_dodge(width = dodge_width))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add theme
|
||||||
|
g <- g + theme
|
||||||
|
|
||||||
|
return(g)
|
||||||
|
}
|
||||||
39
R/bbox_buffer.R
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
#' @title Bbbox buffer
|
||||||
|
#'
|
||||||
|
#' @param sf_obj A `sf` object
|
||||||
|
#' @param buffer A buffer, either one value or a vector of 4 values (left, bottom, right, top). Default to 0.
|
||||||
|
#'
|
||||||
|
#' @return A bbox with a buffer
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
buffer_bbox <- function(sf_obj, buffer = 0){
|
||||||
|
|
||||||
|
rlang::check_installed("sf", reason = "Package \"sf\" needed for `buffer_bbox()` to work. Please install it.")
|
||||||
|
|
||||||
|
|
||||||
|
if (!(length(buffer) %in% c(1,4)) | !is.numeric(buffer)) stop("Please provide a numeric buffer of length 1 or 4.")
|
||||||
|
|
||||||
|
bbox <- sf::st_bbox(sf_obj)
|
||||||
|
xrange <- bbox$xmax - bbox$xmin # range of x values
|
||||||
|
yrange <- bbox$ymax - bbox$ymin # range of y values
|
||||||
|
|
||||||
|
|
||||||
|
bbox_with_buffer <- if (length(buffer) == 1) {
|
||||||
|
c(
|
||||||
|
bbox[1] - (buffer * xrange), # xmin - left
|
||||||
|
bbox[2] - (buffer * yrange), # ymin - bottom
|
||||||
|
bbox[3] + (buffer * xrange), # xmax - right
|
||||||
|
bbox[4] + (buffer * yrange) # ymax - top
|
||||||
|
)
|
||||||
|
} else if (length(buffer) == 4) {
|
||||||
|
c(
|
||||||
|
bbox[1] - (buffer[1] * xrange), # xmin - left
|
||||||
|
bbox[2] - (buffer[2] * yrange), # ymin - bottom
|
||||||
|
bbox[3] + (buffer[3] * xrange), # xmax - right
|
||||||
|
bbox[4] + (buffer[4] * yrange) # ymax - top
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
print("Missed something while writing the funtion.")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
30
R/cols_impact.R
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#' @title Function to extract IMPACT colors as hex codes
|
||||||
|
#'
|
||||||
|
#' @param ... Character names of reach colors. If NULL returns all colors
|
||||||
|
#' @param unnamed Should the output vector be unnamed? Default to `TRUE`
|
||||||
|
#'
|
||||||
|
#' @return An hex code or hex codes named or unnamed
|
||||||
|
#'
|
||||||
|
#' @details This function needs to be modified to add colors
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
cols_impact <- function(..., unnamed = TRUE) {
|
||||||
|
cols <- c(...)
|
||||||
|
|
||||||
|
colors_impact <- c(white = "#FFFFFF",
|
||||||
|
black = "#000000",
|
||||||
|
main_blue = "#315975",
|
||||||
|
main_gray = "#58585A")
|
||||||
|
|
||||||
|
if (is.null(cols)) {
|
||||||
|
cols_to_return <- colors_impact
|
||||||
|
} else {
|
||||||
|
cols_to_return <- colors_impact[cols]
|
||||||
|
}
|
||||||
|
|
||||||
|
if(unnamed){
|
||||||
|
cols_to_return <- unname(cols_to_return)
|
||||||
|
}
|
||||||
|
|
||||||
|
return(cols_to_return)
|
||||||
|
}
|
||||||
187
R/cols_reach.R
|
|
@ -11,49 +11,148 @@
|
||||||
cols_reach <- function(..., unnamed = TRUE) {
|
cols_reach <- function(..., unnamed = TRUE) {
|
||||||
cols <- c(...)
|
cols <- c(...)
|
||||||
|
|
||||||
colors_reach <- c(white = "#FFFFFF",
|
colors_reach <- c(
|
||||||
black = "#000000",
|
white = "#FFFFFF",
|
||||||
main_grey = "#58585A",
|
black = "#000000",
|
||||||
main_red = "#EE5859",
|
main_grey = "#58585A",
|
||||||
main_lt_grey = "#C7C8CA",
|
main_red = "#EE5859",
|
||||||
main_beige = "#D2CBB8",
|
main_lt_grey = "#C7C8CA",
|
||||||
iroise_1 = "#DFECEF",
|
main_beige = "#D2CBB8",
|
||||||
iroise_2 = "#B1D7E0",
|
iroise_1 = "#DFECEF",
|
||||||
iroise_3 = "#699DA3",
|
iroise_2 = "#B1D7E0",
|
||||||
iroise_4 = "#236A7A",
|
iroise_3 = "#699DA3",
|
||||||
iroise_5 = "#0C3842",
|
iroise_4 = "#236A7A",
|
||||||
red_main_1 = "#AE2829",
|
iroise_5 = "#0C3842",
|
||||||
red_main_2 = "#D05E5F",
|
red_main_1 = "#AE2829",
|
||||||
red_main_3 = "#DB9797",
|
red_main_2 = "#D05E5F",
|
||||||
red_main_4 = "#EBC7C8",
|
red_main_3 = "#DB9797",
|
||||||
red_main_5 = "#FAF2F2",
|
red_main_4 = "#EBC7C8",
|
||||||
red_alt_1 = "#792a2e",
|
red_main_5 = "#FAF2F2",
|
||||||
red_alt_2 = "#c0474a",
|
red_alt_1 = "#792a2e",
|
||||||
red_alt_3 = "#ee5859",
|
red_alt_2 = "#c0474a",
|
||||||
red_alt_4 = "#f49695",
|
red_alt_3 = "#ee5859",
|
||||||
red_alt_5 = "#f8d6d6",
|
red_alt_4 = "#f49695",
|
||||||
red_alt_na = "#f8f4f4",
|
red_alt_5 = "#f8d6d6",
|
||||||
lt_grey_1 = "#C6C6C6",
|
red_alt_na = "#f8f4f4",
|
||||||
lt_grey_2 = "#818183",
|
lt_grey_1 = "#C6C6C6",
|
||||||
grey3 = "#E3E3E3",
|
lt_grey_2 = "#818183",
|
||||||
dk_grey = "#464647",
|
grey3 = "#E3E3E3",
|
||||||
two_dots_1 = "#706441",
|
dk_grey = "#464647",
|
||||||
two_dots_2 = "#56b4e9",
|
two_dots_1 = "#706441",
|
||||||
two_dots_flashy_1 = "gold1",
|
two_dots_2 = "#56b4e9",
|
||||||
two_dots_flashy_2 = "blue2",
|
two_dots_flashy_1 = "gold1",
|
||||||
three_dots_1 = "aquamarine2",
|
two_dots_flashy_2 = "blue2",
|
||||||
three_dots_2 = "cornflowerbluer",
|
three_dots_1 = "aquamarine2",
|
||||||
three_dots_3 = "brown1",
|
three_dots_2 = "cornflowerblue",
|
||||||
orpink = "#f8aa9b",
|
three_dots_3 = "brown1",
|
||||||
pink = "#f5a6a7",
|
orpink = "#f8aa9b",
|
||||||
lt_pink = "#F9C6C7",
|
pink = "#f5a6a7",
|
||||||
hot_pink = "#ef6d6f",
|
lt_pink = "#F9C6C7",
|
||||||
mddk_red = "#bf4749",
|
hot_pink = "#ef6d6f",
|
||||||
dk_red = "#782c2e",
|
mddk_red = "#bf4749",
|
||||||
orange = "#F69E61",
|
dk_red = "#782c2e",
|
||||||
lt_green = "#B0CFAC",
|
orange = "#F69E61",
|
||||||
green = "#84A181",
|
lt_green = "#B0CFAC",
|
||||||
dk_green = "#526450")
|
green = "#84A181",
|
||||||
|
dk_green = "#526450",
|
||||||
|
red_less_4_1 = "#f6e3e3",
|
||||||
|
red_less_4_2 = "#f3b5b6",
|
||||||
|
red_less_4_3 = "#ee5a59",
|
||||||
|
red_less_4_4 = "#9d393c",
|
||||||
|
red_5_1 = "#f6e3e3",
|
||||||
|
red_5_2 = "#f3b5b6",
|
||||||
|
red_5_3 = "#ee5a59",
|
||||||
|
red_5_4 = "#c0474a",
|
||||||
|
red_5_5 = "#792a2e",
|
||||||
|
red_less_7_1 = "#f8f4f4",
|
||||||
|
red_less_7_2 = "#f8d6d6",
|
||||||
|
red_less_7_3 = "#f49695",
|
||||||
|
red_less_7_4 = "#ee5a59",
|
||||||
|
red_less_7_5 = "#c0474a",
|
||||||
|
red_less_7_6 = "#792a2e",
|
||||||
|
red_less_7_7 = "#471119",
|
||||||
|
green_2_1 = "#cce5c9",
|
||||||
|
green_2_2 = "#55a065",
|
||||||
|
green_3_1 = "#e6f2e0",
|
||||||
|
green_3_2 = "#7ebf85",
|
||||||
|
green_3_3 = "#2d8246",
|
||||||
|
green_4_1 = "#e6f2e1",
|
||||||
|
green_4_2 = "#b0d3ab",
|
||||||
|
green_4_3 = "#4bab5e",
|
||||||
|
green_4_4 = "#0c592e",
|
||||||
|
green_5_1 = "#e6f2e1",
|
||||||
|
green_5_2 = "#b0d3ab",
|
||||||
|
green_5_3 = "#6bb26a",
|
||||||
|
green_5_4 = "#229346",
|
||||||
|
green_5_5 = "#0c592e",
|
||||||
|
green_6_1 = "#e6f2e0",
|
||||||
|
green_6_2 = "#b0d3ab",
|
||||||
|
green_6_3 = "#75c376",
|
||||||
|
green_6_4 = "#086d38",
|
||||||
|
green_6_5 = "#0c592e",
|
||||||
|
green_6_6 = "#0d4420",
|
||||||
|
green_7_1 = "#fafafa",
|
||||||
|
green_7_2 = "#e6f2e0",
|
||||||
|
green_7_3 = "#b0d3ab",
|
||||||
|
green_7_4 = "#75c376",
|
||||||
|
green_7_5 = "#40ab5d",
|
||||||
|
green_7_6 = "#086d38",
|
||||||
|
green_7_7 = "#0d4420",
|
||||||
|
artichoke_2_1 = "#b6c8b1",
|
||||||
|
artichoke_2_2 = "#53755f",
|
||||||
|
artichoke_3_1 = "#e4f1db",
|
||||||
|
artichoke_3_2 = "#89a087",
|
||||||
|
artichoke_3_3 = "#455843",
|
||||||
|
artichoke_4_1 = "#e4f1db",
|
||||||
|
artichoke_4_2 = "#b5ceb2",
|
||||||
|
artichoke_4_3 = "#89a087",
|
||||||
|
artichoke_4_4 = "#465944",
|
||||||
|
artichoke_5_1 = "#e4f1db",
|
||||||
|
artichoke_5_2 = "#b5ceb2",
|
||||||
|
artichoke_5_3 = "#89a087",
|
||||||
|
artichoke_5_4 = "#60755f",
|
||||||
|
artichoke_5_5 = "#465944",
|
||||||
|
artichoke_6_1 = "#fafafa",
|
||||||
|
artichoke_6_2 = "#e4f1db",
|
||||||
|
artichoke_6_3 = "#b5ceb2",
|
||||||
|
artichoke_6_4 = "#89a087",
|
||||||
|
artichoke_6_5 = "#60755f",
|
||||||
|
artichoke_6_6 = "#455843",
|
||||||
|
artichoke_7_1 = "#fafafa",
|
||||||
|
artichoke_7_2 = "#e4f1db",
|
||||||
|
artichoke_7_3 = "#b5ceb2",
|
||||||
|
artichoke_7_4 = "#9fb89c",
|
||||||
|
artichoke_7_5 = "#89a087",
|
||||||
|
artichoke_7_6 = "#60755f",
|
||||||
|
artichoke_7_7 = "#455843",
|
||||||
|
blue_2_1 = "#7cb6c4",
|
||||||
|
blue_2_2 = "#286877 ",
|
||||||
|
blue_3_1 = "#b9d7de",
|
||||||
|
blue_3_2 = "#5ca4b4",
|
||||||
|
blue_3_3 = "#286877",
|
||||||
|
blue_4_1 = "#dfecef",
|
||||||
|
blue_4_2 = "#8fc1cc",
|
||||||
|
blue_4_3 = "#3f96aa",
|
||||||
|
blue_4_4 = "#286877",
|
||||||
|
blue_5_1 = "#dfecef",
|
||||||
|
blue_5_2 = "#8fc1cc",
|
||||||
|
blue_5_3 = "#3f96aa",
|
||||||
|
blue_5_4 = "#256a7a",
|
||||||
|
blue_5_5 = "#0c3842",
|
||||||
|
blue_6_1 = "#f4fbfe",
|
||||||
|
blue_6_2 = "#cfe4e9",
|
||||||
|
blue_6_3 = "#77b2bf",
|
||||||
|
blue_6_4 = "#4096aa",
|
||||||
|
blue_6_5 = "#256a7a",
|
||||||
|
blue_6_6 = "#0c3842",
|
||||||
|
blue_7_1 = "#f4fbfe",
|
||||||
|
blue_7_2 = "#b3d5de",
|
||||||
|
blue_7_3 = "#77b2bf",
|
||||||
|
blue_7_4 = "#4096aa",
|
||||||
|
blue_7_5 = "#27768a",
|
||||||
|
blue_7_6 = "#0c596b",
|
||||||
|
blue_7_7 = "#0c3842"
|
||||||
|
)
|
||||||
|
|
||||||
if (is.null(cols)) {
|
if (is.null(cols)) {
|
||||||
cols_to_return <- colors_reach
|
cols_to_return <- colors_reach
|
||||||
|
|
@ -61,7 +160,7 @@ cols_reach <- function(..., unnamed = TRUE) {
|
||||||
cols_to_return <- colors_reach[cols]
|
cols_to_return <- colors_reach[cols]
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unnamed){
|
if (unnamed) {
|
||||||
cols_to_return <- unname(cols_to_return)
|
cols_to_return <- unname(cols_to_return)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
93
R/data.R
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
#' Haïti admin 1 centroids shapefile.
|
||||||
|
#'
|
||||||
|
#' A multipoint shapefile of Haiti's admin 1.
|
||||||
|
#'
|
||||||
|
#' @format A sf multipoint object with 10 features and 9 fields:
|
||||||
|
#' \describe{
|
||||||
|
#' \item{ADM1_PC}{Admin 1 postal code.}
|
||||||
|
#' \item{ADM1_EN}{Full name in English.}
|
||||||
|
#' \item{ADM1_FR}{Full name in French.}
|
||||||
|
#' \item{ADM1_HT}{Full name in Haitian Creole.}
|
||||||
|
#' \item{ADM0_EN}{Country name in English.}
|
||||||
|
#' \item{ADM0_FR}{Country name in French.}
|
||||||
|
#' \item{ADM0_HT}{Country name in Haitian Creole.}
|
||||||
|
#' \item{ADM0_PC}{Country postal code.}
|
||||||
|
#' \item{ADM1_FR_UPPER}{Admin 1 French name - uppercase.}
|
||||||
|
#' \item{geometry}{Multipoint geometry.}
|
||||||
|
#' }
|
||||||
|
"centroid_admin1"
|
||||||
|
|
||||||
|
|
||||||
|
#' Indicator admin 1 polygons shapefile.
|
||||||
|
#'
|
||||||
|
#' A multipolygon shapefile of Haiti's admin 1 with an indicator column 'opn_dfc'.
|
||||||
|
#'
|
||||||
|
#' @format A sf multipoint object with 10 features and 10 fields:
|
||||||
|
#' \describe{
|
||||||
|
#' \item{ADM1_PC}{Admin 1 postal code.}
|
||||||
|
#' \item{admin1}{Admin 1 unique id.}
|
||||||
|
#' \item{opn_dfc}{Proportion of HHs that reported open defecation as sanitation facility.}
|
||||||
|
#' \item{ADM1_EN}{Full name in English.}
|
||||||
|
#' \item{ADM1_FR}{Full name in French.}
|
||||||
|
#' \item{ADM1_HT}{Full name in Haitian Creole.}
|
||||||
|
#' \item{ADM0_EN}{Country name in English.}
|
||||||
|
#' \item{ADM0_FR}{Country name in French.}
|
||||||
|
#' \item{ADM0_HT}{Country name in Haitian Creole.}
|
||||||
|
#' \item{ADM0_PC}{Country postal code.}
|
||||||
|
#' \item{geometry}{Multipolygon geometry.}
|
||||||
|
#' }
|
||||||
|
"indicator_admin1"
|
||||||
|
|
||||||
|
|
||||||
|
#' Haïti admin 1 lines shapefile.
|
||||||
|
#'
|
||||||
|
#' A multiline shapefile of Haiti's admin 1.
|
||||||
|
#'
|
||||||
|
#' @format A sf multiline object with 10 features and 8 fields:
|
||||||
|
#' \describe{
|
||||||
|
#' \item{ADM1_EN}{Full name in English.}
|
||||||
|
#' \item{ADM1_FR}{Full name in French.}
|
||||||
|
#' \item{ADM1_HT}{Full name in Haitian Creole.}
|
||||||
|
#' \item{ADM0_EN}{Country name in English.}
|
||||||
|
#' \item{ADM0_FR}{Country name in French.}
|
||||||
|
#' \item{ADM0_HT}{Country name in Haitian Creole.}
|
||||||
|
#' \item{ADM0_PCODE}{Country postal code.}
|
||||||
|
#' \item{geometry}{Multiline geometry.}
|
||||||
|
#' }
|
||||||
|
"line_admin1"
|
||||||
|
|
||||||
|
|
||||||
|
#' Haïti border.
|
||||||
|
#'
|
||||||
|
#' A multiline shapefile of Haiti's border.
|
||||||
|
#'
|
||||||
|
#' @format A sf multiline objet with 1 feature and 6 fields:
|
||||||
|
#' \describe{
|
||||||
|
#' \item{fid_1}{fid_1}
|
||||||
|
#' \item{uno}{uno}
|
||||||
|
#' \item{count}{count}
|
||||||
|
#' \item{x_coord}{x_coord}
|
||||||
|
#' \item{y_coord}{y_coord}
|
||||||
|
#' \item{area}{area}
|
||||||
|
#' \item{geometry}{Multiline geometry.}
|
||||||
|
#' }
|
||||||
|
"border_admin0"
|
||||||
|
|
||||||
|
|
||||||
|
#' Haïti frontier with Dominican Republic.
|
||||||
|
#'
|
||||||
|
#' A multiline shapefile of Haiti's frontier with Dominican Republic.
|
||||||
|
#'
|
||||||
|
#' @format A sf multipoint objet with 4 features and 8 fields:
|
||||||
|
#' \describe{
|
||||||
|
#' \item{fid_1}{fid_1}
|
||||||
|
#' \item{objectid}{objectid}
|
||||||
|
#' \item{id}{id}
|
||||||
|
#' \item{fromnode}{fromnode}
|
||||||
|
#' \item{tonode}{tonode}
|
||||||
|
#' \item{leftpolygo}{leftpolygo}
|
||||||
|
#' \item{rightpolygo}{rightpolygo}
|
||||||
|
#' \item{shape_leng}{shape_leng}
|
||||||
|
#' \item{geometry}{Multiline geometry.}
|
||||||
|
#' }
|
||||||
|
"frontier_admin0"
|
||||||
107
R/donut.R
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
#' @title Simple donut chart (to be used parsimoniously), can be a pie chart
|
||||||
|
#'
|
||||||
|
#' @param df A data frame.
|
||||||
|
#' @param x A character column or coercible as a character column. Will give the donut's fill color.
|
||||||
|
#' @param y A numeric column.
|
||||||
|
#' @param alpha Fill transparency.
|
||||||
|
#' @param x_title The x scale title. Default to NULL.
|
||||||
|
#' @param title Plot title. Default to NULL.
|
||||||
|
#' @param subtitle Plot subtitle. Default to NULL.
|
||||||
|
#' @param caption Plot caption. Default to NULL.
|
||||||
|
#' @param arrange TRUE or FALSE. Arrange by highest percentage first.
|
||||||
|
#' @param hole_size Hole size. Default to 3. If less than 2, back to a pie chart.
|
||||||
|
#' @param add_text TRUE or FALSE. Add the value as text.
|
||||||
|
#' @param add_text_treshold_display Minimum value to add the text label.
|
||||||
|
#' @param add_text_color Text color.
|
||||||
|
#' @param add_text_suffix If percent is FALSE, should we add a suffix to the text label?
|
||||||
|
#' @param theme Whatever theme. Default to theme_reach().
|
||||||
|
#'
|
||||||
|
#' @return A donut chart to be used parsimoniously
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
donut <- function(df,
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
alpha = 1,
|
||||||
|
x_title = NULL,
|
||||||
|
title = NULL,
|
||||||
|
subtitle = NULL,
|
||||||
|
caption = NULL,
|
||||||
|
arrange = TRUE,
|
||||||
|
hole_size = 3,
|
||||||
|
add_text = TRUE,
|
||||||
|
add_text_treshold_display = 5, add_text_color = "white", add_text_suffix = "", theme = theme_reach(legend_reverse = TRUE)){
|
||||||
|
|
||||||
|
# Arrange by biggest prop first ?
|
||||||
|
if (arrange) df <- dplyr::arrange(
|
||||||
|
df,
|
||||||
|
{{ y }}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Get levels for scaling
|
||||||
|
lev <- dplyr::pull(df, {{ x }})
|
||||||
|
df <- dplyr::mutate(df, "{{x}}" := factor({{ x }}, levels = lev))
|
||||||
|
|
||||||
|
# Mapping
|
||||||
|
g <- ggplot2::ggplot(
|
||||||
|
df,
|
||||||
|
mapping = ggplot2::aes(
|
||||||
|
x = hole_size,
|
||||||
|
y = {{ y }},
|
||||||
|
fill = {{ x }},
|
||||||
|
color = {{ x }}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add rect
|
||||||
|
g <- g + ggplot2::geom_col(alpha = alpha)
|
||||||
|
|
||||||
|
|
||||||
|
# Add text labels
|
||||||
|
if (add_text) {
|
||||||
|
|
||||||
|
df <- dplyr::mutate(df, y_treshold = ifelse({{ y }} >= add_text_treshold_display, {{ y }}, NA ))
|
||||||
|
|
||||||
|
g <- g +
|
||||||
|
ggplot2::geom_text(
|
||||||
|
data = df,
|
||||||
|
ggplot2::aes(
|
||||||
|
x = hole_size,
|
||||||
|
y = !!rlang::sym("y_treshold"),
|
||||||
|
label = paste0({{ y }}, add_text_suffix)),
|
||||||
|
color = add_text_color,
|
||||||
|
position = ggplot2::position_stack(vjust = 0.5))
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add title, subtitle, caption, x_title, y_title
|
||||||
|
g <- g + ggplot2::labs(
|
||||||
|
title = title,
|
||||||
|
subtitle = subtitle,
|
||||||
|
caption = caption,
|
||||||
|
fill = x_title,
|
||||||
|
color = x_title
|
||||||
|
)
|
||||||
|
|
||||||
|
# Transform to polar coordinates and adjust hole
|
||||||
|
g <- g +
|
||||||
|
ggplot2::coord_polar(
|
||||||
|
theta = "y"
|
||||||
|
)
|
||||||
|
|
||||||
|
if (hole_size >= 2) g <- g + ggplot2::xlim(c(1, hole_size + 0.5)) # Try to remove that to see how to make a pie chart
|
||||||
|
|
||||||
|
# Add theme
|
||||||
|
g <- g + theme
|
||||||
|
|
||||||
|
# No axis
|
||||||
|
g <- g + ggplot2::theme(
|
||||||
|
axis.text = ggplot2::element_blank(),
|
||||||
|
axis.line = ggplot2::element_blank(),
|
||||||
|
axis.ticks = ggplot2::element_blank(),
|
||||||
|
axis.title = ggplot2::element_blank()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
return(g)
|
||||||
|
|
||||||
|
}
|
||||||
161
R/dumbbell.R
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
#' Make dumbbell chart.
|
||||||
|
#'
|
||||||
|
#' @param df A data frame.
|
||||||
|
#' @param col A numeric column.
|
||||||
|
#' @param group_x The grouping column on the x-axis; only two groups.
|
||||||
|
#' @param group_y The grouping column on the y-axis.
|
||||||
|
#' @param point_size Point size.
|
||||||
|
#' @param point_alpha Point alpha.
|
||||||
|
#' @param segment_size Segment size.
|
||||||
|
#' @param segment_color Segment color.
|
||||||
|
#' @param group_x_title X-group and legend title.
|
||||||
|
#' @param group_y_title Y-axis and group title.
|
||||||
|
#' @param x_title X-axis title.
|
||||||
|
#' @param title Title.
|
||||||
|
#' @param subtitle Subtitle.
|
||||||
|
#' @param caption Caption.
|
||||||
|
#' @param line_to_y_axis TRUE or FALSE; add a line connected points and Y-axis.
|
||||||
|
#' @param line_to_y_axis_type Line to Y-axis type.
|
||||||
|
#' @param line_to_y_axis_width Line to Y-axis width.
|
||||||
|
#' @param line_to_y_axis_color Line to Y-axis color.
|
||||||
|
#' @param add_text TRUE or FALSE; add text at the points.
|
||||||
|
#' @param add_text_vjust Vertical adjustment.
|
||||||
|
#' @param add_text_size Text size.
|
||||||
|
#' @param add_text_color Text color.
|
||||||
|
#' @param theme A ggplot2 theme, default to `theme_reach()`
|
||||||
|
#'
|
||||||
|
#' @return A dumbbell chart.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
dumbbell <- function(df,
|
||||||
|
col,
|
||||||
|
group_x,
|
||||||
|
group_y,
|
||||||
|
point_size = 5,
|
||||||
|
point_alpha = 1,
|
||||||
|
segment_size = 2.5,
|
||||||
|
segment_color = cols_reach("main_lt_grey"),
|
||||||
|
group_x_title = NULL,
|
||||||
|
group_y_title = NULL,
|
||||||
|
x_title = NULL,
|
||||||
|
title = NULL,
|
||||||
|
subtitle = NULL,
|
||||||
|
caption = NULL,
|
||||||
|
line_to_y_axis = TRUE,
|
||||||
|
line_to_y_axis_type = 3,
|
||||||
|
line_to_y_axis_width = 0.5,
|
||||||
|
line_to_y_axis_color = cols_reach("main_grey"),
|
||||||
|
add_text = TRUE,
|
||||||
|
add_text_vjust = 2,
|
||||||
|
add_text_size = 3.5,
|
||||||
|
add_text_color = cols_reach("main_grey"),
|
||||||
|
theme = theme_reach(palette = "primary")){
|
||||||
|
|
||||||
|
# Get group keys
|
||||||
|
group_x_keys <- df |>
|
||||||
|
dplyr::group_by({{ group_x }}) |>
|
||||||
|
dplyr::group_keys() |>
|
||||||
|
dplyr::pull()
|
||||||
|
|
||||||
|
# Check if only two groups
|
||||||
|
if (length(group_x_keys) > 2) rlang::abort("Cannot draw a dumbbell plot for `group_x` with more than 2 groups")
|
||||||
|
|
||||||
|
# Pivot long data
|
||||||
|
df_pivot <- df |>
|
||||||
|
tidyr::pivot_wider(
|
||||||
|
id_cols = c({{ group_y}}),
|
||||||
|
values_from = {{ col }},
|
||||||
|
names_from = {{ group_x }}
|
||||||
|
)
|
||||||
|
|
||||||
|
df_pivot <- df_pivot |>
|
||||||
|
dplyr::rowwise() |>
|
||||||
|
dplyr::mutate(
|
||||||
|
min = min(!!rlang::sym(group_x_keys[[1]]), !!rlang::sym(group_x_keys[[2]]), na.rm = T),
|
||||||
|
max = max(!!rlang::sym(group_x_keys[[1]]), !!rlang::sym(group_x_keys[[2]]), na.rm = T)) |>
|
||||||
|
dplyr::ungroup() |>
|
||||||
|
dplyr::mutate(diff = max - min)
|
||||||
|
|
||||||
|
g <- ggplot2::ggplot(df_pivot)
|
||||||
|
|
||||||
|
# Add line
|
||||||
|
if(line_to_y_axis) {
|
||||||
|
|
||||||
|
xend <- min(dplyr::pull(df, {{ col }}))
|
||||||
|
|
||||||
|
g <- g +
|
||||||
|
ggplot2::geom_segment(
|
||||||
|
ggplot2::aes(
|
||||||
|
x = min,
|
||||||
|
y = {{ group_y }},
|
||||||
|
yend = {{ group_y }}),
|
||||||
|
xend = xend,
|
||||||
|
linetype = line_to_y_axis_type,
|
||||||
|
size = line_to_y_axis_width,
|
||||||
|
color = line_to_y_axis_color)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add segment
|
||||||
|
g <- g +
|
||||||
|
ggplot2::geom_segment(
|
||||||
|
ggplot2::aes(
|
||||||
|
x = !!rlang::sym(group_x_keys[[1]]),
|
||||||
|
y = {{ group_y }},
|
||||||
|
xend = !!rlang::sym(group_x_keys[[2]]),
|
||||||
|
yend = {{ group_y }}),
|
||||||
|
size = segment_size,
|
||||||
|
color = segment_color
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add points
|
||||||
|
g <- g +
|
||||||
|
ggplot2::geom_point(
|
||||||
|
data = df,
|
||||||
|
ggplot2::aes(
|
||||||
|
x = {{ col }},
|
||||||
|
y = {{ group_y }},
|
||||||
|
color = {{ group_x }},
|
||||||
|
fill = {{ group_x }}
|
||||||
|
),
|
||||||
|
size = point_size,
|
||||||
|
alpha = point_alpha
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add title, subtitle, caption, x_title, y_title
|
||||||
|
g <- g + ggplot2::labs(
|
||||||
|
title = title,
|
||||||
|
subtitle = subtitle,
|
||||||
|
caption = caption,
|
||||||
|
x = x_title,
|
||||||
|
y = group_y_title,
|
||||||
|
color = group_x_title,
|
||||||
|
fill = group_x_title
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add stat labels to points
|
||||||
|
if(add_text) g <- g +
|
||||||
|
ggrepel::geom_text_repel(
|
||||||
|
data = df,
|
||||||
|
ggplot2::aes(
|
||||||
|
x = {{ col }},
|
||||||
|
y = {{ group_y}},
|
||||||
|
label = {{ col }}
|
||||||
|
),
|
||||||
|
vjust = add_text_vjust,
|
||||||
|
size = add_text_size,
|
||||||
|
color = add_text_color
|
||||||
|
)
|
||||||
|
|
||||||
|
# Expan y axis
|
||||||
|
# g <- g +
|
||||||
|
# ggplot2::scale_y_discrete(
|
||||||
|
# group_y_title,
|
||||||
|
# expand = c(0, 0))
|
||||||
|
|
||||||
|
|
||||||
|
# Add theme
|
||||||
|
g <- g + theme
|
||||||
|
|
||||||
|
return(g)
|
||||||
|
|
||||||
|
}
|
||||||
95
R/internals.R
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
#' @title Abord bad argument
|
||||||
|
#'
|
||||||
|
#' @param arg An argument
|
||||||
|
#' @param must What arg must be
|
||||||
|
#' @param not Optional. What arg must not be.
|
||||||
|
#'
|
||||||
|
#' @return A stop statement
|
||||||
|
abort_bad_argument <- function(arg, must, not = NULL) {
|
||||||
|
msg <- glue::glue("`{arg}` must {must}")
|
||||||
|
if (!is.null(not)) {
|
||||||
|
not <- typeof(not)
|
||||||
|
msg <- glue::glue("{msg}; not {not}.")
|
||||||
|
}
|
||||||
|
|
||||||
|
rlang::abort("error_bad_argument",
|
||||||
|
message = msg,
|
||||||
|
arg = arg,
|
||||||
|
must = must,
|
||||||
|
not = not
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' @title Stop statement "If not in colnames" with colnames
|
||||||
|
#'
|
||||||
|
#' @param .tbl A tibble
|
||||||
|
#' @param cols A vector of column names (quoted)
|
||||||
|
#' @param df Provide the tibble name as a character string
|
||||||
|
#' @param arg Default to NULL.
|
||||||
|
#'
|
||||||
|
#' @return A stop statement
|
||||||
|
if_not_in_stop <- function(.tbl, cols, df, arg = NULL){
|
||||||
|
if (is.null(arg)) {
|
||||||
|
msg <- glue::glue("The following column/s is/are missing in `{df}`:")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
msg <- glue::glue("The following column/s from `{arg}` is/are missing in `{df}`:")
|
||||||
|
}
|
||||||
|
if (!all(cols %in% colnames(.tbl))) {
|
||||||
|
rlang::abort(
|
||||||
|
c("Missing columns",
|
||||||
|
"*" =
|
||||||
|
paste(
|
||||||
|
msg,
|
||||||
|
paste(
|
||||||
|
subvec_not_in(cols, colnames(.tbl)),
|
||||||
|
collapse = ", ")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' @title Stop statement "If not in vector"
|
||||||
|
#'
|
||||||
|
#' @param vec A vector of character strings
|
||||||
|
#' @param cols A set of character strings
|
||||||
|
#' @param vec_name Provide the vector name as a character string
|
||||||
|
#' @param arg Default to NULL.
|
||||||
|
#'
|
||||||
|
#' @return A stop statement if some elements of vec are not in cols
|
||||||
|
if_vec_not_in_stop <- function(vec, cols, vec_name, arg = NULL){
|
||||||
|
if (is.null(arg)) {
|
||||||
|
msg <- glue::glue("The following element/s is/are missing in `{vec_name}`:")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
msg <- glue::glue("The following element/s from `{arg}` is/are missing in `{vec_name}`:")
|
||||||
|
}
|
||||||
|
if (!all(cols %in% vec)) {
|
||||||
|
rlang::abort(
|
||||||
|
c("Missing elements",
|
||||||
|
"*" =
|
||||||
|
paste(
|
||||||
|
msg,
|
||||||
|
paste(
|
||||||
|
subvec_not_in(cols, vec),
|
||||||
|
collapse = ", ")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @title Subvec not in
|
||||||
|
#'
|
||||||
|
#' @param vector A vector to subset
|
||||||
|
#' @param set A set-vector
|
||||||
|
#'
|
||||||
|
#' @return A subset of vector not in set
|
||||||
|
subvec_not_in <- function(vector, set){
|
||||||
|
vector[!(vector %in% set)]
|
||||||
|
}
|
||||||
121
R/lollipop.R
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
#' @title Simple bar chart
|
||||||
|
#'
|
||||||
|
#' @param df A data frame.
|
||||||
|
#' @param x A numeric column.
|
||||||
|
#' @param y A character column or coercible as a character column.
|
||||||
|
#' @param flip TRUE or FALSE. Default to TRUE or horizontal lollipop plot.
|
||||||
|
#' @param wrap Should x-labels be wrapped? Number of characters.
|
||||||
|
#' @param arrange TRUE or FALSE. Arrange by highest percentage first.
|
||||||
|
#' @param point_size Point size.
|
||||||
|
#' @param point_color Point color.
|
||||||
|
#' @param point_alpha Point alpha.
|
||||||
|
#' @param segment_size Segment size.
|
||||||
|
#' @param segment_color Segment color.
|
||||||
|
#' @param segment_alpha Segment alpha.
|
||||||
|
#' @param alpha Fill transparency.
|
||||||
|
#' @param x_title The x scale title. Default to NULL.
|
||||||
|
#' @param y_title The y scale title. Default to NULL.
|
||||||
|
#' @param title Plot title. Default to NULL.
|
||||||
|
#' @param subtitle Plot subtitle. Default to NULL.
|
||||||
|
#' @param caption Plot caption. Default to NULL.
|
||||||
|
#' @param add_text TRUE or FALSE. Add the y value as text within the bubble.
|
||||||
|
#' @param add_text_size Text size.
|
||||||
|
#' @param add_text_suffix If percent is FALSE, should we add a suffix to the text label?
|
||||||
|
#' @param add_text_color Added text color. Default to white.
|
||||||
|
#' @param add_text_fontface Added text font face. Default to "bold".
|
||||||
|
#' @param theme Whatever theme. Default to theme_reach().
|
||||||
|
#'
|
||||||
|
#' @return A bar chart
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
lollipop <- function(df,
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
flip = TRUE,
|
||||||
|
wrap = NULL,
|
||||||
|
arrange = TRUE,
|
||||||
|
point_size = 3,
|
||||||
|
point_color = cols_reach("main_red"),
|
||||||
|
point_alpha = 1,
|
||||||
|
segment_size = 1,
|
||||||
|
segment_color = cols_reach("main_grey"),
|
||||||
|
segment_alpha = 1,
|
||||||
|
alpha = 1,
|
||||||
|
x_title = NULL,
|
||||||
|
y_title = NULL,
|
||||||
|
title = NULL,
|
||||||
|
subtitle = NULL,
|
||||||
|
caption = NULL,
|
||||||
|
add_text = FALSE,
|
||||||
|
add_text_size = 3,
|
||||||
|
add_text_suffix = "",
|
||||||
|
add_text_color = "white",
|
||||||
|
add_text_fontface = "bold",
|
||||||
|
theme = theme_reach()){
|
||||||
|
|
||||||
|
|
||||||
|
# Arrange by biggest prop first ?
|
||||||
|
if (arrange) df <- dplyr::arrange(
|
||||||
|
df,
|
||||||
|
{{ y }}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Get levels for scaling
|
||||||
|
lev <- dplyr::pull(df, {{ x }})
|
||||||
|
df <- dplyr::mutate(df, "{{x}}" := factor({{ x }}, levels = lev))
|
||||||
|
|
||||||
|
# Mapping
|
||||||
|
g <- ggplot2::ggplot(
|
||||||
|
df,
|
||||||
|
mapping = ggplot2::aes(x = {{ x }}, y = {{ y }}, xend = {{ x }}, yend = 0)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add segment
|
||||||
|
g <- g + ggplot2::geom_segment(
|
||||||
|
linewidth = segment_size,
|
||||||
|
alpha = segment_alpha,
|
||||||
|
color = segment_color
|
||||||
|
)
|
||||||
|
|
||||||
|
g <- g + ggplot2::geom_point(
|
||||||
|
size = point_size,
|
||||||
|
alpha = point_alpha,
|
||||||
|
color = point_color
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!is.null(wrap)) {
|
||||||
|
g <- g + ggplot2::scale_x_discrete(labels = scales::label_wrap(wrap))
|
||||||
|
}
|
||||||
|
|
||||||
|
# Because a text legend should always be horizontal, especially for an horizontal bar graph
|
||||||
|
if (flip){
|
||||||
|
g <- g + ggplot2::coord_flip()
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add text labels
|
||||||
|
if (add_text) {
|
||||||
|
g <- g + ggplot2::geom_text(
|
||||||
|
ggplot2::aes(
|
||||||
|
label = paste0({{ y }}, add_text_suffix)),
|
||||||
|
size = add_text_size,
|
||||||
|
color = add_text_color,
|
||||||
|
fontface = add_text_fontface)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add title, subtitle, caption, x_title, y_title
|
||||||
|
g <- g + ggplot2::labs(
|
||||||
|
title = title,
|
||||||
|
subtitle = subtitle,
|
||||||
|
caption = caption,
|
||||||
|
x = x_title,
|
||||||
|
y = y_title,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Add theme
|
||||||
|
g <- g + theme
|
||||||
|
|
||||||
|
return(g)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
354
R/map.R
Normal file
|
|
@ -0,0 +1,354 @@
|
||||||
|
|
||||||
|
|
||||||
|
#' Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values
|
||||||
|
#'
|
||||||
|
#' @param poly Multipolygon shape defined by sf package.
|
||||||
|
#' @param col Numeric attribute to map.
|
||||||
|
#' @param buffer A buffer, either one value or a vector of 4 values (left, bottom, right, top).
|
||||||
|
#' @param n The desire number of classes.
|
||||||
|
#' @param style Method to process the color scale for continuous numerical variables. See `classInt::classIntervals()` for details.
|
||||||
|
#' @param palette Vector of fill colors as hexadecimal values. For REACH color palettes, it is possible to use `pal_reach()`. For now,'palette' must be changed manually, accordingly to the number of drawn classes.
|
||||||
|
#' @param as_count Boolean. When col is a numeric variable, should it be processed as a count variable? For instance, 0, 1-10, 11-20.
|
||||||
|
#' @param color_na Fill color for missing data.
|
||||||
|
#' @param text_na Legend text for missing data.
|
||||||
|
#' @param legend_title Legend title.
|
||||||
|
#' @param legend_text_separator Text separator for classes. E.g. " to " will give 0, 1 to 10, 11 to 20.
|
||||||
|
#' @param border_alpha Transparency of the border.
|
||||||
|
#' @param border_col Color of the border.
|
||||||
|
#' @param lwd Linewidth of the border.
|
||||||
|
#' @param ... Other arguments to pass to `tmap::tm_polygons()`.
|
||||||
|
#'
|
||||||
|
#' @return A tmap layer.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
add_indicator_layer <- function(
|
||||||
|
poly,
|
||||||
|
col,
|
||||||
|
buffer = NULL,
|
||||||
|
n = 5,
|
||||||
|
style = "pretty",
|
||||||
|
palette = pal_reach("red_5"),
|
||||||
|
as_count = TRUE,
|
||||||
|
color_na = cols_reach("white"),
|
||||||
|
text_na = "Missing data",
|
||||||
|
legend_title = "Proportion (%)",
|
||||||
|
legend_text_separator = " - ",
|
||||||
|
border_alpha = 1,
|
||||||
|
border_col = cols_reach("lt_grey_1"),
|
||||||
|
lwd = 1,
|
||||||
|
...){
|
||||||
|
|
||||||
|
#------ Checks and make valid
|
||||||
|
|
||||||
|
rlang::check_installed("tmap", reason = "Package \"tmap\" needed for `add_indicator_layer()` to work. Please install it.")
|
||||||
|
|
||||||
|
poly <- sf::st_make_valid(poly)
|
||||||
|
|
||||||
|
#------ Other checks
|
||||||
|
|
||||||
|
col_name <- rlang::as_name(rlang::enquo(col))
|
||||||
|
if_not_in_stop(poly, col_name, "poly", "col")
|
||||||
|
|
||||||
|
if (!is.numeric(poly[[col_name]])) rlang::abort(glue::glue("{col_name} is not numeric."))
|
||||||
|
|
||||||
|
|
||||||
|
#------ Prepare data
|
||||||
|
|
||||||
|
if(!is.null(buffer)){ buffer <- buffer_bbox(poly, buffer) } else { buffer <- NULL }
|
||||||
|
|
||||||
|
|
||||||
|
#------ Polygon layer
|
||||||
|
|
||||||
|
layer <- tmap::tm_shape(
|
||||||
|
poly,
|
||||||
|
bbox = buffer
|
||||||
|
) +
|
||||||
|
tmap::tm_polygons(
|
||||||
|
col = col_name,
|
||||||
|
n = n,
|
||||||
|
style = style,
|
||||||
|
palette = palette,
|
||||||
|
as.count = as_count,
|
||||||
|
colorNA = color_na,
|
||||||
|
textNA = text_na,
|
||||||
|
title = legend_title,
|
||||||
|
legend.format = list(text.separator = legend_text_separator),
|
||||||
|
borderl.col = border_col,
|
||||||
|
border.alpha = border_alpha,
|
||||||
|
lwd = lwd,
|
||||||
|
...
|
||||||
|
)
|
||||||
|
|
||||||
|
return(layer)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' Add admin boundaries (lines) and the legend
|
||||||
|
#'
|
||||||
|
#' @param lines List of multiline shape defined by sf package.
|
||||||
|
#' @param colors Vector of hexadecimal codes. Same order as lines.
|
||||||
|
#' @param labels Vector of labels in the legend. Same order as lines.
|
||||||
|
#' @param lwds Vector of line widths. Same order as lines.
|
||||||
|
#' @param title Legend title.
|
||||||
|
#' @param buffer A buffer, either one value or a vector of 4 values (left, bottom, right, top).
|
||||||
|
#' @param ... Other arguments to pass to each shape in `tmap::tm_lines()`.
|
||||||
|
#'
|
||||||
|
#' @return A tmap layer.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
add_admin_boundaries <- function(lines, colors, labels, lwds, title = "", buffer = NULL, ...){
|
||||||
|
|
||||||
|
|
||||||
|
#------ Package check
|
||||||
|
|
||||||
|
rlang::check_installed("tmap", reason = "Package \"tmap\" needed for `add_admin_boundaries()` to work. Please install it.")
|
||||||
|
|
||||||
|
|
||||||
|
#------ Check that the length of vectors is identical between arguments
|
||||||
|
|
||||||
|
if(!inherits(lines, "list")) rlang::abort("Please provide a list for lines.")
|
||||||
|
|
||||||
|
ll <- list(lines, colors, labels, lwds)
|
||||||
|
if (!all(sapply(ll,length) == length(ll[[1]]))) rlang::abort("lines, colors, labels, lwds do not all have the same length.")
|
||||||
|
|
||||||
|
|
||||||
|
#------ Make valid
|
||||||
|
|
||||||
|
lines <- lapply(lines, \(x) sf::st_make_valid(x))
|
||||||
|
|
||||||
|
|
||||||
|
#------ Prepare legend
|
||||||
|
legend_lines <- tmap::tm_add_legend("line",
|
||||||
|
title = title,
|
||||||
|
col = colors,
|
||||||
|
lwd = lwds,
|
||||||
|
labels = labels)
|
||||||
|
|
||||||
|
|
||||||
|
#------ Let's go with all line shapes
|
||||||
|
|
||||||
|
if(!is.null(buffer)){ buffer <- buffer_bbox(lines[[1]], buffer) } else { buffer <- NULL }
|
||||||
|
|
||||||
|
|
||||||
|
layers <- tmap::tm_shape(lines[[1]], bbox = buffer) +
|
||||||
|
tmap::tm_lines(lwd = lwds[[1]], col = colors[[1]], ...)
|
||||||
|
|
||||||
|
if (length(lines) == 1) {
|
||||||
|
|
||||||
|
layers <- layers + legend_lines
|
||||||
|
|
||||||
|
return(layers)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
for(i in 2:length(lines)){
|
||||||
|
|
||||||
|
layers <- layers + tmap::tm_shape(shp = lines[[i]]) + tmap::tm_lines(lwd = lwds[[i]], col = colors[[i]], ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
layers <- layers + legend_lines
|
||||||
|
|
||||||
|
return(layers)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' Basic defaults based on `tmap::tm_layout()`
|
||||||
|
#'
|
||||||
|
#' @param title Map title.
|
||||||
|
#' @param legend_position Legend position. Not above the map is a good start.
|
||||||
|
#' @param frame Boolean. Legend frame?
|
||||||
|
#' @param legend_frame Legend frame color.
|
||||||
|
#' @param legend_text_size Legend text size in 'pt'.
|
||||||
|
#' @param legend_title_size Legend title size in 'pt'.
|
||||||
|
#' @param title_size Title text size in 'pt'.
|
||||||
|
#' @param title_fontface Title fontface. Bold if you wanna exemplify a lot what it is about.
|
||||||
|
#' @param title_color Title font color.
|
||||||
|
#' @param fontfamily Overall fontfamily. Leelawadee is your precious.
|
||||||
|
#' @param ... Other arguments to pass to `tmap::tm_layout()`.
|
||||||
|
#'
|
||||||
|
#' @return A tmap layer.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
add_layout <- function(
|
||||||
|
title = NULL,
|
||||||
|
legend_position = c(0.02, 0.5),
|
||||||
|
frame = FALSE,
|
||||||
|
legend_frame = cols_reach("main_grey"),
|
||||||
|
legend_text_size = 0.6,
|
||||||
|
legend_title_size = 0.8,
|
||||||
|
title_size = 0.9,
|
||||||
|
title_fontface = "bold",
|
||||||
|
title_color = cols_reach("main_grey"),
|
||||||
|
# check.and.fix = TRUE,
|
||||||
|
fontfamily = "Leelawadee",
|
||||||
|
...){
|
||||||
|
|
||||||
|
layout <- tmap::tm_layout(
|
||||||
|
title = title,
|
||||||
|
legend.position = legend_position,
|
||||||
|
legend.frame = legend_frame,
|
||||||
|
frame = FALSE,
|
||||||
|
legend.text.size = legend_text_size,
|
||||||
|
legend.title.size = legend_title_size,
|
||||||
|
title.size = title_size,
|
||||||
|
title.fontface = title_fontface,
|
||||||
|
title.color = title_color,
|
||||||
|
fontfamily = fontfamily,
|
||||||
|
...)
|
||||||
|
|
||||||
|
return(layout)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels.
|
||||||
|
#'
|
||||||
|
#' @param point Multipoint shape defined by sf package.
|
||||||
|
#' @param text Text labels column.
|
||||||
|
#' @param size Relative size of the text labels.
|
||||||
|
#' @param fontface Fontface.
|
||||||
|
#' @param fontfamily Fontfamily. Leelawadee is your precious.
|
||||||
|
#' @param shadow Boolean. Add a shadow around text labels. Issue opened on Github to request.
|
||||||
|
#' @param auto_placement Logical that determines whether the labels are placed automatically.
|
||||||
|
#' @param remove_overlap Logical that determines whether the overlapping labels are removed.
|
||||||
|
#' @param ... Other arguments to pass to `tmap::tm_text()`.
|
||||||
|
#'
|
||||||
|
#' @return A tmap layer.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
add_admin_labels <- function(point,
|
||||||
|
text,
|
||||||
|
size = 0.5,
|
||||||
|
fontface = "bold",
|
||||||
|
fontfamily = "Leelawadee",
|
||||||
|
shadow = TRUE,
|
||||||
|
auto_placement = FALSE,
|
||||||
|
remove_overlap = FALSE,
|
||||||
|
...){
|
||||||
|
|
||||||
|
|
||||||
|
#------ Restrictive sf checks (might not be necessary depending on the desired behaviour)
|
||||||
|
|
||||||
|
rlang::check_installed("tmap", reason = "Package \"tmap\" needed for `add_indicator_layer()` to work. Please install it.")
|
||||||
|
|
||||||
|
point <- sf::st_make_valid(point)
|
||||||
|
|
||||||
|
#------ Other checks
|
||||||
|
|
||||||
|
text_name <- rlang::as_name(rlang::enquo(text))
|
||||||
|
if_not_in_stop(point, text_name, "point", "text")
|
||||||
|
|
||||||
|
#------ Point text layer
|
||||||
|
|
||||||
|
layer <- tmap::tm_shape(point) +
|
||||||
|
tmap::tm_text(text = text_name,
|
||||||
|
size = size,
|
||||||
|
fontface = fontface,
|
||||||
|
fontfamily = fontfamily,
|
||||||
|
shadow = shadow,
|
||||||
|
auto.placement = auto_placement,
|
||||||
|
remove.overlap = remove_overlap,
|
||||||
|
...)
|
||||||
|
|
||||||
|
return(layer)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' Add a compass
|
||||||
|
#'
|
||||||
|
#' @param text_size Relative font size.
|
||||||
|
#' @param position Position of the compass. Vector of two values, specifying the x and y coordinates.
|
||||||
|
#' @param color_dark Color of the dark parts of the compass.
|
||||||
|
#' @param text_color color of the text.
|
||||||
|
#' @param type Compass type, one of: "arrow", "4star", "8star", "radar", "rose".
|
||||||
|
#' @param ... Other arguments to pass to `tmap::tm_compass()`.
|
||||||
|
#'
|
||||||
|
#' @return A tmap layer.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
add_compass <- function(text_size = 0.6,
|
||||||
|
position = c("right", 0.8),
|
||||||
|
color_dark = cols_reach("black"),
|
||||||
|
text_color = cols_reach("black"),
|
||||||
|
type = "4star",
|
||||||
|
...){
|
||||||
|
|
||||||
|
compass <- tmap::tm_compass(
|
||||||
|
text.size = text_size,
|
||||||
|
position = position,
|
||||||
|
color.dark = color_dark,
|
||||||
|
type = type,
|
||||||
|
text.color = text_color
|
||||||
|
)
|
||||||
|
|
||||||
|
return(compass)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' Add a scale bar
|
||||||
|
#'
|
||||||
|
#' @param text_size Relative font size.
|
||||||
|
#' @param position Position of the compass. Vector of two values, specifying the x and y coordinates.
|
||||||
|
#' @param color_dark Color of the dark parts of the compass.
|
||||||
|
#' @param breaks Breaks of the scale bar. If not specified, breaks will be automatically be chosen given the prefered width of the scale bar. Example: c(0, 50, 100).
|
||||||
|
#' @param ... Other arguments to pass to `tmap::tm_compass()`.
|
||||||
|
#'
|
||||||
|
#' @return A tmap layer.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
add_scale_bar <- function(text_size = 0.6,
|
||||||
|
position = c("left", 0.01),
|
||||||
|
color_dark = cols_reach("black"),
|
||||||
|
breaks = c(0, 50, 100),
|
||||||
|
...){
|
||||||
|
|
||||||
|
scale_bar <- tmap::tm_scale_bar(
|
||||||
|
text.size = text_size,
|
||||||
|
position = position,
|
||||||
|
color.dark = color_dark,
|
||||||
|
breaks = breaks,
|
||||||
|
...
|
||||||
|
)
|
||||||
|
|
||||||
|
return(scale_bar)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' Do you want to credit someone or some institution?
|
||||||
|
#'
|
||||||
|
#' @param text Text.
|
||||||
|
#' @param size Relative text size.
|
||||||
|
#' @param bg_color Background color.
|
||||||
|
#' @param position Position. Vector of two coordinates. Usually somewhere down.
|
||||||
|
#' @param ... Other arguments to pass to `tmap::tm_credits()`.
|
||||||
|
#'
|
||||||
|
#' @return A tmap layer.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
add_credits <- function(text, size = 0.4, bg_color = NA, position = c(0.75, 0.02), ...){
|
||||||
|
|
||||||
|
tmap::tm_credits(text,
|
||||||
|
size = size,
|
||||||
|
bg.color = bg_color,
|
||||||
|
position = position,
|
||||||
|
...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -13,15 +13,9 @@ pal_agora <- function(palette = "main", reverse = FALSE, color_ramp_palette = FA
|
||||||
|
|
||||||
|
|
||||||
palettes_agora <- list(
|
palettes_agora <- list(
|
||||||
`main` = cols_agora("main_grey", "main_red", "main_lt_grey", "main_beige"),
|
`main` = cols_agora("main_bordeaux", "main_dk_beige", "main_lt_grey", "main_lt_beige"),
|
||||||
`primary` = cols_agora("main_grey", "main_red"),
|
`primary` = cols_agora("main_bordeaux", "main_dk_beige"),
|
||||||
`secondary` = cols_agora("main_lt_grey", "main_beige"),
|
`secondary` = cols_agora( "main_lt_grey", "main_lt_beige")
|
||||||
`two_dots` = cols_agora("two_dots_1", "two_dots_2"),
|
|
||||||
`two_dots_flashy` = cols_agora("two_dots_flashy_1", "two_dots_flashy_2"),
|
|
||||||
`red_main` = cols_agora("red_main_1", "red_main_2", "red_main_3", "red_main_4", "red_main_5"),
|
|
||||||
`red_alt` = cols_agora("red_alt_1", "red_alt_2", "red_alt_3", "red_alt_4", "red_alt_5"),
|
|
||||||
`iroise` = cols_agora("iroise_1", "iroise_2", "iroise_3", "iroise_4", "iroise_5"),
|
|
||||||
`discrete_6` = cols_agora("dk_grey", "red_main_1", "main_beige", "red_main_2", "lt_grey_2", "red_4")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (show_palettes) return(names(palettes_agora))
|
if (show_palettes) return(names(palettes_agora))
|
||||||
|
|
|
||||||
30
R/pal_fallback.R
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#' @title Return function to interpolate a fallback palette base on viridis::magma()
|
||||||
|
#'
|
||||||
|
#' @param reverse Boolean indicating whether the palette should be reversed
|
||||||
|
#' @param color_ramp_palette Should the output be a `grDevices::colorRampPalette` function or a vector of hex codes? Default to the latter with `FALSE`
|
||||||
|
#' @param discrete Boolean. Discrete or not? Default to FALSE.
|
||||||
|
#' @param n Number of colors in the palette. Default to 5. Passe to `viridis::magma()`
|
||||||
|
#' @param ... Other parameters to pass to `grDevices::colorRampPalette()`
|
||||||
|
#'
|
||||||
|
#' @return A color palette
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
pal_fallback <- function(reverse = FALSE,
|
||||||
|
color_ramp_palette = FALSE,
|
||||||
|
discrete = FALSE,
|
||||||
|
n = 5,
|
||||||
|
...){
|
||||||
|
|
||||||
|
pal <- if(discrete) { viridisLite::viridis(n) } else {viridisLite::magma(n)}
|
||||||
|
|
||||||
|
if (reverse) pal <- rev(pal)
|
||||||
|
|
||||||
|
if (color_ramp_palette) {
|
||||||
|
rlang::check_installed("grDevices", reason = "Package \"grDevices\" needed for `pal_fallback()` with 'color_ramp_palette' set to `TRUE` to work. Please install it.")
|
||||||
|
|
||||||
|
pal <- grDevices::colorRampPalette(pal, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
return(pal)
|
||||||
|
|
||||||
|
}
|
||||||
34
R/pal_impact.R
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#' @title Return function to interpolate an IMPACT color palette
|
||||||
|
#'
|
||||||
|
#' @param palette Character name of a palette in IMPACT palettes
|
||||||
|
#' @param reverse Boolean indicating whether the palette should be reversed
|
||||||
|
#' @param color_ramp_palette Should the output be a `grDevices::colorRampPalette` function or a vector of hex codes? Default to the former with `TRUE`
|
||||||
|
#' @param show_palettes Should the ouput be the set of palettes names to pick from? Default to `FALSE`
|
||||||
|
#' @param ... Additional arguments to pass to colorRampPalette()
|
||||||
|
#'
|
||||||
|
#' @return A color palette
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
pal_impact <- function(palette = "main", reverse = FALSE, color_ramp_palette = FALSE, show_palettes = FALSE, ...) {
|
||||||
|
|
||||||
|
|
||||||
|
palettes_impact <- list(
|
||||||
|
`main` = cols_impact("black", "white", "main_blue", "main_grey"),
|
||||||
|
`primary` = cols_impact("black", "white"),
|
||||||
|
`secondary` = cols_impact("main_blue", "main_grey")
|
||||||
|
)
|
||||||
|
|
||||||
|
if (show_palettes) return(names(palettes_impact))
|
||||||
|
|
||||||
|
pal <- palettes_impact[[palette]]
|
||||||
|
|
||||||
|
if (reverse) pal <- rev(pal)
|
||||||
|
|
||||||
|
if (color_ramp_palette) {
|
||||||
|
rlang::check_installed("grDevices", reason = "Package \"grDevices\" needed for `pal_impact()` woth 'color_ramp_palette' set to `TRUE` to work. Please install it.")
|
||||||
|
|
||||||
|
pal <- grDevices::colorRampPalette(pal, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
return(pal)
|
||||||
|
}
|
||||||
106
R/pal_reach.R
|
|
@ -1,40 +1,66 @@
|
||||||
#' @title Return function to interpolate a REACH color palette
|
#' @title Return function to interpolate a REACH color palette
|
||||||
#'
|
#'
|
||||||
#' @param palette Character name of a palette in REACH palettes
|
#' @param palette Character name of a palette in REACH palettes
|
||||||
#' @param reverse Boolean indicating whether the palette should be reversed
|
#' @param reverse Boolean indicating whether the palette should be reversed
|
||||||
#' @param color_ramp_palette Should the output be a `grDevices::colorRampPalette` function or a vector of hex codes? Default to the former with `TRUE`
|
#' @param color_ramp_palette Should the output be a `grDevices::colorRampPalette` function or a vector of hex codes? Default to the former with `TRUE`
|
||||||
#' @param show_palettes Should the ouput be the set of palettes names to pick from? Default to `FALSE`
|
#' @param show_palettes Should the ouput be the set of palettes names to pick from? Default to `FALSE`
|
||||||
#' @param ... Additional arguments to pass to colorRampPalette()
|
#' @param ... Additional arguments to pass to colorRampPalette()
|
||||||
#'
|
#'
|
||||||
#' @return A color palette
|
#' @return A color palette
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @export
|
||||||
pal_reach <- function(palette = "main", reverse = FALSE, color_ramp_palette = FALSE, show_palettes = FALSE, ...) {
|
pal_reach <- function(palette = "main", reverse = FALSE, color_ramp_palette = FALSE, show_palettes = FALSE, ...) {
|
||||||
|
|
||||||
|
palettes_reach <- list(
|
||||||
palettes_reach <- list(
|
`main` = cols_reach("main_grey", "main_red", "main_lt_grey", "main_beige"),
|
||||||
`main` = cols_reach("main_grey", "main_red", "main_lt_grey", "main_beige"),
|
`primary` = cols_reach("main_grey", "main_red"),
|
||||||
`primary` = cols_reach("main_grey", "main_red"),
|
`secondary` = cols_reach("main_lt_grey", "main_beige"),
|
||||||
`secondary` = cols_reach("main_lt_grey", "main_beige"),
|
`two_dots` = cols_reach("two_dots_1", "two_dots_2"),
|
||||||
`two_dots` = cols_reach("two_dots_1", "two_dots_2"),
|
`two_dots_flashy` = cols_reach("two_dots_flashy_1", "two_dots_flashy_2"),
|
||||||
`two_dots_flashy` = cols_reach("two_dots_flashy_1", "two_dots_flashy_2"),
|
`red_main` = cols_reach("red_main_1", "red_main_2", "red_main_3", "red_main_4", "red_main_5"),
|
||||||
`red_main` = cols_reach("red_main_1", "red_main_2", "red_main_3", "red_main_4", "red_main_5"),
|
`red_main_5` = cols_reach("red_main_1", "red_main_2", "red_main_3", "red_main_4", "red_main_5"),
|
||||||
`red_alt` = cols_reach("red_alt_1", "red_alt_2", "red_alt_3", "red_alt_4", "red_alt_5"),
|
`red_alt` = cols_reach("red_alt_1", "red_alt_2", "red_alt_3", "red_alt_4", "red_alt_5"),
|
||||||
`iroise` = cols_reach("iroise_1", "iroise_2", "iroise_3", "iroise_4", "iroise_5"),
|
`red_alt_5` = cols_reach("red_alt_1", "red_alt_2", "red_alt_3", "red_alt_4", "red_alt_5"),
|
||||||
`discrete_6` = cols_reach("dk_grey", "red_main_1", "main_beige", "red_main_2", "lt_grey_2", "red_4")
|
`iroise` = cols_reach("iroise_1", "iroise_2", "iroise_3", "iroise_4", "iroise_5"),
|
||||||
)
|
`iroise_5` = cols_reach("iroise_1", "iroise_2", "iroise_3", "iroise_4", "iroise_5"),
|
||||||
|
`discrete_6` = cols_reach("dk_grey", "red_main_1", "main_beige", "red_main_2", "lt_grey_2", "red_4"),
|
||||||
if (show_palettes) return(names(palettes_reach))
|
`red_2` = cols_reach("red_less_4_1", "red_less_4_3"),
|
||||||
|
`red_3` = cols_reach("red_less_4_1", "red_less_4_2", "red_less_4_3"),
|
||||||
pal <- palettes_reach[[palette]]
|
`red_4` = cols_reach("red_less_4_1", "red_less_4_2", "red_less_4_3", "red_less_4_4"),
|
||||||
|
`red_5` = cols_reach("red_5_1", "red_5_2", "red_5_3", "red_5_4", "red_5_5"),
|
||||||
if (reverse) pal <- rev(pal)
|
`red_6` = cols_reach("red_less_7_1", "red_less_2", "red_less_7_3", "red_less_7_4", "red_less_7_5", "red_less_7_6"),
|
||||||
|
`red_7` = cols_reach("red_less_7_1", "red_less_7_2", "red_less_7_3", "red_less_7_4", "red_less_7_5", "red_less_7_6", "red_less_7_7"),
|
||||||
if (color_ramp_palette) {
|
`green_2` = cols_reach("green_2_1", "green_2_2"),
|
||||||
rlang::check_installed("grDevices", reason = "Package \"grDevices\" needed for `pal_reach()` woth 'color_ramp_palette' set to `TRUE` to work. Please install it.")
|
`green_3` = cols_reach("green_3_1", "green_3_2", "green_3_3"),
|
||||||
|
`green_4` = cols_reach("green_4_1", "green_4_2", "green_4_3", "green_4_4"),
|
||||||
pal <- grDevices::colorRampPalette(pal, ...)
|
`green_5` = cols_reach("green_5_1", "green_5_2", "green_5_3", "green_5_4", "green_5_5"),
|
||||||
}
|
`green_6` = cols_reach("green_6_1", "green_6_2", "green_6_3", "green_6_4", "green_6_5", "green_6_6"),
|
||||||
|
`green_7` = cols_reach("green_7_1", "green_7_2", "green_7_3", "green_7_4", "green_7_5", "green_7_6", "green_7_7"),
|
||||||
return(pal)
|
`artichoke_2` = cols_reach("artichoke_2_1", "artichoke_2_2"),
|
||||||
}
|
`artichoke_3` = cols_reach("artichoke_3_1", "artichoke_3_2", "artichoke_3_3"),
|
||||||
|
`artichoke_4` = cols_reach("artichoke_4_1", "artichoke_4_2", "artichoke_4_3", "artichoke_4_4"),
|
||||||
|
`artichoke_5` = cols_reach("artichoke_5_1", "artichoke_5_2", "artichoke_5_3", "artichoke_5_4", "artichoke_5_5"),
|
||||||
|
`artichoke_6` = cols_reach("artichoke_6_1", "artichoke_6_2", "artichoke_6_3", "artichoke_6_4", "artichoke_6_5", "artichoke_6_6"),
|
||||||
|
`artichoke_7` = cols_reach("artichoke_7_1", "artichoke_7_2", "artichoke_7_3", "artichoke_7_4", "artichoke_7_5", "artichoke_7_6", "artichoke_7_7"),
|
||||||
|
`blue_2` = cols_reach("blue_2_1", "blue_2_2"),
|
||||||
|
`blue_3` = cols_reach("blue_3_1", "blue_3_2", "blue_3_3"),
|
||||||
|
`blue_4` = cols_reach("blue_4_1", "blue_4_2", "blue_4_3", "blue_4_4"),
|
||||||
|
`blue_5` = cols_reach("blue_5_1", "blue_5_2", "blue_5_3", "blue_5_4", "blue_5_5"),
|
||||||
|
`blue_6` = cols_reach("blue_6_1", "blue_6_2", "blue_6_3", "blue_6_4", "blue_6_5", "blue_6_6"),
|
||||||
|
`blue_7` = cols_reach("blue_7_1", "blue_7_2", "blue_7_3", "blue_7_4", "blue_7_5", "blue_7_6", "blue_7_7")
|
||||||
|
)
|
||||||
|
|
||||||
|
if (show_palettes) return(names(palettes_reach))
|
||||||
|
|
||||||
|
pal <- palettes_reach[[palette]]
|
||||||
|
|
||||||
|
if (reverse) pal <- rev(pal)
|
||||||
|
|
||||||
|
if (color_ramp_palette) {
|
||||||
|
rlang::check_installed("grDevices", reason = "Package \"grDevices\" needed for `pal_reach()` with 'color_ramp_palette' set to `TRUE` to work. Please install it.")
|
||||||
|
|
||||||
|
pal <- grDevices::colorRampPalette(pal, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
return(pal)
|
||||||
|
}
|
||||||
|
|
|
||||||
81
R/point.R
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
#' @title Simple point chart
|
||||||
|
#'
|
||||||
|
#' @param df A data frame.
|
||||||
|
#' @param x A numeric column.
|
||||||
|
#' @param y A character column or coercible as a character column.
|
||||||
|
#' @param group Some grouping categorical column, e.g. administrative areas or population groups.
|
||||||
|
#' @param flip TRUE or FALSE. Default to TRUE or horizontal bar plot.
|
||||||
|
#' @param alpha Fill transparency.
|
||||||
|
#' @param size Point size.
|
||||||
|
#' @param x_title The x scale title. Default to NULL.
|
||||||
|
#' @param y_title The y scale title. Default to NULL.
|
||||||
|
#' @param group_title The group legend title. Default to NULL.
|
||||||
|
#' @param title Plot title. Default to NULL.
|
||||||
|
#' @param subtitle Plot subtitle. Default to NULL.
|
||||||
|
#' @param caption Plot caption. Default to NULL.
|
||||||
|
#' @param theme Whatever theme. Default to theme_reach().
|
||||||
|
#'
|
||||||
|
#' @return A bar chart
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
point <- function(df, x, y, group = NULL, flip = TRUE, alpha = 1, size = 1, x_title = NULL, y_title = NULL, group_title = NULL, title = NULL, subtitle = NULL, caption = NULL, theme = theme_reach()){
|
||||||
|
|
||||||
|
# To do :
|
||||||
|
# - automate bar width and text size, or at least give the flexibility and still center text
|
||||||
|
# - add facet possibility
|
||||||
|
|
||||||
|
# Prepare group, x and y names
|
||||||
|
# if (is.null(x_title)) x_title <- rlang::as_name(rlang::enquo(x))
|
||||||
|
# if (is.null(y_title)) y_title <- rlang::as_name(rlang::enquo(y))
|
||||||
|
# if (is.null(group_title)) group_title <- rlang::as_name(rlang::enquo(group))
|
||||||
|
|
||||||
|
# Mapping
|
||||||
|
g <- ggplot2::ggplot(
|
||||||
|
df,
|
||||||
|
mapping = ggplot2::aes(x = {{ x }}, y = {{ y }}, fill = {{ group }}, color = {{ group }}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add title, subtitle, caption, x_title, y_title
|
||||||
|
g <- g + ggplot2::labs(
|
||||||
|
title = title,
|
||||||
|
subtitle = subtitle,
|
||||||
|
caption = caption,
|
||||||
|
x = x_title,
|
||||||
|
y = y_title,
|
||||||
|
color = group_title,
|
||||||
|
fill = group_title
|
||||||
|
)
|
||||||
|
|
||||||
|
width <- 0.5
|
||||||
|
dodge_width <- 0.5
|
||||||
|
|
||||||
|
# Should the graph use position_fill?
|
||||||
|
g <- g + ggplot2::geom_point(
|
||||||
|
alpha = alpha,
|
||||||
|
size = size
|
||||||
|
)
|
||||||
|
|
||||||
|
# Labels to percent and expand scale
|
||||||
|
# if (percent) {
|
||||||
|
# g <- g + ggplot2::scale_y_continuous(
|
||||||
|
# labels = scales::label_percent(
|
||||||
|
# accuracy = 1,
|
||||||
|
# decimal.mark = ",",
|
||||||
|
# suffix = " %"),
|
||||||
|
# expand = c(0.01, 0.1)
|
||||||
|
# )
|
||||||
|
# } else {
|
||||||
|
# g <- g + ggplot2::scale_y_continuous(expand = c(0.01, 0.1))
|
||||||
|
# }
|
||||||
|
|
||||||
|
# # Because a text legend should always be horizontal, especially for an horizontal bar graph
|
||||||
|
if (flip){
|
||||||
|
g <- g + ggplot2::coord_flip()
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add theme
|
||||||
|
g <- g + theme
|
||||||
|
|
||||||
|
return(g)
|
||||||
|
}
|
||||||
325
R/scale.R
|
|
@ -1,77 +1,248 @@
|
||||||
#' Color scale constructor for REACH or AGORA colors
|
#' Color scale constructor for REACH or AGORA colors
|
||||||
#'
|
#'
|
||||||
#' @param initiative Either "reach" or "agora
|
#' @param initiative Either "reach" or "agora" or "default".
|
||||||
#' @param palette Character name of palette in drsimonj_palettes
|
#' @param palette Palette name from `pal_reach()` or `pal_agora()`.
|
||||||
#' @param discrete Boolean indicating whether color aesthetic is discrete or not
|
#' @param discrete Boolean indicating whether color aesthetic is discrete or not.
|
||||||
#' @param reverse Boolean indicating whether the palette should be reversed
|
#' @param reverse Boolean indicating whether the palette should be reversed.
|
||||||
#' @param ... Additional arguments passed to discrete_scale() or
|
#' @param reverse_guide Boolean indicating whether the guide should be reversed.
|
||||||
#' scale_color_gradientn(), used respectively when discrete is TRUE or FALSE
|
#' @param ... Additional arguments passed to discrete_scale() or
|
||||||
#' @return A color scale for ggplot
|
#' scale_fill_gradient(), used respectively when discrete is TRUE or FALSE.
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @return A color scale for ggplot
|
||||||
scale_color <- function(initiative = "reach", palette = "main", discrete = TRUE, reverse = FALSE, ...) {
|
#'
|
||||||
|
#' @export
|
||||||
if (initiative == "reach") {
|
scale_color <- function(initiative = "reach", palette = "main", discrete = TRUE, reverse = FALSE, reverse_guide = TRUE, ...) {
|
||||||
pal <- pal_reach(
|
|
||||||
palette = palette,
|
if (initiative == "reach") {
|
||||||
reverse = reverse,
|
|
||||||
color_ramp_palette = TRUE,
|
pal <- pal_reach(palette)
|
||||||
show_palettes = FALSE
|
|
||||||
)
|
if (is.null(pal)) {
|
||||||
} else if (initiative == "agora") {
|
|
||||||
pal <- pal_agora(
|
pal <- pal_fallback(
|
||||||
palette = palette,
|
reverse = reverse,
|
||||||
reverse = reverse,
|
discrete = discrete,
|
||||||
color_ramp_palette = TRUE,
|
color_ramp_palette = TRUE)
|
||||||
show_palettes = FALSE
|
|
||||||
)
|
rlang::warn(
|
||||||
} else {
|
c(
|
||||||
rlang::abort(c("Wrong initiative parameter input", "*" = paste0(initiative, "is not an option"), "i" = "Parameter 'initiative' should be one of 'reach' or 'agora'"))
|
paste0("There is no palette '", palette, "' for the selected initiative. Fallback to pal_fallback()."),
|
||||||
}
|
"i" = paste0("Use `pal_reach(show_palettes = TRUE)` to see the list of available palettes.")
|
||||||
|
)
|
||||||
if (discrete) {
|
)
|
||||||
ggplot2::discrete_scale("colour", paste0(initiative, "_", palette), palette = pal, ...)
|
|
||||||
} else {
|
if (discrete) palette <- "viridis" else palette <- "magma"
|
||||||
ggplot2::scale_color_gradientn(colours = pal(256), ...)
|
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
|
pal <- pal_reach(
|
||||||
|
palette = palette,
|
||||||
|
reverse = reverse,
|
||||||
#' Fill scale constructor for REACH or AGORA colors
|
color_ramp_palette = TRUE,
|
||||||
#'
|
show_palettes = FALSE
|
||||||
#' @param initiative Either "reach" or "agora
|
)
|
||||||
#' @param palette Character name of palette in drsimonj_palettes
|
|
||||||
#' @param discrete Boolean indicating whether color aesthetic is discrete or not
|
}
|
||||||
#' @param reverse Boolean indicating whether the palette should be reversed
|
|
||||||
#' @param ... Additional arguments passed to discrete_scale() or
|
} else if (initiative == "agora") {
|
||||||
#' scale_fill_gradientn(), used respectively when discrete is TRUE or FALSE
|
|
||||||
#' @return A fill scale for ggplot
|
pal <- pal_agora(palette)
|
||||||
#'
|
|
||||||
#' @export
|
if (is.null(pal)) {
|
||||||
scale_color <- function(initiative = "reach", palette = "main", discrete = TRUE, reverse = FALSE, ...) {
|
|
||||||
|
pal <- pal_fallback(
|
||||||
if (initiative == "reach") {
|
reverse = reverse,
|
||||||
pal <- pal_reach(
|
discrete = discrete,
|
||||||
palette = palette,
|
color_ramp_palette = TRUE)
|
||||||
reverse = reverse,
|
|
||||||
color_ramp_palette = TRUE,
|
rlang::warn(
|
||||||
show_palettes = FALSE
|
c(
|
||||||
)
|
paste0("There is no palette '", palette, "' for the selected initiative. Fallback to pal_fallback()."),
|
||||||
} else if (initiative == "agora") {
|
"i" = paste0("Use `pal_reach(show_palettes = TRUE)` to see the list of available palettes.")
|
||||||
pal <- pal_agora(
|
)
|
||||||
palette = palette,
|
)
|
||||||
reverse = reverse,
|
|
||||||
color_ramp_palette = TRUE,
|
if (discrete) palette <- "viridis" else palette <- "magma"
|
||||||
show_palettes = FALSE
|
|
||||||
)
|
} else {
|
||||||
} else {
|
|
||||||
rlang::abort(c("Wrong initiative parameter input", "*" = paste0(initiative, "is not an option"), "i" = "Parameter 'initiative' should be one of 'reach' or 'agora'"))
|
pal <- pal_agora(
|
||||||
}
|
palette = palette,
|
||||||
|
reverse = reverse,
|
||||||
if (discrete) {
|
color_ramp_palette = TRUE,
|
||||||
ggplot2::discrete_scale("fill", paste0(initiative, "_", palette), palette = pal, ...)
|
show_palettes = FALSE
|
||||||
} else {
|
)
|
||||||
ggplot2::scale_fill_gradientn(colours = pal(256), ...)
|
}
|
||||||
}
|
|
||||||
}
|
} else if (initiative == "default") {
|
||||||
|
|
||||||
|
pal <- pal_fallback(
|
||||||
|
reverse = reverse,
|
||||||
|
discrete = discrete,
|
||||||
|
color_ramp_palette = TRUE)
|
||||||
|
|
||||||
|
if (discrete) palette <- "viridis" else palette <- "magma"
|
||||||
|
|
||||||
|
} else {
|
||||||
|
rlang::abort(
|
||||||
|
c(
|
||||||
|
paste0("There is no initiative '", initiative, "."),
|
||||||
|
"i" = paste0("initiative should be either 'reach', 'agora' or 'default'")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (discrete) {
|
||||||
|
ggplot2::discrete_scale(
|
||||||
|
"colour",
|
||||||
|
paste0(initiative, "_", palette),
|
||||||
|
palette = pal,
|
||||||
|
guide = ggplot2::guide_legend(
|
||||||
|
title.position = "top",
|
||||||
|
draw.ulim = TRUE,
|
||||||
|
draw.llim = TRUE,
|
||||||
|
ticks.colour = "#F1F3F5",
|
||||||
|
reverse = reverse_guide
|
||||||
|
),
|
||||||
|
...
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
ggplot2::scale_color_gradientn(
|
||||||
|
colours = pal(256),
|
||||||
|
guide = ggplot2::guide_colorbar(
|
||||||
|
title.position = "top",
|
||||||
|
draw.ulim = TRUE,
|
||||||
|
draw.llim = TRUE,
|
||||||
|
ticks.colour = "#F1F3F5",
|
||||||
|
reverse = reverse_guide
|
||||||
|
),
|
||||||
|
...
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' Fill scale constructor for REACH or AGORA colors
|
||||||
|
#'
|
||||||
|
#' @param initiative Either "reach" or "agora" or "default".
|
||||||
|
#' @param palette Palette name from `pal_reach()` or `pal_agora()`.
|
||||||
|
#' @param discrete Boolean indicating whether color aesthetic is discrete or not.
|
||||||
|
#' @param reverse Boolean indicating whether the palette should be reversed.
|
||||||
|
#' @param reverse_guide Boolean indicating whether the guide should be reversed.
|
||||||
|
#' @param ... Additional arguments passed to discrete_scale() or
|
||||||
|
#' scale_fill_gradient(), used respectively when discrete is TRUE or FALSE.
|
||||||
|
#'
|
||||||
|
#' @return A fill scale for ggplot.
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
scale_fill <- function(initiative = "reach", palette = "main", discrete = TRUE, reverse = FALSE, reverse_guide = TRUE, ...) {
|
||||||
|
|
||||||
|
|
||||||
|
if (initiative == "reach") {
|
||||||
|
|
||||||
|
pal <- pal_reach(palette)
|
||||||
|
|
||||||
|
if (is.null(pal)) {
|
||||||
|
|
||||||
|
pal <- pal_fallback(
|
||||||
|
reverse = reverse,
|
||||||
|
discrete = discrete,
|
||||||
|
color_ramp_palette = TRUE)
|
||||||
|
|
||||||
|
rlang::warn(
|
||||||
|
c(
|
||||||
|
paste0("There is no palette '", palette, "' for the selected initiative. Fallback to pal_fallback()."),
|
||||||
|
"i" = paste0("Use `pal_reach(show_palettes = TRUE)` to see the list of available palettes.")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if (discrete) palette <- "viridis" else palette <- "magma"
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
pal <- pal_reach(
|
||||||
|
palette = palette,
|
||||||
|
reverse = reverse,
|
||||||
|
color_ramp_palette = TRUE,
|
||||||
|
show_palettes = FALSE
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (initiative == "agora") {
|
||||||
|
|
||||||
|
pal <- pal_agora(palette)
|
||||||
|
|
||||||
|
if (is.null(pal)) {
|
||||||
|
|
||||||
|
pal <- pal_fallback(
|
||||||
|
reverse = reverse,
|
||||||
|
discrete = discrete,
|
||||||
|
color_ramp_palette = TRUE)
|
||||||
|
|
||||||
|
rlang::warn(
|
||||||
|
c(
|
||||||
|
paste0("There is no palette '", palette, "' for the selected initiative. Fallback to pal_fallback()."),
|
||||||
|
"i" = paste0("Use `pal_reach(show_palettes = TRUE)` to see the list of available palettes.")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if (discrete) palette <- "viridis" else palette <- "magma"
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
pal <- pal_agora(
|
||||||
|
palette = palette,
|
||||||
|
reverse = reverse,
|
||||||
|
color_ramp_palette = TRUE,
|
||||||
|
show_palettes = FALSE
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (initiative == "default") {
|
||||||
|
|
||||||
|
pal <- pal_fallback(
|
||||||
|
reverse = reverse,
|
||||||
|
discrete = discrete,
|
||||||
|
color_ramp_palette = TRUE)
|
||||||
|
|
||||||
|
if (discrete) palette <- "viridis" else palette <- "magma"
|
||||||
|
|
||||||
|
} else {
|
||||||
|
rlang::abort(
|
||||||
|
c(
|
||||||
|
paste0("There is no initiative '", initiative, "."),
|
||||||
|
"i" = paste0("initiative should be either 'reach', 'agora' or 'default'")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (discrete) {
|
||||||
|
ggplot2::discrete_scale(
|
||||||
|
"fill",
|
||||||
|
paste0(initiative, "_", palette),
|
||||||
|
palette = pal,
|
||||||
|
guide = ggplot2::guide_legend(
|
||||||
|
title.position = "top",
|
||||||
|
draw.ulim = TRUE,
|
||||||
|
draw.llim = TRUE,
|
||||||
|
ticks.colour = "#F1F3F5",
|
||||||
|
reverse = reverse_guide
|
||||||
|
),
|
||||||
|
...
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
ggplot2::scale_color_gradientn(
|
||||||
|
colours = pal(256),
|
||||||
|
guide = ggplot2::guide_colorbar(
|
||||||
|
title.position = "top",
|
||||||
|
draw.ulim = TRUE,
|
||||||
|
draw.llim = TRUE,
|
||||||
|
ticks.colour = "#F1F3F5",
|
||||||
|
reverse = reverse_guide
|
||||||
|
),
|
||||||
|
...
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
381
R/theme_reach.R
|
|
@ -1,91 +1,290 @@
|
||||||
#' @title Base REACH ggplot2 theme
|
#' @title ggplot2 theme with REACH color palettes
|
||||||
#'
|
#'
|
||||||
#' @param family The font family. Default to "Leelawadee"
|
#' @param initiative Either "reach" or "default".
|
||||||
#'
|
#' @param palette Palette name from 'pal_reach()'.
|
||||||
#' @description Give some reach colors and fonts to a ggplot. Based on theme_bw()
|
#' @param discrete Boolean indicating whether color aesthetic is discrete or not.
|
||||||
#'
|
#' @param reverse Boolean indicating whether the palette should be reversed.
|
||||||
#' @return The base REACH theme
|
#' @param font_family The font family for all plot's texts. Default to "Segoe UI".
|
||||||
#'
|
#' @param title_size The size of the title. Defaults to 12.
|
||||||
theme_reach <- function(family = "Leelawadee") {
|
#' @param title_color Title color.
|
||||||
|
#' @param title_font_face Title font face. Default to "bold". Font face ("plain", "italic", "bold", "bold.italic").
|
||||||
rlang::check_installed("ggplot2", reason = "Package \"ggplot2\" needed for `theme_reach_*()` to work. Please install it.")
|
#' @param title_hjust Title horizontal justification. Default to NULL. Use 0.5 to center the title.
|
||||||
|
#' @param text_size The size of all text other than the title, subtitle and caption. Defaults to 10.
|
||||||
ggplot2::theme_bw() +
|
#' @param text_color Text color.
|
||||||
ggplot2::theme(
|
#' @param text_font_face Text font face. Default to "bold". Font face ("plain", "italic", "bold", "bold.italic").
|
||||||
title = ggplot2::element_text(family = family,
|
#' @param panel_background_color The color for the panel background color. Default to white.
|
||||||
size = 12,
|
#' @param panel_border Boolean. Plot a panel border? Default to FALSE.
|
||||||
colour = "#58585A",
|
#' @param panel_border_color A color. Default to REACH main grey.
|
||||||
hjust = 0.5,
|
#' @param legend_position Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".
|
||||||
vjust = 0.5),
|
#' @param legend_direction Direction of the legend. Default to "vertical". Can take "vertical" or "horizontal".
|
||||||
text = ggplot2::element_text(family = family,
|
#' @param legend_title_size Legend title size.
|
||||||
colour = "#58585A"),
|
#' @param legend_title_color Legend title color.
|
||||||
axis.title = ggplot2::element_text(size = 11),
|
#' @param legend_title_font_face Legend title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||||
axis.text = ggplot2::element_text(size = 10),
|
#' @param legend_text_size Legend text size.
|
||||||
legend.text = ggplot2::element_text(size = 11),
|
#' @param legend_text_color Legend text color.
|
||||||
strip.text = ggplot2::element_text(size = 11),
|
#' @param legend_text_font_face Legend text font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||||
legend.title = ggplot2::element_text(size = 11)
|
#' @param legend_reverse Reverse the color in the guide? Default to TRUE.
|
||||||
)
|
#' @param title_size The size of the legend title. Defaults to 11.
|
||||||
}
|
#' @param title_color Legend title color.
|
||||||
|
#' @param title_font_face Legend title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||||
|
#' @param title_position_to_plot TRUE or FALSE. Positioning to plot or to panel?
|
||||||
|
#' @param axis_x Boolean. Do you need x-axis?
|
||||||
#' @title Some REACH theme for ggplot
|
#' @param axis_y Boolean. Do you need y-axis?
|
||||||
#'
|
#' @param axis_text_size Axis text size.
|
||||||
#' @param family The font family. Default to "Leelawadee"
|
#' @param axis_text_color Axis text color.
|
||||||
#'
|
#' @param axis_text_font_face Axis text font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||||
#' @return A theme to be added to the "+" ggplot grammar
|
#' @param axis_text_x_angle Angle for the x-axis text.
|
||||||
#'
|
#' @param axis_text_x_vjust Vertical adjustment for the x-axis text.
|
||||||
#' @export
|
#' @param axis_text_x_hjust Vertical adjustment for the x-axis text.
|
||||||
theme_reach_borders <- function(family = "Leelawadee") {
|
#' @param axis_title_size Axis title size.
|
||||||
|
#' @param axis_title_color Axis title color.
|
||||||
theme_reach() +
|
#' @param axis_title_font_face Axis title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||||
ggplot2::theme(
|
#' @param grid_major_x Boolean. Do you need major grid lines for x-axis?
|
||||||
panel.background = ggplot2::element_rect(colour = "white", fill = "white", size = 0.5),
|
#' @param grid_major_y Boolean. Do you need major grid lines for y-axis?
|
||||||
strip.background = ggplot2::element_rect(linetype = "solid", colour = "#58585A", fill = "white")
|
#' @param grid_major_x_size Major X line size.
|
||||||
)
|
#' @param grid_major_y_size Major Y line size.
|
||||||
}
|
#' @param grid_major_color Major grid lines color.
|
||||||
|
#' @param grid_minor_x Boolean. Do you need minor grid lines for x-axis?
|
||||||
|
#' @param grid_minor_y Boolean. Do you need minor grid lines for y-axis?
|
||||||
|
#' @param grid_minor_x_size Minor X line size.
|
||||||
#' @title Some reach more minimal theme for ggplot
|
#' @param grid_minor_y_size Minor Y line size.
|
||||||
#'
|
#' @param grid_minor_color Minor grid lines color.
|
||||||
#' @param family The font family. Default to "Leelawadee"
|
#' @param caption_position_to_plot TRUE or FALSE. Positioning to plot or to panel?
|
||||||
#'
|
#' @param ... Additional arguments passed to `ggplot2::gg_theme()`.
|
||||||
#' @description Give some REACH colors and fonts to a ggplot. Based on theme_bw(). To be used for vertical bar charts.
|
#'
|
||||||
#'
|
#'
|
||||||
#' @return A theme to be added to the "+" ggplot grammar
|
#' @description Give some reach colors and fonts to a ggplot.
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @return The base REACH theme
|
||||||
theme_reach_hist <- function(family = "Leelawadee") {
|
#'
|
||||||
|
#' @export
|
||||||
theme_reach() +
|
theme_reach <- function(
|
||||||
ggplot2::theme(
|
initiative = "reach",
|
||||||
panel.background = ggplot2::element_blank(),
|
palette = "main",
|
||||||
strip.background = ggplot2::element_blank(),
|
discrete = TRUE,
|
||||||
panel.border = ggplot2::element_blank()
|
reverse = FALSE,
|
||||||
)
|
font_family = "Segoe UI",
|
||||||
}
|
title_size = 12,
|
||||||
|
title_color = cols_reach("main_grey"),
|
||||||
|
title_font_face = "bold",
|
||||||
#' @title Some reach more minimal theme for ggplot
|
title_hjust = NULL,
|
||||||
#'
|
title_position_to_plot = TRUE,
|
||||||
#' @param family The font family. Default to "Leelawadee"
|
text_size = 10,
|
||||||
#'
|
text_color = cols_reach("main_grey"),
|
||||||
#' @description Give some REACH colors and fonts to a ggplot. Based on theme_bw(). To be used for horizontal bar charts.
|
text_font_face = "plain",
|
||||||
#'
|
panel_background_color = "#FFFFFF",
|
||||||
#' @return A theme to be added to the "+" ggplot grammar
|
panel_border = FALSE,
|
||||||
#'
|
panel_border_color = cols_reach("main_grey"),
|
||||||
#' @export
|
legend_position = "right",
|
||||||
theme_reach_flip_hist <- function(family = "Leelawadee") {
|
legend_direction = "vertical",
|
||||||
|
legend_reverse = TRUE,
|
||||||
theme_reach() +
|
legend_title_size = 11,
|
||||||
ggplot2::theme(
|
legend_title_color = cols_reach("main_grey"),
|
||||||
panel.background = ggplot2::element_blank(),
|
legend_title_font_face = "plain",
|
||||||
strip.background = ggplot2::element_blank(),
|
legend_text_size = 10,
|
||||||
panel.border = ggplot2::element_blank(),
|
legend_text_color = cols_reach("main_grey"),
|
||||||
axis.ticks.y = ggplot2::element_blank()
|
legend_text_font_face = "plain",
|
||||||
)
|
axis_x = TRUE,
|
||||||
}
|
axis_y = TRUE,
|
||||||
|
axis_text_size = 10,
|
||||||
|
axis_text_color = cols_reach("main_grey"),
|
||||||
|
axis_text_font_face = "plain",
|
||||||
|
axis_title_size = 11,
|
||||||
|
axis_title_color = cols_reach("main_grey"),
|
||||||
|
axis_title_font_face = "bold",
|
||||||
|
axis_text_x_angle = 0,
|
||||||
|
axis_text_x_vjust = 0.5,
|
||||||
|
axis_text_x_hjust = 0.5,
|
||||||
|
grid_major_x = FALSE,
|
||||||
|
grid_major_y = FALSE,
|
||||||
|
grid_major_color = cols_reach("main_lt_grey"),
|
||||||
|
grid_major_x_size = 0.1,
|
||||||
|
grid_major_y_size = 0.1,
|
||||||
|
grid_minor_x = FALSE,
|
||||||
|
grid_minor_y = FALSE,
|
||||||
|
grid_minor_color = cols_reach("main_lt_grey"),
|
||||||
|
grid_minor_x_size = 0.05,
|
||||||
|
grid_minor_y_size = 0.05,
|
||||||
|
caption_position_to_plot = TRUE,
|
||||||
|
...
|
||||||
|
) {
|
||||||
|
|
||||||
|
# To do :
|
||||||
|
# - add facet theming
|
||||||
|
|
||||||
|
if (!initiative %in% c("reach", "default"))
|
||||||
|
rlang::abort(
|
||||||
|
c(
|
||||||
|
paste0("There is no initiative '", initiative, " to be used with theme_reach()."),
|
||||||
|
"i" = paste0("initiative should be either 'reach' or 'default'")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Basic simple theme
|
||||||
|
# theme_reach <- ggplot2::theme_bw()
|
||||||
|
|
||||||
|
theme_reach <- ggplot2::theme(
|
||||||
|
# Title - design
|
||||||
|
title = ggplot2::element_text(
|
||||||
|
family = font_family,
|
||||||
|
color = title_color,
|
||||||
|
size = title_size,
|
||||||
|
face = title_font_face
|
||||||
|
),
|
||||||
|
# Text - design
|
||||||
|
text = ggplot2::element_text(
|
||||||
|
family = font_family,
|
||||||
|
color = text_color,
|
||||||
|
size = text_size,
|
||||||
|
face = text_font_face
|
||||||
|
),
|
||||||
|
# Default legend to right position
|
||||||
|
legend.position = legend_position,
|
||||||
|
# Defaut legend to vertical direction
|
||||||
|
legend.direction = legend_direction,
|
||||||
|
# set panel background color
|
||||||
|
panel.background = ggplot2::element_rect(
|
||||||
|
fill = panel_background_color
|
||||||
|
),
|
||||||
|
# Remove background for legend key
|
||||||
|
legend.key = ggplot2::element_blank(),
|
||||||
|
# Text sizes
|
||||||
|
axis.text = ggplot2::element_text(
|
||||||
|
size = axis_text_size,
|
||||||
|
family = font_family,
|
||||||
|
face = axis_text_font_face,
|
||||||
|
color = axis_text_color
|
||||||
|
),
|
||||||
|
axis.title = ggplot2::element_text(
|
||||||
|
size = axis_title_size,
|
||||||
|
family = font_family,
|
||||||
|
face = axis_title_font_face,
|
||||||
|
color = axis_title_color),
|
||||||
|
# Wrap title
|
||||||
|
plot.title = ggtext::element_textbox(
|
||||||
|
hjust = title_hjust
|
||||||
|
),
|
||||||
|
plot.subtitle = ggtext::element_textbox(
|
||||||
|
hjust = title_hjust
|
||||||
|
),
|
||||||
|
plot.caption = ggtext::element_textbox(),
|
||||||
|
legend.title = ggplot2::element_text(
|
||||||
|
size = legend_title_size,
|
||||||
|
face = legend_title_font_face,
|
||||||
|
family = font_family,
|
||||||
|
color = legend_title_color),
|
||||||
|
legend.text = ggplot2::element_text(
|
||||||
|
size = legend_text_size,
|
||||||
|
face = legend_text_font_face,
|
||||||
|
family = font_family,
|
||||||
|
color = legend_text_color
|
||||||
|
),
|
||||||
|
axis.text.x = ggplot2::element_text(
|
||||||
|
angle = axis_text_x_angle,
|
||||||
|
vjust = axis_text_x_vjust,
|
||||||
|
hjust = axis_text_x_hjust
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Position of title
|
||||||
|
if (title_position_to_plot) theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
plot.title.position = "plot"
|
||||||
|
)
|
||||||
|
|
||||||
|
if (caption_position_to_plot) theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
plot.caption.position = "plot"
|
||||||
|
)
|
||||||
|
# Position of caption
|
||||||
|
|
||||||
|
# Axis lines ?
|
||||||
|
if (axis_x & axis_y) {
|
||||||
|
theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
axis.line = ggplot2::element_line(color = text_color))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!axis_x) {
|
||||||
|
theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
axis.line.x = ggplot2::element_blank(),
|
||||||
|
axis.ticks.x = ggplot2::element_blank(),
|
||||||
|
axis.text.x = ggplot2::element_blank())
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!axis_y) {
|
||||||
|
theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
axis.line.y = ggplot2::element_blank(),
|
||||||
|
axis.ticks.y = ggplot2::element_blank(),
|
||||||
|
axis.text.y = ggplot2::element_blank())
|
||||||
|
}
|
||||||
|
|
||||||
|
# X - major grid lines
|
||||||
|
if (!grid_major_x) theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.grid.major.x = ggplot2::element_blank()
|
||||||
|
) else theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.grid.major.x = ggplot2::element_line(
|
||||||
|
color = grid_major_color,
|
||||||
|
linewidth = grid_major_x_size)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Y - major grid lines
|
||||||
|
if (!grid_major_y) theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.grid.major.y = ggplot2::element_blank()
|
||||||
|
) else theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.grid.major.y = ggplot2::element_line(
|
||||||
|
color = grid_major_color,
|
||||||
|
linewidth = grid_major_y_size)
|
||||||
|
)
|
||||||
|
|
||||||
|
# X - minor grid lines
|
||||||
|
if (!grid_minor_x) theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.grid.minor.x = ggplot2::element_blank()
|
||||||
|
) else theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.grid.minor.x = ggplot2::element_line(
|
||||||
|
color = grid_minor_color,
|
||||||
|
linewidth = grid_minor_x_size)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Y - minor grid lines
|
||||||
|
if (!grid_minor_y) theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.grid.minor.y = ggplot2::element_blank()
|
||||||
|
) else theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.grid.minor.y = ggplot2::element_line(
|
||||||
|
color = grid_minor_color,
|
||||||
|
linewidth = grid_minor_y_size)
|
||||||
|
)
|
||||||
|
if (!panel_border) theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.border = ggplot2::element_blank()
|
||||||
|
) else theme_reach <- theme_reach +
|
||||||
|
ggplot2::theme(
|
||||||
|
panel.border = ggplot2::element_rect(color = panel_background_color)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Other parameters
|
||||||
|
theme_reach <- theme_reach + ggplot2::theme(...)
|
||||||
|
|
||||||
|
# Add reach color palettes by default
|
||||||
|
# (reversed guide is defaulted to TRUE for natural reading)
|
||||||
|
theme_reach <- list(
|
||||||
|
theme_reach,
|
||||||
|
scale_color(initiative = initiative, palette = palette, discrete = discrete, reverse = reverse, reverse_guide = legend_reverse),
|
||||||
|
scale_fill(initiative = initiative, palette = palette, discrete = discrete, reverse = reverse, reverse_guide = legend_reverse)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
return(theme_reach)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
7
R/visualizeR-package.R
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#' @keywords internal
|
||||||
|
"_PACKAGE"
|
||||||
|
|
||||||
|
## usethis namespace: start
|
||||||
|
#' @importFrom rlang :=
|
||||||
|
## usethis namespace: end
|
||||||
|
NULL
|
||||||
74
R/waffle.R
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
#' @title Simple waffle chart
|
||||||
|
#'
|
||||||
|
#' @param df A data frame.
|
||||||
|
#' @param x A character column or coercible as a character column. Will give the waffle's fill color.
|
||||||
|
#' @param y A numeric column (if plotting proportion, make sure to have percentages between 0 and 100 and not 0 and 1).
|
||||||
|
#' @param n_rows Number of rows. Default to 10.
|
||||||
|
#' @param size Width of the separator between blocks (defaults to 2).
|
||||||
|
#' @param x_title The x scale title. Default to NULL.
|
||||||
|
#' @param x_lab The x scale caption. Default to NULL.
|
||||||
|
#' @param title Plot title. Default to NULL.
|
||||||
|
#' @param subtitle Plot subtitle. Default to NULL.
|
||||||
|
#' @param caption Plot caption. Default to NULL.
|
||||||
|
#' @param arrange TRUE or FALSE. Arrange by highest percentage first.
|
||||||
|
#' @param theme Whatever theme. Default to theme_reach().
|
||||||
|
#'
|
||||||
|
#' @return A waffle chart
|
||||||
|
#'
|
||||||
|
#' @export
|
||||||
|
waffle <- function(df,
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
n_rows = 10,
|
||||||
|
size = 2,
|
||||||
|
x_title = NULL,
|
||||||
|
x_lab = NULL,
|
||||||
|
title = NULL,
|
||||||
|
subtitle = NULL,
|
||||||
|
caption = NULL,
|
||||||
|
arrange = TRUE,
|
||||||
|
theme = theme_reach(
|
||||||
|
axis_x = FALSE,
|
||||||
|
axis_y = FALSE,
|
||||||
|
legend_position = "bottom",
|
||||||
|
legend_direction = "horizontal",
|
||||||
|
title_hjust = 0.5)){
|
||||||
|
|
||||||
|
# A basic and not robust check
|
||||||
|
# - add check between 0 and 1
|
||||||
|
|
||||||
|
# Arrange by biggest prop first ?
|
||||||
|
if (arrange) df <- dplyr::arrange(
|
||||||
|
df,
|
||||||
|
dplyr::desc({{ y }})
|
||||||
|
)
|
||||||
|
|
||||||
|
# Mutate to 100
|
||||||
|
# df <- dplyr::mutate(df, "{{y}}" := {{ y }} * 100)
|
||||||
|
|
||||||
|
# Prepare named vector
|
||||||
|
values <- stats::setNames(dplyr::pull(df, {{ y }}), dplyr::pull(df, {{ x }}))
|
||||||
|
|
||||||
|
# Make plot
|
||||||
|
g <- waffle::waffle(values, xlab = x_lab, rows = n_rows, size = size)
|
||||||
|
|
||||||
|
# Add title, subtitle, caption, x_title, y_title
|
||||||
|
g <- g + ggplot2::labs(
|
||||||
|
title = title,
|
||||||
|
subtitle = subtitle,
|
||||||
|
caption = caption,
|
||||||
|
fill = x_title,
|
||||||
|
color = x_title
|
||||||
|
)
|
||||||
|
|
||||||
|
# Basic theme
|
||||||
|
# g <- g +
|
||||||
|
# hrbrthemes::theme_ipsum() #+
|
||||||
|
# waffle::theme_enhance_waffle()
|
||||||
|
|
||||||
|
# Add theme
|
||||||
|
g <- g + theme
|
||||||
|
|
||||||
|
return(g)
|
||||||
|
|
||||||
|
}
|
||||||
352
README.Rmd
|
|
@ -1,58 +1,294 @@
|
||||||
---
|
---
|
||||||
output: github_document
|
output: github_document
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- README.md is generated from README.Rmd. Please edit that file -->
|
<!-- README.md is generated from README.Rmd. Please edit that file -->
|
||||||
|
|
||||||
```{r, include = FALSE}
|
```{r, include = FALSE}
|
||||||
knitr::opts_chunk$set(
|
knitr::opts_chunk$set(
|
||||||
collapse = TRUE,
|
collapse = TRUE,
|
||||||
comment = "#>",
|
comment = "#>",
|
||||||
fig.path = "man/figures/README-",
|
fig.path = "man/figures/README-",
|
||||||
out.width = "100%"
|
out.width = "100%",
|
||||||
)
|
warning = FALSE,
|
||||||
|
message = FALSE,
|
||||||
desc = read.dcf('DESCRIPTION')
|
dpi = 300,
|
||||||
desc = setNames(as.list(desc), colnames(desc))
|
dev.args = list(type = "cairo")
|
||||||
```
|
)
|
||||||
|
|
||||||
|
desc = read.dcf('DESCRIPTION')
|
||||||
# `r desc$Package` <img src="man/figures/logo.png" align="right" alt="" width="120"/>
|
desc = setNames(as.list(desc), colnames(desc))
|
||||||
|
```
|
||||||
> `r desc$Title`
|
|
||||||
|
# `r desc$Package` <img src="man/figures/logo.png" align="right" alt="" width="120"/>
|
||||||
`visualizeR` proposes some utils to get REACH and AGORA colors, ready-to-go color palettes, and a few visualization functions (horizontal hist graph for instance).
|
|
||||||
|
> `r desc$Title`
|
||||||
## Installation
|
|
||||||
|
`visualizeR` proposes some utils to get REACH and AGORA colors, ready-to-go color palettes, and a few visualization functions (horizontal hist graph for instance).
|
||||||
You can install the last version of visualizeR from
|
|
||||||
[GitHub](https://github.com/) with:
|
## Installation
|
||||||
|
|
||||||
```{r, eval = FALSE}
|
You can install the last version of visualizeR from
|
||||||
# install.packages("devtools")
|
[GitHub](https://github.com/) with:
|
||||||
devtools::install_github("gnoblet/visualizeR", build_vignettes = TRUE)
|
|
||||||
```
|
```{r, eval = FALSE}
|
||||||
|
# install.packages("devtools")
|
||||||
## Roadmap
|
devtools::install_github("gnoblet/visualizeR", build_vignettes = TRUE)
|
||||||
|
```
|
||||||
Roadmap is as follows:
|
|
||||||
|
## Roadmap
|
||||||
- [ ] Add IMPACT's colors
|
|
||||||
- [ ] Add all color palettes from the internal documentation
|
Roadmap is as follows:
|
||||||
- [ ] Add new types of visualization (e.g. dumbbell plot)
|
|
||||||
- [ ] Use examples
|
- [X] Add IMPACT's colors
|
||||||
- [ ] Add some ease-map functions
|
- [X] Add all color palettes from the internal documentation
|
||||||
- [ ] Add some interactive functions (maps and graphs)
|
- [ ] There remains to be added more-than-7-color palettes and black color palettes
|
||||||
|
- [X] Add new types of visualization (e.g. dumbbell plot, lollipop plot, etc.)
|
||||||
## Request
|
- [X] Use examples
|
||||||
|
- [ ] Add some ease-map functions
|
||||||
Please, do not hesitate to pull request any new viz or colors or color palettes, or to email request any change (guillaume.noblet@reach-initiative.org or gnoblet@zaclys.net).
|
- [ ] Add some interactive functions (maps and graphs)
|
||||||
|
- [ ] Consolidate and make errors transparent
|
||||||
|
|
||||||
## Example
|
## Request
|
||||||
|
|
||||||
```{r example, eval = FALSE}
|
Please, do not hesitate to pull request any new viz or colors or color palettes, or to email request any change (guillaume.noblet@reach-initiative.org or gnoblet@zaclys.net).
|
||||||
library(visualizeR)
|
|
||||||
# Get all saved REACH colors, named
|
## Colors
|
||||||
cols_reach(unnamed = F)
|
|
||||||
```
|
Color palettes for REACH, AGORA and IMPACT are available. Functions to access colors and palettes are `cols_initiative()` or `pal_initiative()`. For now, the initiative with the most colors and color palettes is REACH. Feel free to pull requests new AGORA and IMPACT colors.
|
||||||
|
|
||||||
|
```{r example-colors, eval = TRUE}
|
||||||
|
library(visualizeR)
|
||||||
|
|
||||||
|
# Get all saved REACH colors, named
|
||||||
|
cols_reach(unnamed = F)[1:10]
|
||||||
|
|
||||||
|
# Extract a color palette as hexadecimal codes and reversed
|
||||||
|
pal_reach(palette = "main", reversed = TRUE, color_ramp_palette = FALSE)
|
||||||
|
|
||||||
|
# Get all color palettes names
|
||||||
|
pal_reach(show_palettes = T)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Charts
|
||||||
|
|
||||||
|
### Example 1: Bar chart, already REACH themed
|
||||||
|
|
||||||
|
```{r example-bar-chart, out.width = "65%", eval = TRUE}
|
||||||
|
library(visualizeR)
|
||||||
|
library(palmerpenguins)
|
||||||
|
library(dplyr)
|
||||||
|
|
||||||
|
df <- penguins |>
|
||||||
|
group_by(island, species) |>
|
||||||
|
summarize(
|
||||||
|
mean_bl = mean(bill_length_mm, na.rm = T),
|
||||||
|
mean_fl = mean(flipper_length_mm, na.rm = T)) |>
|
||||||
|
ungroup()
|
||||||
|
|
||||||
|
# Simple bar chart by group with some alpha transparency
|
||||||
|
bar(df, island, mean_bl, species, percent = FALSE, alpha = 0.6, x_title = "Mean of bill length")
|
||||||
|
|
||||||
|
# Using another color palette through `theme_reach()` and changing scale to percent
|
||||||
|
bar(df, island,mean_bl, species, percent = TRUE, theme = theme_reach(palette = "artichoke_3"))
|
||||||
|
|
||||||
|
# Not flipped, with text added, group_title, no y-axis and no bold for legend
|
||||||
|
bar(df, island, mean_bl, species, group_title = "Species", flip = FALSE, add_text = TRUE, add_text_suffix = "%", percent = FALSE, theme = theme_reach(text_font_face = "plain", axis_y = FALSE))
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 2: Point chart, already REACH themed
|
||||||
|
|
||||||
|
At this stage, `point_reach()` only supports categorical grouping colors with the `group` arg.
|
||||||
|
|
||||||
|
```{r example-point-chart, out.width = "65%", eval = TRUE}
|
||||||
|
|
||||||
|
# Simple point chart
|
||||||
|
point(penguins, bill_length_mm, flipper_length_mm)
|
||||||
|
|
||||||
|
# Point chart with grouping colors, greater dot size, some transparency, reversed color palette
|
||||||
|
point(penguins, bill_length_mm, flipper_length_mm, island, alpha = 0.6, size = 3, theme = theme_reach(reverse = TRUE))
|
||||||
|
|
||||||
|
# Using another color palettes
|
||||||
|
point(penguins, bill_length_mm, flipper_length_mm, island, size = 1.5, x_title = "Bill", y_title = "Flipper", title = "Length (mm)", theme = theme_reach(palette = "artichoke_3", text_font_face = , grid_major_x = TRUE, title_position_to_plot = FALSE))
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Example 3: Dumbbell plot, REACH themed
|
||||||
|
|
||||||
|
Remember to ensure that your data are in the long format and you only have two groups on the x-axis; for instance, IDP and returnee and no NA values.
|
||||||
|
|
||||||
|
```{r example-dumbbell-plot, out.width = "65%", eval = TRUE}
|
||||||
|
# Prepare long data
|
||||||
|
df <- tibble::tibble(
|
||||||
|
admin1 = rep(letters[1:8], 2),
|
||||||
|
setting = c(rep(c("Rural", "Urban"), 4), rep(c("Urban", "Rural"), 4)),
|
||||||
|
stat = rnorm(16, mean = 50, sd = 18)
|
||||||
|
) |>
|
||||||
|
dplyr::mutate(stat = round(stat, 0))
|
||||||
|
|
||||||
|
# Example, adding a parameter to `theme_reach()` passed on `ggplot2::theme()` to align legend title
|
||||||
|
|
||||||
|
dumbbell(df,
|
||||||
|
stat,
|
||||||
|
setting,
|
||||||
|
admin1,
|
||||||
|
title = "% of HHs that reported open defecation as sanitation facility",
|
||||||
|
group_y_title = "Admin 1",
|
||||||
|
group_x_title = "Setting",
|
||||||
|
theme = theme_reach(legend_position = "bottom",
|
||||||
|
legend_direction = "horizontal",
|
||||||
|
legend_title_font_face = "bold",
|
||||||
|
palette = "primary",
|
||||||
|
title_position_to_plot = FALSE,
|
||||||
|
legend.title.align = 0.5)) +
|
||||||
|
# Change legend title position (could be included as part of the function)
|
||||||
|
ggplot2::guides(
|
||||||
|
color = ggplot2::guide_legend(title.position = "left"),
|
||||||
|
fill = ggplot2::guide_legend(title.position = "left")
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 4: donut chart, REACH themed (to used once, not twice)
|
||||||
|
```{r example-donut-plot, out.width = "65%", warning = FALSE}
|
||||||
|
|
||||||
|
# Some summarized data: % of HHs by displacement status
|
||||||
|
df <- tibble::tibble(
|
||||||
|
status = c("Displaced", "Non displaced", "Returnee", "Don't know/Prefer not to say"),
|
||||||
|
percentage = c(18, 65, 12, 3)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Donut
|
||||||
|
donut(df,
|
||||||
|
status,
|
||||||
|
percentage,
|
||||||
|
hole_size = 3,
|
||||||
|
add_text_suffix = "%",
|
||||||
|
add_text_color = cols_reach("dk_grey"),
|
||||||
|
add_text_treshold_display = 5,
|
||||||
|
x_title = "Displacement status",
|
||||||
|
title = "% of HHs by displacement status",
|
||||||
|
theme = theme_reach(legend_reverse = TRUE))
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Example 5: waffle chart
|
||||||
|
```{r example-waffle-plot, out.width = "65%", warning = FALSE}
|
||||||
|
#
|
||||||
|
waffle(df, status, percentage, x_title = "A caption", title = "A title", subtitle = "A subtitle")
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Example 6: alluvial chart, REACH themed
|
||||||
|
```{r example-alluvial-plot, out.width = "65%", warning = FALSE}
|
||||||
|
|
||||||
|
# Some summarized data: % of HHs by self-reported status of displacement in 2021 and in 2022
|
||||||
|
df <- tibble::tibble(
|
||||||
|
status_from = c(rep("Displaced", 4),
|
||||||
|
rep("Non displaced", 4),
|
||||||
|
rep("Returnee", 4),
|
||||||
|
rep("Dnk/Pnts", 4)),
|
||||||
|
status_to = c("Displaced", "Non displaced", "Returnee", "Dnk/Pnts", "Displaced", "Non displaced", "Returnee", "Dnk/Pnts", "Displaced", "Non displaced", "Returnee", "Dnk/Pnts", "Displaced", "Non displaced", "Returnee", "Dnk/Pnts"),
|
||||||
|
percentage = c(20, 8, 18, 1, 12, 21, 0, 2, 0, 3, 12, 1, 0, 0, 1, 1)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Alluvial, here the group is the status for 2021
|
||||||
|
|
||||||
|
alluvial(df,
|
||||||
|
status_from,
|
||||||
|
status_to,
|
||||||
|
percentage,
|
||||||
|
status_from,
|
||||||
|
from_levels = c("Displaced", "Non displaced", "Returnee", "Dnk/Pnts"),
|
||||||
|
alpha = 0.8,
|
||||||
|
group_title = "Status for 2021",
|
||||||
|
title = "% of HHs by self-reported status from 2021 to 2022",
|
||||||
|
theme = theme_reach(
|
||||||
|
axis_y = FALSE,
|
||||||
|
legend_position = "none"))
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 7: lollipop chart
|
||||||
|
```{r example-lollipop-chart, out.width = "65%", warning = FALSE}
|
||||||
|
library(tidyr)
|
||||||
|
# Prepare long data
|
||||||
|
df <- tibble::tibble(
|
||||||
|
admin1 = replicate(15, sample(letters, 8)) |> t() |> as.data.frame() |> unite("admin1", sep = "") |> dplyr::pull(admin1),
|
||||||
|
stat = rnorm(15, mean = 50, sd = 15)) |>
|
||||||
|
dplyr::mutate(stat = round(stat, 0))
|
||||||
|
|
||||||
|
# Make lollipop plot, REACH themed, vertical with 45 degrees angle X-labels
|
||||||
|
lollipop(df,
|
||||||
|
admin1,
|
||||||
|
stat,
|
||||||
|
arrange = FALSE,
|
||||||
|
add_text = FALSE,
|
||||||
|
flip = FALSE,
|
||||||
|
y_title = "% of HHs",
|
||||||
|
x_title = "Admin 1",
|
||||||
|
title = "% of HHs that reported having received a humanitarian assistance",
|
||||||
|
theme = theme_reach(axis_text_x_angle = 45,
|
||||||
|
grid_major_y = TRUE,
|
||||||
|
grid_major_y_size = 0.2,
|
||||||
|
grid_major_x = TRUE,
|
||||||
|
grid_minor_y = TRUE))
|
||||||
|
|
||||||
|
# Horizontal, greater point size, arranged by value, no grid, and text labels added
|
||||||
|
lollipop(df,
|
||||||
|
admin1,
|
||||||
|
stat,
|
||||||
|
arrange = TRUE,
|
||||||
|
point_size = 10,
|
||||||
|
point_color = cols_reach("main_beige"),
|
||||||
|
segment_size = 2,
|
||||||
|
add_text = TRUE,
|
||||||
|
add_text_suffix = "%",
|
||||||
|
y_title = "% of HHs",
|
||||||
|
x_title = "Admin 1",
|
||||||
|
title = "% of HHs that reported having received a humanitarian assistance in the 12 months prior to the assessment",
|
||||||
|
theme = theme_reach(title_position_to_plot = FALSE))
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Maps
|
||||||
|
|
||||||
|
```{r example-map, out.width = "50%"}
|
||||||
|
|
||||||
|
# Add indicator layer
|
||||||
|
# - based on "pretty" classes and title "Proportion (%)"
|
||||||
|
# - buffer to add a 10% around the bounding box
|
||||||
|
map <- add_indicator_layer(
|
||||||
|
indicator_admin1,
|
||||||
|
opn_dfc,
|
||||||
|
buffer = 0.1) +
|
||||||
|
# Layout - some defaults - add the map title
|
||||||
|
add_layout("% of HH that reported open defecation as sanitation facility") +
|
||||||
|
# Admin boundaries as list of shape files (lines) and colors, line widths and labels as vectors
|
||||||
|
add_admin_boundaries(
|
||||||
|
lines = list(line_admin1, border_admin0, frontier_admin0),
|
||||||
|
colors = cols_reach("main_lt_grey", "dk_grey", "black"),
|
||||||
|
lwds = c(0.5, 2, 3),
|
||||||
|
labels = c("Department", "Country", "Dominican Rep. frontier"),
|
||||||
|
title = "Administrative boundaries") +
|
||||||
|
# Add text labels - centered on admin 1 centroids
|
||||||
|
add_admin_labels(centroid_admin1, ADM1_FR_UPPER) +
|
||||||
|
# Add a compass
|
||||||
|
add_compass() +
|
||||||
|
# Add a scale bar
|
||||||
|
add_scale_bar() +
|
||||||
|
# Add credits
|
||||||
|
add_credits("Admin. boundaries. : CNIGS \nCoord. system: GCS WGS 1984")
|
||||||
|
```
|
||||||
|
|
||||||
|
```{r map-save, eval = TRUE, include = FALSE, echo = TRUE}
|
||||||
|
tmap::tmap_save(map,
|
||||||
|
"man/figures/README-example-map.png",
|
||||||
|
height = 4.5,
|
||||||
|
width = 6
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
|
||||||
303
README.md
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
# visualizeR <img src="man/figures/logo.png" align="right" alt="" width="120"/>
|
# visualizeR <img src="man/figures/logo.png" align="right" alt="" width="120"/>
|
||||||
|
|
||||||
> What a color! What a viz!
|
> What a color\! What a viz\!
|
||||||
|
|
||||||
`visualizeR` proposes some utils to get REACH and AGORA colors,
|
`visualizeR` proposes some utils to get REACH and AGORA colors,
|
||||||
ready-to-go color palettes, and a few visualization functions
|
ready-to-go color palettes, and a few visualization functions
|
||||||
|
|
@ -23,12 +23,16 @@ devtools::install_github("gnoblet/visualizeR", build_vignettes = TRUE)
|
||||||
|
|
||||||
Roadmap is as follows:
|
Roadmap is as follows:
|
||||||
|
|
||||||
- [ ] Add IMPACT’s colors
|
- \[X\] Add IMPACT’s colors
|
||||||
- [ ] Add all color palettes from the internal documentation
|
- \[X\] Add all color palettes from the internal documentation
|
||||||
- [ ] Add new types of visualization (e.g. dumbbell plot)
|
- \[ \] There remains to be added more-than-7-color palettes and black
|
||||||
- [ ] Use examples
|
color palettes
|
||||||
- [ ] Add some ease-map functions
|
- \[X\] Add new types of visualization (e.g. dumbbell plot, lollipop
|
||||||
- [ ] Add some interactive functions (maps and graphs)
|
plot, etc.)
|
||||||
|
- \[X\] Use examples
|
||||||
|
- \[ \] Add some ease-map functions
|
||||||
|
- \[ \] Add some interactive functions (maps and graphs)
|
||||||
|
- \[ \] Consolidate and make errors transparent
|
||||||
|
|
||||||
## Request
|
## Request
|
||||||
|
|
||||||
|
|
@ -36,10 +40,291 @@ Please, do not hesitate to pull request any new viz or colors or color
|
||||||
palettes, or to email request any change
|
palettes, or to email request any change
|
||||||
(<guillaume.noblet@reach-initiative.org> or <gnoblet@zaclys.net>).
|
(<guillaume.noblet@reach-initiative.org> or <gnoblet@zaclys.net>).
|
||||||
|
|
||||||
## Example
|
## Colors
|
||||||
|
|
||||||
|
Color palettes for REACH, AGORA and IMPACT are available. Functions to
|
||||||
|
access colors and palettes are `cols_initiative()` or
|
||||||
|
`pal_initiative()`. For now, the initiative with the most colors and
|
||||||
|
color palettes is REACH. Feel free to pull requests new AGORA and IMPACT
|
||||||
|
colors.
|
||||||
|
|
||||||
``` r
|
``` r
|
||||||
library(visualizeR)
|
library(visualizeR)
|
||||||
|
|
||||||
# Get all saved REACH colors, named
|
# Get all saved REACH colors, named
|
||||||
cols_reach(unnamed = F)
|
cols_reach(unnamed = F)[1:10]
|
||||||
|
#> white black main_grey main_red main_lt_grey main_beige
|
||||||
|
#> "#FFFFFF" "#000000" "#58585A" "#EE5859" "#C7C8CA" "#D2CBB8"
|
||||||
|
#> iroise_1 iroise_2 iroise_3 iroise_4
|
||||||
|
#> "#DFECEF" "#B1D7E0" "#699DA3" "#236A7A"
|
||||||
|
|
||||||
|
# Extract a color palette as hexadecimal codes and reversed
|
||||||
|
pal_reach(palette = "main", reversed = TRUE, color_ramp_palette = FALSE)
|
||||||
|
#> [1] "#58585A" "#EE5859" "#C7C8CA" "#D2CBB8"
|
||||||
|
|
||||||
|
# Get all color palettes names
|
||||||
|
pal_reach(show_palettes = T)
|
||||||
|
#> [1] "main" "primary" "secondary" "two_dots"
|
||||||
|
#> [5] "two_dots_flashy" "red_main" "red_main_5" "red_alt"
|
||||||
|
#> [9] "red_alt_5" "iroise" "iroise_5" "discrete_6"
|
||||||
|
#> [13] "red_2" "red_3" "red_4" "red_5"
|
||||||
|
#> [17] "red_6" "red_7" "green_2" "green_3"
|
||||||
|
#> [21] "green_4" "green_5" "green_6" "green_7"
|
||||||
|
#> [25] "artichoke_2" "artichoke_3" "artichoke_4" "artichoke_5"
|
||||||
|
#> [29] "artichoke_6" "artichoke_7" "blue_2" "blue_3"
|
||||||
|
#> [33] "blue_4" "blue_5" "blue_6" "blue_7"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Charts
|
||||||
|
|
||||||
|
### Example 1: Bar chart, already REACH themed
|
||||||
|
|
||||||
|
``` r
|
||||||
|
library(visualizeR)
|
||||||
|
library(palmerpenguins)
|
||||||
|
library(dplyr)
|
||||||
|
|
||||||
|
df <- penguins |>
|
||||||
|
group_by(island, species) |>
|
||||||
|
summarize(
|
||||||
|
mean_bl = mean(bill_length_mm, na.rm = T),
|
||||||
|
mean_fl = mean(flipper_length_mm, na.rm = T)) |>
|
||||||
|
ungroup()
|
||||||
|
|
||||||
|
# Simple bar chart by group with some alpha transparency
|
||||||
|
bar(df, island, mean_bl, species, percent = FALSE, alpha = 0.6, x_title = "Mean of bill length")
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-bar-chart-1.png" width="65%" />
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Using another color palette through `theme_reach()` and changing scale to percent
|
||||||
|
bar(df, island,mean_bl, species, percent = TRUE, theme = theme_reach(palette = "artichoke_3"))
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-bar-chart-2.png" width="65%" />
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Not flipped, with text added, group_title, no y-axis and no bold for legend
|
||||||
|
bar(df, island, mean_bl, species, group_title = "Species", flip = FALSE, add_text = TRUE, add_text_suffix = "%", percent = FALSE, theme = theme_reach(text_font_face = "plain", axis_y = FALSE))
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-bar-chart-3.png" width="65%" />
|
||||||
|
|
||||||
|
### Example 2: Point chart, already REACH themed
|
||||||
|
|
||||||
|
At this stage, `point_reach()` only supports categorical grouping colors
|
||||||
|
with the `group` arg.
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Simple point chart
|
||||||
|
point(penguins, bill_length_mm, flipper_length_mm)
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-point-chart-1.png" width="65%" />
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Point chart with grouping colors, greater dot size, some transparency, reversed color palette
|
||||||
|
point(penguins, bill_length_mm, flipper_length_mm, island, alpha = 0.6, size = 3, theme = theme_reach(reverse = TRUE))
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-point-chart-2.png" width="65%" />
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Using another color palettes
|
||||||
|
point(penguins, bill_length_mm, flipper_length_mm, island, size = 1.5, x_title = "Bill", y_title = "Flipper", title = "Length (mm)", theme = theme_reach(palette = "artichoke_3", text_font_face = , grid_major_x = TRUE, title_position_to_plot = FALSE))
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-point-chart-3.png" width="65%" />
|
||||||
|
|
||||||
|
### Example 3: Dumbbell plot, REACH themed
|
||||||
|
|
||||||
|
Remember to ensure that your data are in the long format and you only
|
||||||
|
have two groups on the x-axis; for instance, IDP and returnee and no NA
|
||||||
|
values.
|
||||||
|
|
||||||
|
``` r
|
||||||
|
# Prepare long data
|
||||||
|
df <- tibble::tibble(
|
||||||
|
admin1 = rep(letters[1:8], 2),
|
||||||
|
setting = c(rep(c("Rural", "Urban"), 4), rep(c("Urban", "Rural"), 4)),
|
||||||
|
stat = rnorm(16, mean = 50, sd = 18)
|
||||||
|
) |>
|
||||||
|
dplyr::mutate(stat = round(stat, 0))
|
||||||
|
|
||||||
|
# Example, adding a parameter to `theme_reach()` passed on `ggplot2::theme()` to align legend title
|
||||||
|
|
||||||
|
dumbbell(df,
|
||||||
|
stat,
|
||||||
|
setting,
|
||||||
|
admin1,
|
||||||
|
title = "% of HHs that reported open defecation as sanitation facility",
|
||||||
|
group_y_title = "Admin 1",
|
||||||
|
group_x_title = "Setting",
|
||||||
|
theme = theme_reach(legend_position = "bottom",
|
||||||
|
legend_direction = "horizontal",
|
||||||
|
legend_title_font_face = "bold",
|
||||||
|
palette = "primary",
|
||||||
|
title_position_to_plot = FALSE,
|
||||||
|
legend.title.align = 0.5)) +
|
||||||
|
# Change legend title position (could be included as part of the function)
|
||||||
|
ggplot2::guides(
|
||||||
|
color = ggplot2::guide_legend(title.position = "left"),
|
||||||
|
fill = ggplot2::guide_legend(title.position = "left")
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-dumbbell-plot-1.png" width="65%" />
|
||||||
|
|
||||||
|
### Example 4: donut chart, REACH themed (to used once, not twice)
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Some summarized data: % of HHs by displacement status
|
||||||
|
df <- tibble::tibble(
|
||||||
|
status = c("Displaced", "Non displaced", "Returnee", "Don't know/Prefer not to say"),
|
||||||
|
percentage = c(18, 65, 12, 3)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Donut
|
||||||
|
donut(df,
|
||||||
|
status,
|
||||||
|
percentage,
|
||||||
|
hole_size = 3,
|
||||||
|
add_text_suffix = "%",
|
||||||
|
add_text_color = cols_reach("dk_grey"),
|
||||||
|
add_text_treshold_display = 5,
|
||||||
|
x_title = "Displacement status",
|
||||||
|
title = "% of HHs by displacement status",
|
||||||
|
theme = theme_reach(legend_reverse = TRUE))
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-donut-plot-1.png" width="65%" />
|
||||||
|
|
||||||
|
### Example 5: waffle chart
|
||||||
|
|
||||||
|
``` r
|
||||||
|
#
|
||||||
|
waffle(df, status, percentage, x_title = "A caption", title = "A title", subtitle = "A subtitle")
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-waffle-plot-1.png" width="65%" />
|
||||||
|
|
||||||
|
### Example 6: alluvial chart, REACH themed
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Some summarized data: % of HHs by self-reported status of displacement in 2021 and in 2022
|
||||||
|
df <- tibble::tibble(
|
||||||
|
status_from = c(rep("Displaced", 4),
|
||||||
|
rep("Non displaced", 4),
|
||||||
|
rep("Returnee", 4),
|
||||||
|
rep("Dnk/Pnts", 4)),
|
||||||
|
status_to = c("Displaced", "Non displaced", "Returnee", "Dnk/Pnts", "Displaced", "Non displaced", "Returnee", "Dnk/Pnts", "Displaced", "Non displaced", "Returnee", "Dnk/Pnts", "Displaced", "Non displaced", "Returnee", "Dnk/Pnts"),
|
||||||
|
percentage = c(20, 8, 18, 1, 12, 21, 0, 2, 0, 3, 12, 1, 0, 0, 1, 1)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Alluvial, here the group is the status for 2021
|
||||||
|
|
||||||
|
alluvial(df,
|
||||||
|
status_from,
|
||||||
|
status_to,
|
||||||
|
percentage,
|
||||||
|
status_from,
|
||||||
|
from_levels = c("Displaced", "Non displaced", "Returnee", "Dnk/Pnts"),
|
||||||
|
alpha = 0.8,
|
||||||
|
group_title = "Status for 2021",
|
||||||
|
title = "% of HHs by self-reported status from 2021 to 2022",
|
||||||
|
theme = theme_reach(
|
||||||
|
axis_y = FALSE,
|
||||||
|
legend_position = "none"))
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-alluvial-plot-1.png" width="65%" />
|
||||||
|
|
||||||
|
### Example 7: lollipop chart
|
||||||
|
|
||||||
|
``` r
|
||||||
|
library(tidyr)
|
||||||
|
# Prepare long data
|
||||||
|
df <- tibble::tibble(
|
||||||
|
admin1 = replicate(15, sample(letters, 8)) |> t() |> as.data.frame() |> unite("admin1", sep = "") |> dplyr::pull(admin1),
|
||||||
|
stat = rnorm(15, mean = 50, sd = 15)) |>
|
||||||
|
dplyr::mutate(stat = round(stat, 0))
|
||||||
|
|
||||||
|
# Make lollipop plot, REACH themed, vertical with 45 degrees angle X-labels
|
||||||
|
lollipop(df,
|
||||||
|
admin1,
|
||||||
|
stat,
|
||||||
|
arrange = FALSE,
|
||||||
|
add_text = FALSE,
|
||||||
|
flip = FALSE,
|
||||||
|
y_title = "% of HHs",
|
||||||
|
x_title = "Admin 1",
|
||||||
|
title = "% of HHs that reported having received a humanitarian assistance",
|
||||||
|
theme = theme_reach(axis_text_x_angle = 45,
|
||||||
|
grid_major_y = TRUE,
|
||||||
|
grid_major_y_size = 0.2,
|
||||||
|
grid_major_x = TRUE,
|
||||||
|
grid_minor_y = TRUE))
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-lollipop-chart-1.png" width="65%" />
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Horizontal, greater point size, arranged by value, no grid, and text labels added
|
||||||
|
lollipop(df,
|
||||||
|
admin1,
|
||||||
|
stat,
|
||||||
|
arrange = TRUE,
|
||||||
|
point_size = 10,
|
||||||
|
point_color = cols_reach("main_beige"),
|
||||||
|
segment_size = 2,
|
||||||
|
add_text = TRUE,
|
||||||
|
add_text_suffix = "%",
|
||||||
|
y_title = "% of HHs",
|
||||||
|
x_title = "Admin 1",
|
||||||
|
title = "% of HHs that reported having received a humanitarian assistance in the 12 months prior to the assessment",
|
||||||
|
theme = theme_reach(title_position_to_plot = FALSE))
|
||||||
|
```
|
||||||
|
|
||||||
|
<img src="man/figures/README-example-lollipop-chart-2.png" width="65%" />
|
||||||
|
|
||||||
|
## Maps
|
||||||
|
|
||||||
|
``` r
|
||||||
|
|
||||||
|
# Add indicator layer
|
||||||
|
# - based on "pretty" classes and title "Proportion (%)"
|
||||||
|
# - buffer to add a 10% around the bounding box
|
||||||
|
map <- add_indicator_layer(
|
||||||
|
indicator_admin1,
|
||||||
|
opn_dfc,
|
||||||
|
buffer = 0.1) +
|
||||||
|
# Layout - some defaults - add the map title
|
||||||
|
add_layout("% of HH that reported open defecation as sanitation facility") +
|
||||||
|
# Admin boundaries as list of shape files (lines) and colors, line widths and labels as vectors
|
||||||
|
add_admin_boundaries(
|
||||||
|
lines = list(line_admin1, border_admin0, frontier_admin0),
|
||||||
|
colors = cols_reach("main_lt_grey", "dk_grey", "black"),
|
||||||
|
lwds = c(0.5, 2, 3),
|
||||||
|
labels = c("Department", "Country", "Dominican Rep. frontier"),
|
||||||
|
title = "Administrative boundaries") +
|
||||||
|
# Add text labels - centered on admin 1 centroids
|
||||||
|
add_admin_labels(centroid_admin1, ADM1_FR_UPPER) +
|
||||||
|
# Add a compass
|
||||||
|
add_compass() +
|
||||||
|
# Add a scale bar
|
||||||
|
add_scale_bar() +
|
||||||
|
# Add credits
|
||||||
|
add_credits("Admin. boundaries. : CNIGS \nCoord. system: GCS WGS 1984")
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
|
||||||
BIN
data-raw/border_admin0.dbf
Normal file
1
data-raw/border_admin0.prj
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
PROJCS["WGS_1984_UTM_Zone_18N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-75.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["m",1.0]]
|
||||||
BIN
data-raw/border_admin0.shp
Normal file
BIN
data-raw/border_admin0.shx
Normal file
BIN
data-raw/centroid_admin1.dbf
Normal file
1
data-raw/centroid_admin1.prj
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
GEOGCS["GCS_unknown",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
|
||||||
BIN
data-raw/centroid_admin1.shp
Normal file
BIN
data-raw/centroid_admin1.shx
Normal file
BIN
data-raw/frontier_admin0.dbf
Normal file
1
data-raw/frontier_admin0.prj
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
|
||||||
BIN
data-raw/frontier_admin0.shp
Normal file
BIN
data-raw/frontier_admin0.shx
Normal file
BIN
data-raw/indicator_admin1.dbf
Normal file
1
data-raw/indicator_admin1.prj
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
|
||||||
BIN
data-raw/indicator_admin1.shp
Normal file
BIN
data-raw/indicator_admin1.shx
Normal file
BIN
data-raw/line_admin1.dbf
Normal file
1
data-raw/line_admin1.prj
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
|
||||||
BIN
data-raw/line_admin1.shp
Normal file
BIN
data-raw/line_admin1.shx
Normal file
21
data-raw/shapefiles.R
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
#------ Border - admin 0
|
||||||
|
border_admin0 <- sf::st_read("data-raw/border_admin0.shp")
|
||||||
|
usethis::use_data(border_admin0, overwrite = TRUE)
|
||||||
|
|
||||||
|
#------ Frontier - admin 0
|
||||||
|
frontier_admin0 <- sf::st_read("data-raw/frontier_admin0.shp")
|
||||||
|
usethis::use_data(frontier_admin0, overwrite = TRUE)
|
||||||
|
|
||||||
|
#------ Line - admin 1
|
||||||
|
line_admin1 <- sf::st_read("data-raw/line_admin1.shp")
|
||||||
|
usethis::use_data(line_admin1, overwrite = TRUE)
|
||||||
|
|
||||||
|
#------ Centroid - admin 1
|
||||||
|
centroid_admin1 <- sf::st_read("data-raw/centroid_admin1.shp") |>
|
||||||
|
dplyr::rename(ADM1_FR_UPPER = ADM1_FR_)
|
||||||
|
usethis::use_data(centroid_admin1, overwrite = TRUE)
|
||||||
|
|
||||||
|
#------ Indicator polygon - admin 1
|
||||||
|
indicator_admin1 <- sf::st_read("data-raw/indicator_admin1.shp")
|
||||||
|
usethis::use_data(indicator_admin1, overwrite = TRUE)
|
||||||
BIN
data/border_admin0.rda
Normal file
BIN
data/centroid_admin1.rda
Normal file
BIN
data/frontier_admin0.rda
Normal file
BIN
data/indicator_admin1.rda
Normal file
BIN
data/line_admin1.rda
Normal file
|
|
@ -13,10 +13,10 @@
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="https://gnoblet.github.io/visualizeR/apple-touch-icon-76x76.png">
|
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="https://gnoblet.github.io/visualizeR/apple-touch-icon-76x76.png">
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="https://gnoblet.github.io/visualizeR/apple-touch-icon-60x60.png">
|
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="https://gnoblet.github.io/visualizeR/apple-touch-icon-60x60.png">
|
||||||
<script src="https://gnoblet.github.io/visualizeR/deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<script src="https://gnoblet.github.io/visualizeR/deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<link href="https://gnoblet.github.io/visualizeR/deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet">
|
<link href="https://gnoblet.github.io/visualizeR/deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet">
|
||||||
<script src="https://gnoblet.github.io/visualizeR/deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
|
<script src="https://gnoblet.github.io/visualizeR/deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
|
||||||
<!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="https://gnoblet.github.io/visualizeR/pkgdown.js"></script><meta property="og:title" content="Page not found (404)">
|
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="https://gnoblet.github.io/visualizeR/pkgdown.js"></script><meta property="og:title" content="Page not found (404)">
|
||||||
<meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png">
|
<meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png">
|
||||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
<a class="navbar-brand me-2" href="https://gnoblet.github.io/visualizeR/index.html">visualizeR</a>
|
<a class="navbar-brand me-2" href="https://gnoblet.github.io/visualizeR/index.html">visualizeR</a>
|
||||||
|
|
||||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
|
@ -83,7 +83,7 @@ Content not found. Please use links in the navbar.
|
||||||
|
|
||||||
<div class="pkgdown-footer-right">
|
<div class="pkgdown-footer-right">
|
||||||
<p></p>
|
<p></p>
|
||||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>GNU General Public License • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png"><script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet"><script src="deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="GNU General Public License"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>GNU General Public License • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png"><script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="GNU General Public License"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
<![endif]--></head><body>
|
<![endif]--></head><body>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<a class="navbar-brand me-2" href="index.html">visualizeR</a>
|
<a class="navbar-brand me-2" href="index.html">visualizeR</a>
|
||||||
|
|
||||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
|
@ -45,7 +45,6 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="gnu-general-public-license" class="section level1">
|
<div id="gnu-general-public-license" class="section level1">
|
||||||
|
|
||||||
<p><em>Version 3, 29 June 2007</em><br><em>Copyright © 2007 Free Software Foundation, Inc. <<a href="http://fsf.org/" class="external-link uri">http://fsf.org/</a>></em></p>
|
<p><em>Version 3, 29 June 2007</em><br><em>Copyright © 2007 Free Software Foundation, Inc. <<a href="http://fsf.org/" class="external-link uri">http://fsf.org/</a>></em></p>
|
||||||
<p>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p>
|
<p>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
|
|
@ -250,7 +249,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pkgdown-footer-right">
|
<div class="pkgdown-footer-right">
|
||||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer></div>
|
</footer></div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Authors and Citation • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png"><script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet"><script src="deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="Authors and Citation"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Authors and Citation • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png"><script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="Authors and Citation"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
<![endif]--></head><body>
|
<![endif]--></head><body>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<a class="navbar-brand me-2" href="index.html">visualizeR</a>
|
<a class="navbar-brand me-2" href="index.html">visualizeR</a>
|
||||||
|
|
||||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
<h2 id="citation">Citation</h2>
|
<h2 id="citation">Citation</h2>
|
||||||
<p><small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small></p>
|
<p><small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small></p>
|
||||||
|
|
||||||
<p>Guillaume N (2022).
|
<p>Guillaume N (2023).
|
||||||
<em>visualizeR: What a color! What a viz!</em>.
|
<em>visualizeR: What a color! What a viz!</em>.
|
||||||
https://github.com/gnoblet/visualizeR,
|
https://github.com/gnoblet/visualizeR,
|
||||||
https://gnoblet.github.io/visualizeR/.
|
https://gnoblet.github.io/visualizeR/.
|
||||||
|
|
@ -64,7 +64,7 @@ https://gnoblet.github.io/visualizeR/.
|
||||||
<pre>@Manual{,
|
<pre>@Manual{,
|
||||||
title = {visualizeR: What a color! What a viz!},
|
title = {visualizeR: What a color! What a viz!},
|
||||||
author = {Noblet Guillaume},
|
author = {Noblet Guillaume},
|
||||||
year = {2022},
|
year = {2023},
|
||||||
note = {https://github.com/gnoblet/visualizeR,
|
note = {https://github.com/gnoblet/visualizeR,
|
||||||
https://gnoblet.github.io/visualizeR/},
|
https://gnoblet.github.io/visualizeR/},
|
||||||
}</pre>
|
}</pre>
|
||||||
|
|
@ -78,7 +78,7 @@ https://gnoblet.github.io/visualizeR/},
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pkgdown-footer-right">
|
<div class="pkgdown-footer-right">
|
||||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer></div>
|
</footer></div>
|
||||||
|
|
|
||||||
1
docs/deps/bootstrap-5.1.0/bootstrap.min.css
vendored
7
docs/deps/bootstrap-5.2.2/bootstrap.bundle.min.js
vendored
Normal file
1
docs/deps/bootstrap-5.2.2/bootstrap.bundle.min.js.map
Normal file
6
docs/deps/bootstrap-5.2.2/bootstrap.min.css
vendored
Normal file
|
|
@ -1,4 +1,4 @@
|
||||||
<script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script>
|
<script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||||
<link href="deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet" />
|
<link href="deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet" />
|
||||||
<script src="deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script>
|
<script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script>
|
||||||
|
|
|
||||||
281
docs/index.html
|
|
@ -14,10 +14,10 @@
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png">
|
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png">
|
||||||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png">
|
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png">
|
||||||
<script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<link href="deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet">
|
<link href="deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet">
|
||||||
<script src="deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
|
<script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
|
||||||
<!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="What a color! What a viz!">
|
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="What a color! What a viz!">
|
||||||
<meta property="og:description" content="It basically provides colors as hex codes, color palettes, and some viz functions (graphs and maps).">
|
<meta property="og:description" content="It basically provides colors as hex codes, color palettes, and some viz functions (graphs and maps).">
|
||||||
<meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png">
|
<meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png">
|
||||||
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<a class="navbar-brand me-2" href="index.html">visualizeR</a>
|
<a class="navbar-brand me-2" href="index.html">visualizeR</a>
|
||||||
|
|
||||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
|
@ -72,17 +72,15 @@
|
||||||
<img src="logo.png" class="logo" alt=""><h1 id="visualizer-">visualizeR <a class="anchor" aria-label="anchor" href="#visualizer-"></a>
|
<img src="logo.png" class="logo" alt=""><h1 id="visualizer-">visualizeR <a class="anchor" aria-label="anchor" href="#visualizer-"></a>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<blockquote>
|
<blockquote><p>What a color! What a viz!</p></blockquote>
|
||||||
<p>What a color! What a viz!</p>
|
|
||||||
</blockquote>
|
|
||||||
<p><code>visualizeR</code> proposes some utils to get REACH and AGORA colors, ready-to-go color palettes, and a few visualization functions (horizontal hist graph for instance).</p>
|
<p><code>visualizeR</code> proposes some utils to get REACH and AGORA colors, ready-to-go color palettes, and a few visualization functions (horizontal hist graph for instance).</p>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
|
<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
|
||||||
</h2>
|
</h2>
|
||||||
<p>You can install the last version of visualizeR from <a href="https://github.com/" class="external-link">GitHub</a> with:</p>
|
<p>You can install the last version of visualizeR from <a href="https://github.com/" class="external-link">GitHub</a> with:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
|
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
|
||||||
<code class="sourceCode R"><span class="co"># install.packages("devtools")</span>
|
<code class="sourceCode R"><span><span class="co"># install.packages("devtools")</span></span>
|
||||||
<span class="fu">devtools</span><span class="fu">::</span><span class="fu"><a href="https://devtools.r-lib.org/reference/remote-reexports.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"gnoblet/visualizeR"</span>, build_vignettes <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
|
<span><span class="fu">devtools</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"gnoblet/visualizeR"</span>, build_vignettes <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="roadmap">Roadmap<a class="anchor" aria-label="anchor" href="#roadmap"></a>
|
<h2 id="roadmap">Roadmap<a class="anchor" aria-label="anchor" href="#roadmap"></a>
|
||||||
|
|
@ -90,23 +88,21 @@
|
||||||
<p>Roadmap is as follows:</p>
|
<p>Roadmap is as follows:</p>
|
||||||
<ul class="task-list">
|
<ul class="task-list">
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" disabled>
|
<input type="checkbox" disabled checked>Add IMPACT’s colors</li>
|
||||||
Add IMPACT’s colors</li>
|
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" disabled>
|
<input type="checkbox" disabled checked>Add all color palettes from the internal documentation</li>
|
||||||
Add all color palettes from the internal documentation</li>
|
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" disabled>
|
<input type="checkbox" disabled>There remains to be added more-than-7-color palettes and black color palettes</li>
|
||||||
Add new types of visualization (e.g. dumbbell plot)</li>
|
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" disabled>
|
<input type="checkbox" disabled checked>Add new types of visualization (e.g. dumbbell plot, lollipop plot, etc.)</li>
|
||||||
Use examples</li>
|
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" disabled>
|
<input type="checkbox" disabled checked>Use examples</li>
|
||||||
Add some ease-map functions</li>
|
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" disabled>
|
<input type="checkbox" disabled>Add some ease-map functions</li>
|
||||||
Add some interactive functions (maps and graphs)</li>
|
<li>
|
||||||
|
<input type="checkbox" disabled>Add some interactive functions (maps and graphs)</li>
|
||||||
|
<li>
|
||||||
|
<input type="checkbox" disabled>Consolidate and make errors transparent</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
|
|
@ -115,12 +111,245 @@ Add some interactive functions (maps and graphs)</li>
|
||||||
<p>Please, do not hesitate to pull request any new viz or colors or color palettes, or to email request any change (<a href="mailto:guillaume.noblet@reach-initiative.org" class="email">guillaume.noblet@reach-initiative.org</a> or <a href="mailto:gnoblet@zaclys.net" class="email">gnoblet@zaclys.net</a>).</p>
|
<p>Please, do not hesitate to pull request any new viz or colors or color palettes, or to email request any change (<a href="mailto:guillaume.noblet@reach-initiative.org" class="email">guillaume.noblet@reach-initiative.org</a> or <a href="mailto:gnoblet@zaclys.net" class="email">gnoblet@zaclys.net</a>).</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="example">Example<a class="anchor" aria-label="anchor" href="#example"></a>
|
<h2 id="colors">Colors<a class="anchor" aria-label="anchor" href="#colors"></a>
|
||||||
</h2>
|
</h2>
|
||||||
|
<p>Color palettes for REACH, AGORA and IMPACT are available. Functions to access colors and palettes are <code>cols_initiative()</code> or <code>pal_initiative()</code>. For now, the initiative with the most colors and color palettes is REACH. Feel free to pull requests new AGORA and IMPACT colors.</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
|
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
|
||||||
<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/gnoblet/visualizeR" class="external-link">visualizeR</a></span><span class="op">)</span>
|
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/gnoblet/visualizeR" class="external-link">visualizeR</a></span><span class="op">)</span></span>
|
||||||
<span class="co"># Get all saved REACH colors, named</span>
|
<span></span>
|
||||||
<span class="fu"><a href="reference/cols_reach.html">cols_reach</a></span><span class="op">(</span>unnamed <span class="op">=</span> <span class="cn">F</span><span class="op">)</span></code></pre></div>
|
<span><span class="co"># Get all saved REACH colors, named</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/cols_reach.html">cols_reach</a></span><span class="op">(</span>unnamed <span class="op">=</span> <span class="cn">F</span><span class="op">)</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">10</span><span class="op">]</span></span>
|
||||||
|
<span><span class="co">#> white black main_grey main_red main_lt_grey main_beige </span></span>
|
||||||
|
<span><span class="co">#> "#FFFFFF" "#000000" "#58585A" "#EE5859" "#C7C8CA" "#D2CBB8" </span></span>
|
||||||
|
<span><span class="co">#> iroise_1 iroise_2 iroise_3 iroise_4 </span></span>
|
||||||
|
<span><span class="co">#> "#DFECEF" "#B1D7E0" "#699DA3" "#236A7A"</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="co"># Extract a color palette as hexadecimal codes and reversed</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/pal_reach.html">pal_reach</a></span><span class="op">(</span>palette <span class="op">=</span> <span class="st">"main"</span>, reversed <span class="op">=</span> <span class="cn">TRUE</span>, color_ramp_palette <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
|
||||||
|
<span><span class="co">#> [1] "#58585A" "#EE5859" "#C7C8CA" "#D2CBB8"</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="co"># Get all color palettes names</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/pal_reach.html">pal_reach</a></span><span class="op">(</span>show_palettes <span class="op">=</span> <span class="cn">T</span><span class="op">)</span></span>
|
||||||
|
<span><span class="co">#> [1] "main" "primary" "secondary" "two_dots" </span></span>
|
||||||
|
<span><span class="co">#> [5] "two_dots_flashy" "red_main" "red_main_5" "red_alt" </span></span>
|
||||||
|
<span><span class="co">#> [9] "red_alt_5" "iroise" "iroise_5" "discrete_6" </span></span>
|
||||||
|
<span><span class="co">#> [13] "red_2" "red_3" "red_4" "red_5" </span></span>
|
||||||
|
<span><span class="co">#> [17] "red_6" "red_7" "green_2" "green_3" </span></span>
|
||||||
|
<span><span class="co">#> [21] "green_4" "green_5" "green_6" "green_7" </span></span>
|
||||||
|
<span><span class="co">#> [25] "artichoke_2" "artichoke_3" "artichoke_4" "artichoke_5" </span></span>
|
||||||
|
<span><span class="co">#> [29] "artichoke_6" "artichoke_7" "blue_2" "blue_3" </span></span>
|
||||||
|
<span><span class="co">#> [33] "blue_4" "blue_5" "blue_6" "blue_7"</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="charts">Charts<a class="anchor" aria-label="anchor" href="#charts"></a>
|
||||||
|
</h2>
|
||||||
|
<div class="section level3">
|
||||||
|
<h3 id="example-1-bar-chart-already-reach-themed">Example 1: Bar chart, already REACH themed<a class="anchor" aria-label="anchor" href="#example-1-bar-chart-already-reach-themed"></a>
|
||||||
|
</h3>
|
||||||
|
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/gnoblet/visualizeR" class="external-link">visualizeR</a></span><span class="op">)</span></span>
|
||||||
|
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://allisonhorst.github.io/palmerpenguins/" class="external-link">palmerpenguins</a></span><span class="op">)</span></span>
|
||||||
|
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="va">df</span> <span class="op"><-</span> <span class="va">penguins</span> <span class="op">|></span> </span>
|
||||||
|
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by</a></span><span class="op">(</span><span class="va">island</span>, <span class="va">species</span><span class="op">)</span> <span class="op">|></span> </span>
|
||||||
|
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/summarise.html" class="external-link">summarize</a></span><span class="op">(</span></span>
|
||||||
|
<span> mean_bl <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/mean.html" class="external-link">mean</a></span><span class="op">(</span><span class="va">bill_length_mm</span>, na.rm <span class="op">=</span> <span class="cn">T</span><span class="op">)</span>,</span>
|
||||||
|
<span> mean_fl <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/mean.html" class="external-link">mean</a></span><span class="op">(</span><span class="va">flipper_length_mm</span>, na.rm <span class="op">=</span> <span class="cn">T</span><span class="op">)</span><span class="op">)</span> <span class="op">|></span> </span>
|
||||||
|
<span> <span class="fu"><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">ungroup</a></span><span class="op">(</span><span class="op">)</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="co"># Simple bar chart by group with some alpha transparency</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/bar.html">bar</a></span><span class="op">(</span><span class="va">df</span>, <span class="va">island</span>, <span class="va">mean_bl</span>, <span class="va">species</span>, percent <span class="op">=</span> <span class="cn">FALSE</span>, alpha <span class="op">=</span> <span class="fl">0.6</span>, x_title <span class="op">=</span> <span class="st">"Mean of bill length"</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-bar-chart-1.png" width="65%"></p>
|
||||||
|
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Using another color palette through `theme_reach()` and changing scale to percent</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/bar.html">bar</a></span><span class="op">(</span><span class="va">df</span>, <span class="va">island</span>,<span class="va">mean_bl</span>, <span class="va">species</span>, percent <span class="op">=</span> <span class="cn">TRUE</span>, theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span>palette <span class="op">=</span> <span class="st">"artichoke_3"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-bar-chart-2.png" width="65%"></p>
|
||||||
|
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Not flipped, with text added, group_title, no y-axis and no bold for legend</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/bar.html">bar</a></span><span class="op">(</span><span class="va">df</span>, <span class="va">island</span>, <span class="va">mean_bl</span>, <span class="va">species</span>, group_title <span class="op">=</span> <span class="st">"Species"</span>, flip <span class="op">=</span> <span class="cn">FALSE</span>, add_text <span class="op">=</span> <span class="cn">TRUE</span>, add_text_suffix <span class="op">=</span> <span class="st">"%"</span>, percent <span class="op">=</span> <span class="cn">FALSE</span>, theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span>text_font_face <span class="op">=</span> <span class="st">"plain"</span>, axis_y <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-bar-chart-3.png" width="65%"></p>
|
||||||
|
</div>
|
||||||
|
<div class="section level3">
|
||||||
|
<h3 id="example-2-point-chart-already-reach-themed">Example 2: Point chart, already REACH themed<a class="anchor" aria-label="anchor" href="#example-2-point-chart-already-reach-themed"></a>
|
||||||
|
</h3>
|
||||||
|
<p>At this stage, <code>point_reach()</code> only supports categorical grouping colors with the <code>group</code> arg.</p>
|
||||||
|
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Simple point chart</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/point.html">point</a></span><span class="op">(</span><span class="va">penguins</span>, <span class="va">bill_length_mm</span>, <span class="va">flipper_length_mm</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-point-chart-1.png" width="65%"></p>
|
||||||
|
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Point chart with grouping colors, greater dot size, some transparency, reversed color palette</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/point.html">point</a></span><span class="op">(</span><span class="va">penguins</span>, <span class="va">bill_length_mm</span>, <span class="va">flipper_length_mm</span>, <span class="va">island</span>, alpha <span class="op">=</span> <span class="fl">0.6</span>, size <span class="op">=</span> <span class="fl">3</span>, theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span>reverse <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-point-chart-2.png" width="65%"></p>
|
||||||
|
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Using another color palettes</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/point.html">point</a></span><span class="op">(</span><span class="va">penguins</span>, <span class="va">bill_length_mm</span>, <span class="va">flipper_length_mm</span>, <span class="va">island</span>, size <span class="op">=</span> <span class="fl">1.5</span>, x_title <span class="op">=</span> <span class="st">"Bill"</span>, y_title <span class="op">=</span> <span class="st">"Flipper"</span>, title <span class="op">=</span> <span class="st">"Length (mm)"</span>, theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span>palette <span class="op">=</span> <span class="st">"artichoke_3"</span>, text_font_face <span class="op">=</span> , grid_major_x <span class="op">=</span> <span class="cn">TRUE</span>, title_position_to_plot <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-point-chart-3.png" width="65%"></p>
|
||||||
|
</div>
|
||||||
|
<div class="section level3">
|
||||||
|
<h3 id="example-3-dumbbell-plot-reach-themed">Example 3: Dumbbell plot, REACH themed<a class="anchor" aria-label="anchor" href="#example-3-dumbbell-plot-reach-themed"></a>
|
||||||
|
</h3>
|
||||||
|
<p>Remember to ensure that your data are in the long format and you only have two groups on the x-axis; for instance, IDP and returnee and no NA values.</p>
|
||||||
|
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Prepare long data</span></span>
|
||||||
|
<span><span class="va">df</span> <span class="op"><-</span> <span class="fu">tibble</span><span class="fu">::</span><span class="fu"><a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a></span><span class="op">(</span></span>
|
||||||
|
<span> admin1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="va">letters</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">8</span><span class="op">]</span>, <span class="fl">2</span><span class="op">)</span>,</span>
|
||||||
|
<span> setting <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Rural"</span>, <span class="st">"Urban"</span><span class="op">)</span>, <span class="fl">4</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Urban"</span>, <span class="st">"Rural"</span><span class="op">)</span>, <span class="fl">4</span><span class="op">)</span><span class="op">)</span>,</span>
|
||||||
|
<span> stat <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">16</span>, mean <span class="op">=</span> <span class="fl">50</span>, sd <span class="op">=</span> <span class="fl">18</span><span class="op">)</span></span>
|
||||||
|
<span><span class="op">)</span> <span class="op">|></span></span>
|
||||||
|
<span> <span class="fu">dplyr</span><span class="fu">::</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span>stat <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="va">stat</span>, <span class="fl">0</span><span class="op">)</span><span class="op">)</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="co"># Example, adding a parameter to `theme_reach()` passed on `ggplot2::theme()` to align legend title</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/dumbbell.html">dumbbell</a></span><span class="op">(</span><span class="va">df</span>,</span>
|
||||||
|
<span> <span class="va">stat</span>,</span>
|
||||||
|
<span> <span class="va">setting</span>,</span>
|
||||||
|
<span> <span class="va">admin1</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="st">"% of HHs that reported open defecation as sanitation facility"</span>,</span>
|
||||||
|
<span> group_y_title <span class="op">=</span> <span class="st">"Admin 1"</span>,</span>
|
||||||
|
<span> group_x_title <span class="op">=</span> <span class="st">"Setting"</span>,</span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span>legend_position <span class="op">=</span> <span class="st">"bottom"</span>,</span>
|
||||||
|
<span> legend_direction <span class="op">=</span> <span class="st">"horizontal"</span>,</span>
|
||||||
|
<span> legend_title_font_face <span class="op">=</span> <span class="st">"bold"</span>,</span>
|
||||||
|
<span> palette <span class="op">=</span> <span class="st">"primary"</span>,</span>
|
||||||
|
<span> title_position_to_plot <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||||
|
<span> legend.title.align <span class="op">=</span> <span class="fl">0.5</span><span class="op">)</span><span class="op">)</span> <span class="op">+</span></span>
|
||||||
|
<span> <span class="co"># Change legend title position (could be included as part of the function)</span></span>
|
||||||
|
<span> <span class="fu">ggplot2</span><span class="fu">::</span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/guides.html" class="external-link">guides</a></span><span class="op">(</span> </span>
|
||||||
|
<span> color <span class="op">=</span> <span class="fu">ggplot2</span><span class="fu">::</span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/guide_legend.html" class="external-link">guide_legend</a></span><span class="op">(</span>title.position <span class="op">=</span> <span class="st">"left"</span><span class="op">)</span>,</span>
|
||||||
|
<span> fill <span class="op">=</span> <span class="fu">ggplot2</span><span class="fu">::</span><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/guide_legend.html" class="external-link">guide_legend</a></span><span class="op">(</span>title.position <span class="op">=</span> <span class="st">"left"</span><span class="op">)</span></span>
|
||||||
|
<span> <span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-dumbbell-plot-1.png" width="65%"></p>
|
||||||
|
</div>
|
||||||
|
<div class="section level3">
|
||||||
|
<h3 id="example-4-donut-chart-reach-themed-to-used-moderately">Example 4: donut chart, REACH themed (to used moderately)<a class="anchor" aria-label="anchor" href="#example-4-donut-chart-reach-themed-to-used-moderately"></a>
|
||||||
|
</h3>
|
||||||
|
<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Some summarized data: % of HHs by displacement status</span></span>
|
||||||
|
<span><span class="va">df</span> <span class="op"><-</span> <span class="fu">tibble</span><span class="fu">::</span><span class="fu"><a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a></span><span class="op">(</span></span>
|
||||||
|
<span> status <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Displaced"</span>, <span class="st">"Non displaced"</span>, <span class="st">"Returnee"</span>, <span class="st">"Don't know/Prefer not to say"</span><span class="op">)</span>,</span>
|
||||||
|
<span> percentage <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">18</span>, <span class="fl">65</span>, <span class="fl">12</span>, <span class="fl">3</span><span class="op">)</span></span>
|
||||||
|
<span><span class="op">)</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="co"># Donut</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/donut.html">donut</a></span><span class="op">(</span><span class="va">df</span>, </span>
|
||||||
|
<span> <span class="va">status</span>, </span>
|
||||||
|
<span> <span class="va">percentage</span>, </span>
|
||||||
|
<span> hole_size <span class="op">=</span> <span class="fl">3</span>, </span>
|
||||||
|
<span> add_text_suffix <span class="op">=</span> <span class="st">"%"</span>, </span>
|
||||||
|
<span> add_text_color <span class="op">=</span> <span class="fu"><a href="reference/cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"dk_grey"</span><span class="op">)</span>, </span>
|
||||||
|
<span> add_text_treshold_display <span class="op">=</span> <span class="fl">5</span>,</span>
|
||||||
|
<span> x_title <span class="op">=</span> <span class="st">"Displacement status"</span>, </span>
|
||||||
|
<span> title <span class="op">=</span> <span class="st">"% of HHs by displacement status"</span>, </span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span>legend_reverse <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-donut-plot-1.png" width="65%"></p>
|
||||||
|
</div>
|
||||||
|
<div class="section level3">
|
||||||
|
<h3 id="example-5-alluvial-chart-reach-themed">Example 5: alluvial chart, REACH themed<a class="anchor" aria-label="anchor" href="#example-5-alluvial-chart-reach-themed"></a>
|
||||||
|
</h3>
|
||||||
|
<div class="sourceCode" id="cb11"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Some summarized data: % of HHs by self-reported status of displacement in 2021 and in 2022</span></span>
|
||||||
|
<span><span class="va">df</span> <span class="op"><-</span> <span class="fu">tibble</span><span class="fu">::</span><span class="fu"><a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a></span><span class="op">(</span></span>
|
||||||
|
<span> status_from <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"Displaced"</span>, <span class="fl">4</span><span class="op">)</span>,</span>
|
||||||
|
<span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"Non displaced"</span>, <span class="fl">4</span><span class="op">)</span>,</span>
|
||||||
|
<span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"Returnee"</span>, <span class="fl">4</span><span class="op">)</span>,</span>
|
||||||
|
<span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"Dnk/Pnts"</span>, <span class="fl">4</span><span class="op">)</span><span class="op">)</span>,</span>
|
||||||
|
<span> status_to <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Displaced"</span>, <span class="st">"Non displaced"</span>, <span class="st">"Returnee"</span>, <span class="st">"Dnk/Pnts"</span>, <span class="st">"Displaced"</span>, <span class="st">"Non displaced"</span>, <span class="st">"Returnee"</span>, <span class="st">"Dnk/Pnts"</span>, <span class="st">"Displaced"</span>, <span class="st">"Non displaced"</span>, <span class="st">"Returnee"</span>, <span class="st">"Dnk/Pnts"</span>, <span class="st">"Displaced"</span>, <span class="st">"Non displaced"</span>, <span class="st">"Returnee"</span>, <span class="st">"Dnk/Pnts"</span><span class="op">)</span>,</span>
|
||||||
|
<span> percentage <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">20</span>, <span class="fl">8</span>, <span class="fl">18</span>, <span class="fl">1</span>, <span class="fl">12</span>, <span class="fl">21</span>, <span class="fl">0</span>, <span class="fl">2</span>, <span class="fl">0</span>, <span class="fl">3</span>, <span class="fl">12</span>, <span class="fl">1</span>, <span class="fl">0</span>, <span class="fl">0</span>, <span class="fl">1</span>, <span class="fl">1</span><span class="op">)</span></span>
|
||||||
|
<span><span class="op">)</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="co"># Alluvial, here the group is the status for 2021</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="fu"><a href="reference/alluvial.html">alluvial</a></span><span class="op">(</span><span class="va">df</span>, </span>
|
||||||
|
<span> <span class="va">status_from</span>, </span>
|
||||||
|
<span> <span class="va">status_to</span>,</span>
|
||||||
|
<span> <span class="va">percentage</span>, </span>
|
||||||
|
<span> <span class="va">status_from</span>,</span>
|
||||||
|
<span> from_levels <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Displaced"</span>, <span class="st">"Non displaced"</span>, <span class="st">"Returnee"</span>, <span class="st">"Dnk/Pnts"</span><span class="op">)</span>, </span>
|
||||||
|
<span> alpha <span class="op">=</span> <span class="fl">0.8</span>, </span>
|
||||||
|
<span> group_title <span class="op">=</span> <span class="st">"Status for 2021"</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="st">"% of HHs by self-reported status from 2021 to 2022"</span>, </span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span></span>
|
||||||
|
<span> axis_y <span class="op">=</span> <span class="cn">FALSE</span>, </span>
|
||||||
|
<span> legend_position <span class="op">=</span> <span class="st">"none"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-alluvial-plot-1.png" width="65%"></p>
|
||||||
|
</div>
|
||||||
|
<div class="section level3">
|
||||||
|
<h3 id="example-6-lollipop-chart">Example 6: lollipop chart<a class="anchor" aria-label="anchor" href="#example-6-lollipop-chart"></a>
|
||||||
|
</h3>
|
||||||
|
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://tidyr.tidyverse.org" class="external-link">tidyr</a></span><span class="op">)</span></span>
|
||||||
|
<span><span class="co"># Prepare long data</span></span>
|
||||||
|
<span><span class="va">df</span> <span class="op"><-</span> <span class="fu">tibble</span><span class="fu">::</span><span class="fu"><a href="https://tibble.tidyverse.org/reference/tibble.html" class="external-link">tibble</a></span><span class="op">(</span></span>
|
||||||
|
<span> admin1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">replicate</a></span><span class="op">(</span><span class="fl">15</span>, <span class="fu"><a href="https://rdrr.io/r/base/sample.html" class="external-link">sample</a></span><span class="op">(</span><span class="va">letters</span>, <span class="fl">8</span><span class="op">)</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/r/base/t.html" class="external-link">t</a></span><span class="op">(</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/r/base/as.data.frame.html" class="external-link">as.data.frame</a></span><span class="op">(</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://tidyr.tidyverse.org/reference/unite.html" class="external-link">unite</a></span><span class="op">(</span><span class="st">"admin1"</span>, sep <span class="op">=</span> <span class="st">""</span><span class="op">)</span> <span class="op">|></span> <span class="fu">dplyr</span><span class="fu">::</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/pull.html" class="external-link">pull</a></span><span class="op">(</span><span class="va">admin1</span><span class="op">)</span>, </span>
|
||||||
|
<span> stat <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">15</span>, mean <span class="op">=</span> <span class="fl">50</span>, sd <span class="op">=</span> <span class="fl">15</span><span class="op">)</span><span class="op">)</span> <span class="op">|></span></span>
|
||||||
|
<span> <span class="fu">dplyr</span><span class="fu">::</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/mutate.html" class="external-link">mutate</a></span><span class="op">(</span>stat <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="va">stat</span>, <span class="fl">0</span><span class="op">)</span><span class="op">)</span></span>
|
||||||
|
<span></span>
|
||||||
|
<span><span class="co"># Make lollipop plot, REACH themed, vertical with 45 degrees angle X-labels</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/lollipop.html">lollipop</a></span><span class="op">(</span><span class="va">df</span>,</span>
|
||||||
|
<span> <span class="va">admin1</span>,</span>
|
||||||
|
<span> <span class="va">stat</span>,</span>
|
||||||
|
<span> arrange <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||||
|
<span> add_text <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||||
|
<span> flip <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||||
|
<span> y_title <span class="op">=</span> <span class="st">"% of HHs"</span>,</span>
|
||||||
|
<span> x_title <span class="op">=</span> <span class="st">"Admin 1"</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="st">"% of HHs that reported having received a humanitarian assistance"</span>,</span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span>axis_text_x_angle <span class="op">=</span> <span class="fl">45</span>, </span>
|
||||||
|
<span> grid_major_y <span class="op">=</span> <span class="cn">TRUE</span>, </span>
|
||||||
|
<span> grid_major_y_size <span class="op">=</span> <span class="fl">0.2</span>, </span>
|
||||||
|
<span> grid_major_x <span class="op">=</span> <span class="cn">TRUE</span>, </span>
|
||||||
|
<span> grid_minor_y <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-lollipop-chart-1.png" width="65%"></p>
|
||||||
|
<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Horizontal, greater point size, arranged by value, no grid, and text labels added</span></span>
|
||||||
|
<span><span class="fu"><a href="reference/lollipop.html">lollipop</a></span><span class="op">(</span><span class="va">df</span>,</span>
|
||||||
|
<span> <span class="va">admin1</span>,</span>
|
||||||
|
<span> <span class="va">stat</span>,</span>
|
||||||
|
<span> arrange <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> point_size <span class="op">=</span> <span class="fl">10</span>,</span>
|
||||||
|
<span> point_color <span class="op">=</span> <span class="fu"><a href="reference/cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_beige"</span><span class="op">)</span>,</span>
|
||||||
|
<span> segment_size <span class="op">=</span> <span class="fl">2</span>,</span>
|
||||||
|
<span> add_text <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> add_text_suffix <span class="op">=</span> <span class="st">"%"</span>,</span>
|
||||||
|
<span> y_title <span class="op">=</span> <span class="st">"% of HHs"</span>,</span>
|
||||||
|
<span> x_title <span class="op">=</span> <span class="st">"Admin 1"</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="st">"% of HHs that reported having received a humanitarian assistance in the 12 months prior to the assessment"</span>,</span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="reference/theme_reach.html">theme_reach</a></span><span class="op">(</span>title_position_to_plot <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<p><img src="reference/figures/README-example-lollipop-chart-2.png" width="65%"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="maps">Maps<a class="anchor" aria-label="anchor" href="#maps"></a>
|
||||||
|
</h2>
|
||||||
|
<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r">
|
||||||
|
<code class="sourceCode R"><span><span class="co"># Add indicator layer </span></span>
|
||||||
|
<span><span class="co"># - based on "pretty" classes and title "Proportion (%)" </span></span>
|
||||||
|
<span><span class="co"># - buffer to add a 10% around the bounding box</span></span>
|
||||||
|
<span><span class="va">map</span> <span class="op"><-</span> <span class="fu"><a href="reference/add_indicator_layer.html">add_indicator_layer</a></span><span class="op">(</span></span>
|
||||||
|
<span> <span class="va">indicator_admin1</span>, </span>
|
||||||
|
<span> <span class="va">opn_dfc</span>,</span>
|
||||||
|
<span> buffer <span class="op">=</span> <span class="fl">0.1</span><span class="op">)</span> <span class="op">+</span> </span>
|
||||||
|
<span> <span class="co"># Layout - some defaults - add the map title</span></span>
|
||||||
|
<span> <span class="fu"><a href="reference/add_layout.html">add_layout</a></span><span class="op">(</span><span class="st">"% of HH that reported open defecation as sanitation facility"</span><span class="op">)</span> <span class="op">+</span> </span>
|
||||||
|
<span> <span class="co"># Admin boundaries as list of shape files (lines) and colors, line widths and labels as vectors</span></span>
|
||||||
|
<span> <span class="fu"><a href="reference/add_admin_boundaries.html">add_admin_boundaries</a></span><span class="op">(</span></span>
|
||||||
|
<span> lines <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="va">line_admin1</span>, <span class="va">border_admin0</span>, <span class="va">frontier_admin0</span><span class="op">)</span>,</span>
|
||||||
|
<span> colors <span class="op">=</span> <span class="fu"><a href="reference/cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_lt_grey"</span>, <span class="st">"dk_grey"</span>, <span class="st">"black"</span><span class="op">)</span>,</span>
|
||||||
|
<span> lwds <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.5</span>, <span class="fl">2</span>, <span class="fl">3</span><span class="op">)</span>,</span>
|
||||||
|
<span> labels <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Department"</span>, <span class="st">"Country"</span>, <span class="st">"Dominican Rep. frontier"</span><span class="op">)</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="st">"Administrative boundaries"</span><span class="op">)</span> <span class="op">+</span> </span>
|
||||||
|
<span> <span class="co"># Add text labels - centered on admin 1 centroids</span></span>
|
||||||
|
<span> <span class="fu"><a href="reference/add_admin_labels.html">add_admin_labels</a></span><span class="op">(</span><span class="va">centroid_admin1</span>, <span class="va">ADM1_FR_UPPER</span><span class="op">)</span> <span class="op">+</span></span>
|
||||||
|
<span> <span class="co"># Add a compass</span></span>
|
||||||
|
<span> <span class="fu"><a href="reference/add_compass.html">add_compass</a></span><span class="op">(</span><span class="op">)</span> <span class="op">+</span></span>
|
||||||
|
<span> <span class="co"># Add a scale bar</span></span>
|
||||||
|
<span> <span class="fu"><a href="reference/add_scale_bar.html">add_scale_bar</a></span><span class="op">(</span><span class="op">)</span> <span class="op">+</span></span>
|
||||||
|
<span> <span class="co"># Add credits</span></span>
|
||||||
|
<span> <span class="fu"><a href="reference/add_credits.html">add_credits</a></span><span class="op">(</span><span class="st">"Admin. boundaries. : CNIGS \nCoord. system: GCS WGS 1984"</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
<div class="figure">
|
||||||
|
<img src="reference/figures/README-example-map.png" alt=""><p class="caption">Once exported with <code><a href="https://rdrr.io/pkg/tmap/man/tmap_save.html" class="external-link">tmap::tmap_save()</a></code>.</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main><aside class="col-md-3"><div class="links">
|
</main><aside class="col-md-3"><div class="links">
|
||||||
|
|
@ -166,7 +395,7 @@ Add some interactive functions (maps and graphs)</li>
|
||||||
|
|
||||||
<div class="pkgdown-footer-right">
|
<div class="pkgdown-footer-right">
|
||||||
<p></p>
|
<p></p>
|
||||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
BIN
docs/logo.png
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Changelog • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Changelog"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Changelog • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Changelog"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
<![endif]--></head><body>
|
<![endif]--></head><body>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
|
@ -44,12 +44,87 @@
|
||||||
<small>Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/NEWS.md" class="external-link"><code>NEWS.md</code></a></small>
|
<small>Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/NEWS.md" class="external-link"><code>NEWS.md</code></a></small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.6.9000" id="visualizer-069000">visualizeR 0.6.9000<a class="anchor" aria-label="anchor" href="#visualizer-069000"></a></h2>
|
||||||
|
<ul><li>Add <code><a href="../reference/dumbbell.html">dumbbell()</a></code>.</li>
|
||||||
|
<li>Add <code><a href="../reference/alluvial.html">alluvial()</a></code>
|
||||||
|
</li>
|
||||||
|
<li>Add <code><a href="../reference/donut.html">donut()</a></code>
|
||||||
|
</li>
|
||||||
|
<li>Add <code><a href="../reference/lollipop.html">lollipop()</a></code>
|
||||||
|
</li>
|
||||||
|
<li>Add further parameters to <code><a href="../reference/theme_reach.html">theme_reach()</a></code>, including grid lines args.</li>
|
||||||
|
</ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.6.9000" id="visualizer-069000-1">visualizeR 0.6.9000<a class="anchor" aria-label="anchor" href="#visualizer-069000-1"></a></h2>
|
||||||
|
<ul><li>Add <code><a href="../reference/dumbbell.html">dumbbell()</a></code>.</li>
|
||||||
|
<li>Add further parameters to <code><a href="../reference/theme_reach.html">theme_reach()</a></code>.</li>
|
||||||
|
</ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.5.9000" id="visualizer-059000">visualizeR 0.5.9000<a class="anchor" aria-label="anchor" href="#visualizer-059000"></a></h2>
|
||||||
|
<ul><li>Add wrapping of title, subtitle and caption thanks to <code>ggtext</code>
|
||||||
|
</li>
|
||||||
|
<li>Add wrapping of labels for <code><a href="../reference/bar.html">bar()</a></code> x-discrete scale.</li>
|
||||||
|
<li>Add further parameters to <code><a href="../reference/theme_reach.html">theme_reach()</a></code>
|
||||||
|
</li>
|
||||||
|
</ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.4.9000" id="visualizer-049000">visualizeR 0.4.9000<a class="anchor" aria-label="anchor" href="#visualizer-049000"></a></h2>
|
||||||
|
<ul><li>Breaking changes: remove dependency to <code>ggblanket</code>.</li>
|
||||||
|
<li>Full rewrite of <code><a href="../reference/theme_reach.html">theme_reach()</a></code>.</li>
|
||||||
|
<li>
|
||||||
|
<code>bar_reach</code> is now <code><a href="../reference/bar.html">bar()</a></code> and theming is passed through argument <code>theme</code> for which default is <code><a href="../reference/theme_reach.html">theme_reach()</a></code>.</li>
|
||||||
|
<li>
|
||||||
|
<code>point_reach</code> is now <code><a href="../reference/point.html">point()</a></code> and theming is passed through argument <code>theme</code> for which default is <code><a href="../reference/theme_reach.html">theme_reach()</a></code>.</li>
|
||||||
|
</ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.3.9000" id="visualizer-039000">visualizeR 0.3.9000<a class="anchor" aria-label="anchor" href="#visualizer-039000"></a></h2>
|
||||||
|
<ul><li>Breaking changes: update to <code>ggblanket</code> v1.6.1.</li>
|
||||||
|
<li>Add plotting functions for indicator maps.</li>
|
||||||
|
</ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.2.9000" id="visualizer-029000">visualizeR 0.2.9000<a class="anchor" aria-label="anchor" href="#visualizer-029000"></a></h2>
|
||||||
|
<ul><li>Breaking changes: almost all functions got refinements, and there are new functions, typically <code>hbar()</code> becomes <code>bar_reach()</code> and <code>point_reach()</code> is added.</li>
|
||||||
|
<li>Following <code><a href="../reference/theme_reach.html">theme_reach()</a></code> is now used by all plotting functions.</li>
|
||||||
|
<li>Add README.md.</li>
|
||||||
|
</ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.1.7.9000" id="visualizer-0179000">visualizeR 0.1.7.9000<a class="anchor" aria-label="anchor" href="#visualizer-0179000"></a></h2>
|
||||||
|
<ul><li>Fixed some color palettes.</li></ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.1.6.9000" id="visualizer-0169000">visualizeR 0.1.6.9000<a class="anchor" aria-label="anchor" href="#visualizer-0169000"></a></h2>
|
||||||
|
<ul><li>IMPACT colors and palettes are added: function <code><a href="../reference/cols_impact.html">cols_impact()</a></code> <code><a href="../reference/pal_impact.html">pal_impact()</a></code>.</li>
|
||||||
|
<li>Color palettes from REACH are added (2 to 7 continuous palettes) ; see updated <code><a href="../reference/cols_reach.html">cols_reach()</a></code> and <code><a href="../reference/pal_reach.html">pal_reach()</a></code>.</li>
|
||||||
|
</ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.1.5.9000" id="visualizer-0159000">visualizeR 0.1.5.9000<a class="anchor" aria-label="anchor" href="#visualizer-0159000"></a></h2>
|
||||||
|
<ul><li>Move from <code>simplevis</code> to successor <code>ggblanket</code>.</li></ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.1.4.9000" id="visualizer-0149000">visualizeR 0.1.4.9000<a class="anchor" aria-label="anchor" href="#visualizer-0149000"></a></h2>
|
||||||
|
<ul><li>
|
||||||
|
<code>hbar()</code> gains a new boolean argument <code>reverse</code> to pass to <code><a href="../reference/pal_reach.html">pal_reach()</a></code> or <code><a href="../reference/pal_agora.html">pal_agora()</a></code>, indicating if the color palette should be reversed or not.</li></ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.1.3.9000" id="visualizer-0139000">visualizeR 0.1.3.9000<a class="anchor" aria-label="anchor" href="#visualizer-0139000"></a></h2>
|
||||||
|
<ul><li>Small change to <code>hbar()</code>: removes error arg within <code>simplevis::gg_hbar()</code> call.</li></ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.1.2.9000" id="visualizer-0129000">visualizeR 0.1.2.9000<a class="anchor" aria-label="anchor" href="#visualizer-0129000"></a></h2>
|
||||||
|
<ul><li>There was a duplicate <code><a href="../reference/scale_color.html">scale_color()</a></code> function, which should have been and is now <code><a href="../reference/scale_fill.html">scale_fill()</a></code>
|
||||||
|
</li></ul><hr></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 class="pkg-version" data-toc-text="0.1.1.9000" id="visualizer-0119000">visualizeR 0.1.1.9000<a class="anchor" aria-label="anchor" href="#visualizer-0119000"></a></h2>
|
||||||
|
<ul><li>Added two horizontal bar functions: <code>hbar()</code>, <code>hbar_percent()</code> (<a href="https://github.com/gnoblet/visualizeR/issues/3" class="external-link">#3</a>)</li>
|
||||||
|
<li>Added some internals to check for missing columns and bad arguments (<a href="https://github.com/gnoblet/visualizeR/issues/3" class="external-link">#3</a>)</li>
|
||||||
|
<li>Modified some <code><a href="../reference/theme_reach.html">theme_reach()</a></code> documentation</li>
|
||||||
|
<li>Add <code><a href="../reference/buffer_bbox.html">buffer_bbox()</a></code> function to produce a buffered bbox, e.g. for use with <code>tmap</code>
|
||||||
|
</li>
|
||||||
|
</ul><hr></div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 class="pkg-version" data-toc-text="0.1.0" id="visualizer-010">visualizeR 0.1.0<a class="anchor" aria-label="anchor" href="#visualizer-010"></a></h2>
|
<h2 class="pkg-version" data-toc-text="0.1.0" id="visualizer-010">visualizeR 0.1.0<a class="anchor" aria-label="anchor" href="#visualizer-010"></a></h2>
|
||||||
<ul><li>Added a <code>NEWS.md</code> file to track changes to the package.</li>
|
<ul><li>Added a <code>NEWS.md</code> file to track changes to the package</li>
|
||||||
<li>Initiate repo</li>
|
<li>Initiate repo</li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
</main></div>
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
<footer><div class="pkgdown-footer-left">
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
|
@ -57,7 +132,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pkgdown-footer-right">
|
<div class="pkgdown-footer-right">
|
||||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer></div>
|
</footer></div>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
pandoc: 2.17.1.1
|
pandoc: 2.14.0.3
|
||||||
pkgdown: 2.0.3
|
pkgdown: 2.0.7
|
||||||
pkgdown_sha: ~
|
pkgdown_sha: ~
|
||||||
articles: {}
|
articles: {}
|
||||||
last_built: 2022-05-01T21:34Z
|
last_built: 2023-01-25T00:47Z
|
||||||
urls:
|
urls:
|
||||||
reference: https://gnoblet.github.io/visualizeR/reference
|
reference: https://gnoblet.github.io/visualizeR/reference
|
||||||
article: https://gnoblet.github.io/visualizeR/articles
|
article: https://gnoblet.github.io/visualizeR/articles
|
||||||
|
|
|
||||||
97
docs/reference/abort_bad_argument.html
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Abord bad argument"><title>Abord bad argument — abort_bad_argument • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Abord bad argument — abort_bad_argument"><meta property="og:description" content="Abord bad argument"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Abord bad argument</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/internals.R" class="external-link"><code>R/internals.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>abort_bad_argument.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Abord bad argument</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">abort_bad_argument</span><span class="op">(</span><span class="va">arg</span>, <span class="va">must</span>, not <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>arg</dt>
|
||||||
|
<dd><p>An argument</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>must</dt>
|
||||||
|
<dd><p>What arg must be</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>not</dt>
|
||||||
|
<dd><p>Optional. What arg must not be.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A stop statement</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
121
docs/reference/add_admin_boundaries.html
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Add admin boundaries (lines) and the legend"><title>Add admin boundaries (lines) and the legend — add_admin_boundaries • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Add admin boundaries (lines) and the legend — add_admin_boundaries"><meta property="og:description" content="Add admin boundaries (lines) and the legend"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Add admin boundaries (lines) and the legend</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/map.R" class="external-link"><code>R/map.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>add_admin_boundaries.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Add admin boundaries (lines) and the legend</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">add_admin_boundaries</span><span class="op">(</span></span>
|
||||||
|
<span> <span class="va">lines</span>,</span>
|
||||||
|
<span> <span class="va">colors</span>,</span>
|
||||||
|
<span> <span class="va">labels</span>,</span>
|
||||||
|
<span> <span class="va">lwds</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="st">""</span>,</span>
|
||||||
|
<span> buffer <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> <span class="va">...</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>lines</dt>
|
||||||
|
<dd><p>List of multiline shape defined by sf package.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>colors</dt>
|
||||||
|
<dd><p>Vector of hexadecimal codes. Same order as lines.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>labels</dt>
|
||||||
|
<dd><p>Vector of labels in the legend. Same order as lines.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>lwds</dt>
|
||||||
|
<dd><p>Vector of line widths. Same order as lines.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>title</dt>
|
||||||
|
<dd><p>Legend title.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>buffer</dt>
|
||||||
|
<dd><p>A buffer, either one value or a vector of 4 values (left, bottom, right, top).</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>...</dt>
|
||||||
|
<dd><p>Other arguments to pass to each shape in `tmap::tm_lines()`.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A tmap layer.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
131
docs/reference/add_admin_labels.html
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels."><title>Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels. — add_admin_labels • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels. — add_admin_labels"><meta property="og:description" content="Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels."><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels.</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/map.R" class="external-link"><code>R/map.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>add_admin_labels.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Wrapper around `tmap::tm_text()` with sane defaults for plotting admin labels.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">add_admin_labels</span><span class="op">(</span></span>
|
||||||
|
<span> <span class="va">point</span>,</span>
|
||||||
|
<span> <span class="va">text</span>,</span>
|
||||||
|
<span> size <span class="op">=</span> <span class="fl">0.5</span>,</span>
|
||||||
|
<span> fontface <span class="op">=</span> <span class="st">"bold"</span>,</span>
|
||||||
|
<span> fontfamily <span class="op">=</span> <span class="st">"Leelawadee"</span>,</span>
|
||||||
|
<span> shadow <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> auto_placement <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||||
|
<span> remove_overlap <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||||
|
<span> <span class="va">...</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>point</dt>
|
||||||
|
<dd><p>Multipoint shape defined by sf package.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>text</dt>
|
||||||
|
<dd><p>Text labels column.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>size</dt>
|
||||||
|
<dd><p>Relative size of the text labels.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>fontface</dt>
|
||||||
|
<dd><p>Fontface.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>fontfamily</dt>
|
||||||
|
<dd><p>Fontfamily. Leelawadee is your precious.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>shadow</dt>
|
||||||
|
<dd><p>Boolean. Add a shadow around text labels. Issue opened on Github to request.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>auto_placement</dt>
|
||||||
|
<dd><p>Logical that determines whether the labels are placed automatically.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>remove_overlap</dt>
|
||||||
|
<dd><p>Logical that determines whether the overlapping labels are removed.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>...</dt>
|
||||||
|
<dd><p>Other arguments to pass to `tmap::tm_text()`.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A tmap layer.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
116
docs/reference/add_compass.html
Normal file
|
|
@ -0,0 +1,116 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Add a compass"><title>Add a compass — add_compass • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Add a compass — add_compass"><meta property="og:description" content="Add a compass"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Add a compass</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/map.R" class="external-link"><code>R/map.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>add_compass.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Add a compass</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">add_compass</span><span class="op">(</span></span>
|
||||||
|
<span> text_size <span class="op">=</span> <span class="fl">0.6</span>,</span>
|
||||||
|
<span> position <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"right"</span>, <span class="fl">0.8</span><span class="op">)</span>,</span>
|
||||||
|
<span> color_dark <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"black"</span><span class="op">)</span>,</span>
|
||||||
|
<span> text_color <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"black"</span><span class="op">)</span>,</span>
|
||||||
|
<span> type <span class="op">=</span> <span class="st">"4star"</span>,</span>
|
||||||
|
<span> <span class="va">...</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>text_size</dt>
|
||||||
|
<dd><p>Relative font size.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>position</dt>
|
||||||
|
<dd><p>Position of the compass. Vector of two values, specifying the x and y coordinates.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>color_dark</dt>
|
||||||
|
<dd><p>Color of the dark parts of the compass.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>text_color</dt>
|
||||||
|
<dd><p>color of the text.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>type</dt>
|
||||||
|
<dd><p>Compass type, one of: "arrow", "4star", "8star", "radar", "rose".</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>...</dt>
|
||||||
|
<dd><p>Other arguments to pass to `tmap::tm_compass()`.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A tmap layer.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
105
docs/reference/add_credits.html
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Do you want to credit someone or some institution?"><title>Do you want to credit someone or some institution? — add_credits • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Do you want to credit someone or some institution? — add_credits"><meta property="og:description" content="Do you want to credit someone or some institution?"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Do you want to credit someone or some institution?</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/map.R" class="external-link"><code>R/map.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>add_credits.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Do you want to credit someone or some institution?</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">add_credits</span><span class="op">(</span><span class="va">text</span>, size <span class="op">=</span> <span class="fl">0.4</span>, bg_color <span class="op">=</span> <span class="cn">NA</span>, position <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.75</span>, <span class="fl">0.02</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>text</dt>
|
||||||
|
<dd><p>Text.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>size</dt>
|
||||||
|
<dd><p>Relative text size.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>bg_color</dt>
|
||||||
|
<dd><p>Background color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>position</dt>
|
||||||
|
<dd><p>Position. Vector of two coordinates. Usually somewhere down.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>...</dt>
|
||||||
|
<dd><p>Other arguments to pass to `tmap::tm_credits()`.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A tmap layer.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
161
docs/reference/add_indicator_layer.html
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values"><title>Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values — add_indicator_layer • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values — add_indicator_layer"><meta property="og:description" content="Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/map.R" class="external-link"><code>R/map.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>add_indicator_layer.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">add_indicator_layer</span><span class="op">(</span></span>
|
||||||
|
<span> <span class="va">poly</span>,</span>
|
||||||
|
<span> <span class="va">col</span>,</span>
|
||||||
|
<span> buffer <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> n <span class="op">=</span> <span class="fl">5</span>,</span>
|
||||||
|
<span> style <span class="op">=</span> <span class="st">"pretty"</span>,</span>
|
||||||
|
<span> palette <span class="op">=</span> <span class="fu"><a href="pal_reach.html">pal_reach</a></span><span class="op">(</span><span class="st">"red_5"</span><span class="op">)</span>,</span>
|
||||||
|
<span> as_count <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> color_na <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"white"</span><span class="op">)</span>,</span>
|
||||||
|
<span> text_na <span class="op">=</span> <span class="st">"Missing data"</span>,</span>
|
||||||
|
<span> legend_title <span class="op">=</span> <span class="st">"Proportion (%)"</span>,</span>
|
||||||
|
<span> legend_text_separator <span class="op">=</span> <span class="st">" - "</span>,</span>
|
||||||
|
<span> border_alpha <span class="op">=</span> <span class="fl">1</span>,</span>
|
||||||
|
<span> border_col <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"lt_grey_1"</span><span class="op">)</span>,</span>
|
||||||
|
<span> lwd <span class="op">=</span> <span class="fl">1</span>,</span>
|
||||||
|
<span> <span class="va">...</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>poly</dt>
|
||||||
|
<dd><p>Multipolygon shape defined by sf package.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>col</dt>
|
||||||
|
<dd><p>Numeric attribute to map.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>buffer</dt>
|
||||||
|
<dd><p>A buffer, either one value or a vector of 4 values (left, bottom, right, top).</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>n</dt>
|
||||||
|
<dd><p>The desire number of classes.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>style</dt>
|
||||||
|
<dd><p>Method to process the color scale for continuous numerical variables. See `classInt::classIntervals()` for details.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>palette</dt>
|
||||||
|
<dd><p>Vector of fill colors as hexadecimal values. For REACH color palettes, it is possible to use `pal_reach()`. For now,'palette' must be changed manually, accordingly to the number of drawn classes.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>as_count</dt>
|
||||||
|
<dd><p>Boolean. When col is a numeric variable, should it be processed as a count variable? For instance, 0, 1-10, 11-20.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>color_na</dt>
|
||||||
|
<dd><p>Fill color for missing data.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>text_na</dt>
|
||||||
|
<dd><p>Legend text for missing data.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>legend_title</dt>
|
||||||
|
<dd><p>Legend title.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>legend_text_separator</dt>
|
||||||
|
<dd><p>Text separator for classes. E.g. " to " will give 0, 1 to 10, 11 to 20.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>border_alpha</dt>
|
||||||
|
<dd><p>Transparency of the border.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>border_col</dt>
|
||||||
|
<dd><p>Color of the border.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>lwd</dt>
|
||||||
|
<dd><p>Linewidth of the border.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>...</dt>
|
||||||
|
<dd><p>Other arguments to pass to `tmap::tm_polygons()`.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A tmap layer.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
141
docs/reference/add_layout.html
Normal file
|
|
@ -0,0 +1,141 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Basic defaults based on `tmap::tm_layout()`"><title>Basic defaults based on `tmap::tm_layout()` — add_layout • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Basic defaults based on `tmap::tm_layout()` — add_layout"><meta property="og:description" content="Basic defaults based on `tmap::tm_layout()`"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Basic defaults based on `tmap::tm_layout()`</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/map.R" class="external-link"><code>R/map.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>add_layout.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Basic defaults based on `tmap::tm_layout()`</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">add_layout</span><span class="op">(</span></span>
|
||||||
|
<span> title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> legend_position <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.02</span>, <span class="fl">0.5</span><span class="op">)</span>,</span>
|
||||||
|
<span> frame <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||||
|
<span> legend_frame <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_grey"</span><span class="op">)</span>,</span>
|
||||||
|
<span> legend_text_size <span class="op">=</span> <span class="fl">0.6</span>,</span>
|
||||||
|
<span> legend_title_size <span class="op">=</span> <span class="fl">0.8</span>,</span>
|
||||||
|
<span> title_size <span class="op">=</span> <span class="fl">0.9</span>,</span>
|
||||||
|
<span> title_fontface <span class="op">=</span> <span class="st">"bold"</span>,</span>
|
||||||
|
<span> title_color <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_grey"</span><span class="op">)</span>,</span>
|
||||||
|
<span> fontfamily <span class="op">=</span> <span class="st">"Leelawadee"</span>,</span>
|
||||||
|
<span> <span class="va">...</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>title</dt>
|
||||||
|
<dd><p>Map title.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>legend_position</dt>
|
||||||
|
<dd><p>Legend position. Not above the map is a good start.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>frame</dt>
|
||||||
|
<dd><p>Boolean. Legend frame?</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>legend_frame</dt>
|
||||||
|
<dd><p>Legend frame color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>legend_text_size</dt>
|
||||||
|
<dd><p>Legend text size in 'pt'.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>legend_title_size</dt>
|
||||||
|
<dd><p>Legend title size in 'pt'.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>title_size</dt>
|
||||||
|
<dd><p>Title text size in 'pt'.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>title_fontface</dt>
|
||||||
|
<dd><p>Title fontface. Bold if you wanna exemplify a lot what it is about.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>title_color</dt>
|
||||||
|
<dd><p>Title font color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>fontfamily</dt>
|
||||||
|
<dd><p>Overall fontfamily. Leelawadee is your precious.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>...</dt>
|
||||||
|
<dd><p>Other arguments to pass to `tmap::tm_layout()`.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A tmap layer.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
111
docs/reference/add_scale_bar.html
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Add a scale bar"><title>Add a scale bar — add_scale_bar • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Add a scale bar — add_scale_bar"><meta property="og:description" content="Add a scale bar"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Add a scale bar</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/map.R" class="external-link"><code>R/map.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>add_scale_bar.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Add a scale bar</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">add_scale_bar</span><span class="op">(</span></span>
|
||||||
|
<span> text_size <span class="op">=</span> <span class="fl">0.6</span>,</span>
|
||||||
|
<span> position <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"left"</span>, <span class="fl">0.01</span><span class="op">)</span>,</span>
|
||||||
|
<span> color_dark <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"black"</span><span class="op">)</span>,</span>
|
||||||
|
<span> breaks <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">50</span>, <span class="fl">100</span><span class="op">)</span>,</span>
|
||||||
|
<span> <span class="va">...</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>text_size</dt>
|
||||||
|
<dd><p>Relative font size.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>position</dt>
|
||||||
|
<dd><p>Position of the compass. Vector of two values, specifying the x and y coordinates.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>color_dark</dt>
|
||||||
|
<dd><p>Color of the dark parts of the compass.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>breaks</dt>
|
||||||
|
<dd><p>Breaks of the scale bar. If not specified, breaks will be automatically be chosen given the prefered width of the scale bar. Example: c(0, 50, 100).</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>...</dt>
|
||||||
|
<dd><p>Other arguments to pass to `tmap::tm_compass()`.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A tmap layer.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
166
docs/reference/alluvial.html
Normal file
|
|
@ -0,0 +1,166 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Simple alluvial chart"><title>Simple alluvial chart — alluvial • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Simple alluvial chart — alluvial"><meta property="og:description" content="Simple alluvial chart"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Simple alluvial chart</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/alluvial.R" class="external-link"><code>R/alluvial.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>alluvial.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Simple alluvial chart</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">alluvial</span><span class="op">(</span></span>
|
||||||
|
<span> <span class="va">df</span>,</span>
|
||||||
|
<span> <span class="va">from</span>,</span>
|
||||||
|
<span> <span class="va">to</span>,</span>
|
||||||
|
<span> <span class="va">value</span>,</span>
|
||||||
|
<span> group <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> alpha <span class="op">=</span> <span class="fl">0.5</span>,</span>
|
||||||
|
<span> from_levels <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> value_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> group_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> subtitle <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> caption <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> rect_color <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"white"</span><span class="op">)</span>,</span>
|
||||||
|
<span> rect_border_color <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_grey"</span><span class="op">)</span>,</span>
|
||||||
|
<span> rect_text_color <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_grey"</span><span class="op">)</span>,</span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="theme_reach.html">theme_reach</a></span><span class="op">(</span>axis_y <span class="op">=</span> <span class="cn">FALSE</span>, legend_position <span class="op">=</span> <span class="st">"none"</span><span class="op">)</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>df</dt>
|
||||||
|
<dd><p>A data frame.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>from</dt>
|
||||||
|
<dd><p>A character column of upstream stratum.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>to</dt>
|
||||||
|
<dd><p>A character column of downstream stratum.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>value</dt>
|
||||||
|
<dd><p>A numeric column of values.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>group</dt>
|
||||||
|
<dd><p>The grouping column to fill the alluvium with.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>alpha</dt>
|
||||||
|
<dd><p>Fill transparency. Default to 0.5.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>from_levels</dt>
|
||||||
|
<dd><p>Order by given from levels?</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>value_title</dt>
|
||||||
|
<dd><p>The value/y scale title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>group_title</dt>
|
||||||
|
<dd><p>The group title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>title</dt>
|
||||||
|
<dd><p>Plot title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>subtitle</dt>
|
||||||
|
<dd><p>Plot subtitle. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>caption</dt>
|
||||||
|
<dd><p>Plot caption. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>rect_color</dt>
|
||||||
|
<dd><p>Stratum rectangles' fill color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>rect_border_color</dt>
|
||||||
|
<dd><p>Stratum rectangles' border color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>rect_text_color</dt>
|
||||||
|
<dd><p>Stratum rectangles' text color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>theme</dt>
|
||||||
|
<dd><p>Whatever theme. Default to theme_reach().</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A donut chart to be used parsimoniously</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
176
docs/reference/bar.html
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Simple bar chart"><title>Simple bar chart — bar • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Simple bar chart — bar"><meta property="og:description" content="Simple bar chart"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Simple bar chart</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/bar.R" class="external-link"><code>R/bar.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>bar.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Simple bar chart</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">bar</span><span class="op">(</span></span>
|
||||||
|
<span> <span class="va">df</span>,</span>
|
||||||
|
<span> <span class="va">x</span>,</span>
|
||||||
|
<span> <span class="va">y</span>,</span>
|
||||||
|
<span> group <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> flip <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> percent <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> wrap <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> position <span class="op">=</span> <span class="st">"dodge"</span>,</span>
|
||||||
|
<span> alpha <span class="op">=</span> <span class="fl">1</span>,</span>
|
||||||
|
<span> x_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> y_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> group_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> subtitle <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> caption <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> add_text <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||||
|
<span> add_text_suffix <span class="op">=</span> <span class="st">""</span>,</span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="theme_reach.html">theme_reach</a></span><span class="op">(</span><span class="op">)</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>df</dt>
|
||||||
|
<dd><p>A data frame.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>x</dt>
|
||||||
|
<dd><p>A numeric column.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>y</dt>
|
||||||
|
<dd><p>A character column or coercible as a character column.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>group</dt>
|
||||||
|
<dd><p>Some grouping categorical column, e.g. administrative areas or population groups.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>flip</dt>
|
||||||
|
<dd><p>TRUE or FALSE. Default to TRUE or horizontal bar plot.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>percent</dt>
|
||||||
|
<dd><p>TRUE or FALSE. Should the x-labels (and text labels if present) be displayed as percentages? Default to TRUE.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>wrap</dt>
|
||||||
|
<dd><p>Should x-labels be wrapped? Number of characters.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>position</dt>
|
||||||
|
<dd><p>Should the chart be stacked? Default to "dodge". Can take "dodge" and "stack".</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>alpha</dt>
|
||||||
|
<dd><p>Fill transparency.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>x_title</dt>
|
||||||
|
<dd><p>The x scale title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>y_title</dt>
|
||||||
|
<dd><p>The y scale title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>group_title</dt>
|
||||||
|
<dd><p>The group legend title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>title</dt>
|
||||||
|
<dd><p>Plot title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>subtitle</dt>
|
||||||
|
<dd><p>Plot subtitle. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>caption</dt>
|
||||||
|
<dd><p>Plot caption. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text</dt>
|
||||||
|
<dd><p>TRUE or FALSE. Add the value as text.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text_suffix</dt>
|
||||||
|
<dd><p>If percent is FALSE, should we add a suffix to the text label?</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>theme</dt>
|
||||||
|
<dd><p>Whatever theme. Default to theme_reach().</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A bar chart</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
102
docs/reference/border_admin0.html
Normal file
|
|
@ -0,0 +1,102 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="A multiline shapefile of Haiti's border."><title>Haïti border. — border_admin0 • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Haïti border. — border_admin0"><meta property="og:description" content="A multiline shapefile of Haiti's border."><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Haïti border.</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/data.R" class="external-link"><code>R/data.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>border_admin0.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>A multiline shapefile of Haiti's border.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">border_admin0</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
|
||||||
|
<p>A sf multiline objet with 1 feature and 6 fields:</p><dl><dt>fid_1</dt>
|
||||||
|
<dd><p>fid_1</p></dd>
|
||||||
|
|
||||||
|
<dt>uno</dt>
|
||||||
|
<dd><p>uno</p></dd>
|
||||||
|
|
||||||
|
<dt>count</dt>
|
||||||
|
<dd><p>count</p></dd>
|
||||||
|
|
||||||
|
<dt>x_coord</dt>
|
||||||
|
<dd><p>x_coord</p></dd>
|
||||||
|
|
||||||
|
<dt>y_coord</dt>
|
||||||
|
<dd><p>y_coord</p></dd>
|
||||||
|
|
||||||
|
<dt>area</dt>
|
||||||
|
<dd><p>area</p></dd>
|
||||||
|
|
||||||
|
<dt>geometry</dt>
|
||||||
|
<dd><p>Multiline geometry.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
93
docs/reference/buffer_bbox.html
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Bbbox buffer"><title>Bbbox buffer — buffer_bbox • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Bbbox buffer — buffer_bbox"><meta property="og:description" content="Bbbox buffer"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Bbbox buffer</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/bbox_buffer.R" class="external-link"><code>R/bbox_buffer.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>buffer_bbox.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Bbbox buffer</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">buffer_bbox</span><span class="op">(</span><span class="va">sf_obj</span>, buffer <span class="op">=</span> <span class="fl">0</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>sf_obj</dt>
|
||||||
|
<dd><p>A `sf` object</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>buffer</dt>
|
||||||
|
<dd><p>A buffer, either one value or a vector of 4 values (left, bottom, right, top). Default to 0.</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A bbox with a buffer</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
111
docs/reference/centroid_admin1.html
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="A multipoint shapefile of Haiti's admin 1."><title>Haïti admin 1 centroids shapefile. — centroid_admin1 • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Haïti admin 1 centroids shapefile. — centroid_admin1"><meta property="og:description" content="A multipoint shapefile of Haiti's admin 1."><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Haïti admin 1 centroids shapefile.</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/data.R" class="external-link"><code>R/data.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>centroid_admin1.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>A multipoint shapefile of Haiti's admin 1.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">centroid_admin1</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
|
||||||
|
<p>A sf multipoint object with 10 features and 9 fields:</p><dl><dt>ADM1_PC</dt>
|
||||||
|
<dd><p>Admin 1 postal code.</p></dd>
|
||||||
|
|
||||||
|
<dt>ADM1_EN</dt>
|
||||||
|
<dd><p>Full name in English.</p></dd>
|
||||||
|
|
||||||
|
<dt>ADM1_FR</dt>
|
||||||
|
<dd><p>Full name in French.</p></dd>
|
||||||
|
|
||||||
|
<dt>ADM1_HT</dt>
|
||||||
|
<dd><p>Full name in Haitian Creole.</p></dd>
|
||||||
|
|
||||||
|
<dt>ADM0_EN</dt>
|
||||||
|
<dd><p>Country name in English.</p></dd>
|
||||||
|
|
||||||
|
<dt>ADM0_FR</dt>
|
||||||
|
<dd><p>Country name in French.</p></dd>
|
||||||
|
|
||||||
|
<dt>ADM0_HT</dt>
|
||||||
|
<dd><p>Country name in Haitian Creole.</p></dd>
|
||||||
|
|
||||||
|
<dt>ADM0_PC</dt>
|
||||||
|
<dd><p>Country postal code.</p></dd>
|
||||||
|
|
||||||
|
<dt>ADM1_FR_UPPER</dt>
|
||||||
|
<dd><p>Admin 1 French name - uppercase.</p></dd>
|
||||||
|
|
||||||
|
<dt>geometry</dt>
|
||||||
|
<dd><p>Multipoint geometry.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Function to extract AGORA colors as hex codes"><title>Function to extract AGORA colors as hex codes — cols_agora • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to extract AGORA colors as hex codes — cols_agora"><meta property="og:description" content="Function to extract AGORA colors as hex codes"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Function to extract AGORA colors as hex codes"><title>Function to extract AGORA colors as hex codes — cols_agora • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to extract AGORA colors as hex codes — cols_agora"><meta property="og:description" content="Function to extract AGORA colors as hex codes"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
<![endif]--></head><body>
|
<![endif]--></head><body>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
|
@ -51,19 +51,24 @@
|
||||||
|
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">cols_agora</span><span class="op">(</span><span class="va">...</span>, unnamed <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">cols_agora</span><span class="op">(</span><span class="va">...</span>, unnamed <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
<dl><dt>...</dt>
|
<dl><dt>...</dt>
|
||||||
<dd><p>Character names of reach colors. If NULL returns all colors</p></dd>
|
<dd><p>Character names of reach colors. If NULL returns all colors</p></dd>
|
||||||
|
|
||||||
|
|
||||||
<dt>unnamed</dt>
|
<dt>unnamed</dt>
|
||||||
<dd><p>Should the output vector be unnamed? Default to `TRUE`</p></dd>
|
<dd><p>Should the output vector be unnamed? Default to `TRUE`</p></dd>
|
||||||
|
|
||||||
</dl></div>
|
</dl></div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
<p>An hex code or hex codes named or unnamed</p>
|
|
||||||
|
|
||||||
|
<p>An hex code or hex codes named or unnamed</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
||||||
|
|
@ -79,7 +84,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pkgdown-footer-right">
|
<div class="pkgdown-footer-right">
|
||||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer></div>
|
</footer></div>
|
||||||
|
|
|
||||||
97
docs/reference/cols_impact.html
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Function to extract IMPACT colors as hex codes"><title>Function to extract IMPACT colors as hex codes — cols_impact • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to extract IMPACT colors as hex codes — cols_impact"><meta property="og:description" content="Function to extract IMPACT colors as hex codes"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Function to extract IMPACT colors as hex codes</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/cols_impact.R" class="external-link"><code>R/cols_impact.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>cols_impact.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Function to extract IMPACT colors as hex codes</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">cols_impact</span><span class="op">(</span><span class="va">...</span>, unnamed <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>...</dt>
|
||||||
|
<dd><p>Character names of reach colors. If NULL returns all colors</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>unnamed</dt>
|
||||||
|
<dd><p>Should the output vector be unnamed? Default to `TRUE`</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>An hex code or hex codes named or unnamed</p>
|
||||||
|
</div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
||||||
|
<p>This function needs to be modified to add colors</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Function to extract REACH colors as hex codes"><title>Function to extract REACH colors as hex codes — cols_reach • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to extract REACH colors as hex codes — cols_reach"><meta property="og:description" content="Function to extract REACH colors as hex codes"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Function to extract REACH colors as hex codes"><title>Function to extract REACH colors as hex codes — cols_reach • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to extract REACH colors as hex codes — cols_reach"><meta property="og:description" content="Function to extract REACH colors as hex codes"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
<![endif]--></head><body>
|
<![endif]--></head><body>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
|
@ -51,19 +51,24 @@
|
||||||
|
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">cols_reach</span><span class="op">(</span><span class="va">...</span>, unnamed <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">cols_reach</span><span class="op">(</span><span class="va">...</span>, unnamed <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
<dl><dt>...</dt>
|
<dl><dt>...</dt>
|
||||||
<dd><p>Character names of reach colors. If NULL returns all colors</p></dd>
|
<dd><p>Character names of reach colors. If NULL returns all colors</p></dd>
|
||||||
|
|
||||||
|
|
||||||
<dt>unnamed</dt>
|
<dt>unnamed</dt>
|
||||||
<dd><p>Should the output vector be unnamed? Default to `TRUE`</p></dd>
|
<dd><p>Should the output vector be unnamed? Default to `TRUE`</p></dd>
|
||||||
|
|
||||||
</dl></div>
|
</dl></div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
<p>An hex code or hex codes named or unnamed</p>
|
|
||||||
|
|
||||||
|
<p>An hex code or hex codes named or unnamed</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
|
||||||
|
|
@ -79,7 +84,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pkgdown-footer-right">
|
<div class="pkgdown-footer-right">
|
||||||
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer></div>
|
</footer></div>
|
||||||
|
|
|
||||||
161
docs/reference/donut.html
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Simple donut chart (to be used parsimoniously), can be a pie chart"><title>Simple donut chart (to be used parsimoniously), can be a pie chart — donut • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Simple donut chart (to be used parsimoniously), can be a pie chart — donut"><meta property="og:description" content="Simple donut chart (to be used parsimoniously), can be a pie chart"><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Simple donut chart (to be used parsimoniously), can be a pie chart</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/donut.R" class="external-link"><code>R/donut.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>donut.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Simple donut chart (to be used parsimoniously), can be a pie chart</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">donut</span><span class="op">(</span></span>
|
||||||
|
<span> <span class="va">df</span>,</span>
|
||||||
|
<span> <span class="va">x</span>,</span>
|
||||||
|
<span> <span class="va">y</span>,</span>
|
||||||
|
<span> alpha <span class="op">=</span> <span class="fl">1</span>,</span>
|
||||||
|
<span> x_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> subtitle <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> caption <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> arrange <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> hole_size <span class="op">=</span> <span class="fl">3</span>,</span>
|
||||||
|
<span> add_text <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> add_text_treshold_display <span class="op">=</span> <span class="fl">5</span>,</span>
|
||||||
|
<span> add_text_color <span class="op">=</span> <span class="st">"white"</span>,</span>
|
||||||
|
<span> add_text_suffix <span class="op">=</span> <span class="st">""</span>,</span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="theme_reach.html">theme_reach</a></span><span class="op">(</span>legend_reverse <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>df</dt>
|
||||||
|
<dd><p>A data frame.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>x</dt>
|
||||||
|
<dd><p>A character column or coercible as a character column. Will give the donut's fill color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>y</dt>
|
||||||
|
<dd><p>A numeric column.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>alpha</dt>
|
||||||
|
<dd><p>Fill transparency.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>x_title</dt>
|
||||||
|
<dd><p>The x scale title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>title</dt>
|
||||||
|
<dd><p>Plot title. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>subtitle</dt>
|
||||||
|
<dd><p>Plot subtitle. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>caption</dt>
|
||||||
|
<dd><p>Plot caption. Default to NULL.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>arrange</dt>
|
||||||
|
<dd><p>TRUE or FALSE. Arrange by highest percentage first.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>hole_size</dt>
|
||||||
|
<dd><p>Hole size. Default to 3. If less than 2, back to a pie chart.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text</dt>
|
||||||
|
<dd><p>TRUE or FALSE. Add the value as text.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text_treshold_display</dt>
|
||||||
|
<dd><p>Minimum value to add the text label.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text_color</dt>
|
||||||
|
<dd><p>Text color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text_suffix</dt>
|
||||||
|
<dd><p>If percent is FALSE, should we add a suffix to the text label?</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>theme</dt>
|
||||||
|
<dd><p>Whatever theme. Default to theme_reach().</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A donut chart to be used parsimoniously</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
201
docs/reference/dumbbell.html
Normal file
|
|
@ -0,0 +1,201 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Make dumbbell chart."><title>Make dumbbell chart. — dumbbell • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Make dumbbell chart. — dumbbell"><meta property="og:description" content="Make dumbbell chart."><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Make dumbbell chart.</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/dumbbell.R" class="external-link"><code>R/dumbbell.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>dumbbell.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>Make dumbbell chart.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">dumbbell</span><span class="op">(</span></span>
|
||||||
|
<span> <span class="va">df</span>,</span>
|
||||||
|
<span> <span class="va">col</span>,</span>
|
||||||
|
<span> <span class="va">group_x</span>,</span>
|
||||||
|
<span> <span class="va">group_y</span>,</span>
|
||||||
|
<span> point_size <span class="op">=</span> <span class="fl">5</span>,</span>
|
||||||
|
<span> point_alpha <span class="op">=</span> <span class="fl">1</span>,</span>
|
||||||
|
<span> segment_size <span class="op">=</span> <span class="fl">2.5</span>,</span>
|
||||||
|
<span> segment_color <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_lt_grey"</span><span class="op">)</span>,</span>
|
||||||
|
<span> group_x_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> group_y_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> x_title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> title <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> subtitle <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> caption <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||||||
|
<span> line_to_y_axis <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> line_to_y_axis_type <span class="op">=</span> <span class="fl">3</span>,</span>
|
||||||
|
<span> line_to_y_axis_width <span class="op">=</span> <span class="fl">0.5</span>,</span>
|
||||||
|
<span> line_to_y_axis_color <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_grey"</span><span class="op">)</span>,</span>
|
||||||
|
<span> add_text <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||||
|
<span> add_text_vjust <span class="op">=</span> <span class="fl">2</span>,</span>
|
||||||
|
<span> add_text_size <span class="op">=</span> <span class="fl">3.5</span>,</span>
|
||||||
|
<span> add_text_color <span class="op">=</span> <span class="fu"><a href="cols_reach.html">cols_reach</a></span><span class="op">(</span><span class="st">"main_grey"</span><span class="op">)</span>,</span>
|
||||||
|
<span> theme <span class="op">=</span> <span class="fu"><a href="theme_reach.html">theme_reach</a></span><span class="op">(</span>palette <span class="op">=</span> <span class="st">"primary"</span><span class="op">)</span></span>
|
||||||
|
<span><span class="op">)</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||||||
|
<dl><dt>df</dt>
|
||||||
|
<dd><p>A data frame.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>col</dt>
|
||||||
|
<dd><p>A numeric column.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>group_x</dt>
|
||||||
|
<dd><p>The grouping column on the x-axis; only two groups.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>group_y</dt>
|
||||||
|
<dd><p>The grouping column on the y-axis.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>point_size</dt>
|
||||||
|
<dd><p>Point size.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>point_alpha</dt>
|
||||||
|
<dd><p>Point alpha.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>segment_size</dt>
|
||||||
|
<dd><p>Segment size.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>segment_color</dt>
|
||||||
|
<dd><p>Segment color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>group_x_title</dt>
|
||||||
|
<dd><p>X-group and legend title.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>group_y_title</dt>
|
||||||
|
<dd><p>Y-axis and group title.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>x_title</dt>
|
||||||
|
<dd><p>X-axis title.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>title</dt>
|
||||||
|
<dd><p>Title.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>subtitle</dt>
|
||||||
|
<dd><p>Subtitle.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>caption</dt>
|
||||||
|
<dd><p>Caption.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>line_to_y_axis</dt>
|
||||||
|
<dd><p>TRUE or FALSE; add a line connected points and Y-axis.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>line_to_y_axis_type</dt>
|
||||||
|
<dd><p>Line to Y-axis type.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>line_to_y_axis_width</dt>
|
||||||
|
<dd><p>Line to Y-axis width.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>line_to_y_axis_color</dt>
|
||||||
|
<dd><p>Line to Y-axis color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text</dt>
|
||||||
|
<dd><p>TRUE or FALSE; add text at the points.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text_vjust</dt>
|
||||||
|
<dd><p>Vertical adjustment.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text_size</dt>
|
||||||
|
<dd><p>Text size.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>add_text_color</dt>
|
||||||
|
<dd><p>Text color.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>theme</dt>
|
||||||
|
<dd><p>A ggplot2 theme, default to `theme_reach()`</p></dd>
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p>A dumbbell chart.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||
BIN
docs/reference/figures/README-example-alluvial-plot-1.png
Normal file
|
After Width: | Height: | Size: 246 KiB |
BIN
docs/reference/figures/README-example-bar-chart-1.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
docs/reference/figures/README-example-bar-chart-2.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
docs/reference/figures/README-example-bar-chart-3.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
docs/reference/figures/README-example-donut-plot-1.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
docs/reference/figures/README-example-dumbbell-plot-1.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
docs/reference/figures/README-example-lollipop-chart-1.png
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
docs/reference/figures/README-example-lollipop-chart-2.png
Normal file
|
After Width: | Height: | Size: 182 KiB |
BIN
docs/reference/figures/README-example-map.png
Normal file
|
After Width: | Height: | Size: 285 KiB |
241
docs/reference/figures/README-example-map.svg
Normal file
|
After Width: | Height: | Size: 838 KiB |
BIN
docs/reference/figures/README-example-point-chart-1.png
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
docs/reference/figures/README-example-point-chart-2.png
Normal file
|
After Width: | Height: | Size: 319 KiB |
BIN
docs/reference/figures/README-example-point-chart-3.png
Normal file
|
After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
108
docs/reference/frontier_admin0.html
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="A multiline shapefile of Haiti's frontier with Dominican Republic."><title>Haïti frontier with Dominican Republic. — frontier_admin0 • visualizeR</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Haïti frontier with Dominican Republic. — frontier_admin0"><meta property="og:description" content="A multiline shapefile of Haiti's frontier with Dominican Republic."><meta property="og:image" content="https://gnoblet.github.io/visualizeR/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]--></head><body>
|
||||||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
|
||||||
|
|
||||||
|
<a class="navbar-brand me-2" href="../index.html">visualizeR</a>
|
||||||
|
|
||||||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.7.9000</small>
|
||||||
|
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||||||
|
<ul class="navbar-nav me-auto"><li class="active nav-item">
|
||||||
|
<a class="nav-link" href="../reference/index.html">Reference</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="../news/index.html">Changelog</a>
|
||||||
|
</li>
|
||||||
|
</ul><form class="form-inline my-2 my-lg-0" role="search">
|
||||||
|
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
|
||||||
|
|
||||||
|
<ul class="navbar-nav"><li class="nav-item">
|
||||||
|
<a class="external-link nav-link" href="https://github.com/gnoblet/visualizeR/" aria-label="github">
|
||||||
|
<span class="fab fa fab fa-github fa-lg"></span>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav><div class="container template-reference-topic">
|
||||||
|
<div class="row">
|
||||||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||||||
|
<img src="../logo.png" class="logo" alt=""><h1>Haïti frontier with Dominican Republic.</h1>
|
||||||
|
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/data.R" class="external-link"><code>R/data.R</code></a></small>
|
||||||
|
<div class="d-none name"><code>frontier_admin0.Rd</code></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ref-description section level2">
|
||||||
|
<p>A multiline shapefile of Haiti's frontier with Dominican Republic.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">frontier_admin0</span></span></code></pre></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section level2">
|
||||||
|
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
|
||||||
|
<p>A sf multipoint objet with 4 features and 8 fields:</p><dl><dt>fid_1</dt>
|
||||||
|
<dd><p>fid_1</p></dd>
|
||||||
|
|
||||||
|
<dt>objectid</dt>
|
||||||
|
<dd><p>objectid</p></dd>
|
||||||
|
|
||||||
|
<dt>id</dt>
|
||||||
|
<dd><p>id</p></dd>
|
||||||
|
|
||||||
|
<dt>fromnode</dt>
|
||||||
|
<dd><p>fromnode</p></dd>
|
||||||
|
|
||||||
|
<dt>tonode</dt>
|
||||||
|
<dd><p>tonode</p></dd>
|
||||||
|
|
||||||
|
<dt>leftpolygo</dt>
|
||||||
|
<dd><p>leftpolygo</p></dd>
|
||||||
|
|
||||||
|
<dt>rightpolygo</dt>
|
||||||
|
<dd><p>rightpolygo</p></dd>
|
||||||
|
|
||||||
|
<dt>shape_leng</dt>
|
||||||
|
<dd><p>shape_leng</p></dd>
|
||||||
|
|
||||||
|
<dt>geometry</dt>
|
||||||
|
<dd><p>Multiline geometry.</p></dd>
|
||||||
|
|
||||||
|
|
||||||
|
</dl></div>
|
||||||
|
|
||||||
|
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||||
|
</nav></aside></div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer><div class="pkgdown-footer-left">
|
||||||
|
<p></p><p>Developed by Noblet Guillaume.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkgdown-footer-right">
|
||||||
|
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</footer></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body></html>
|
||||||
|
|
||||||