Update to v 0.8.9000
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 177 KiB |
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 281 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 319 KiB After Width: | Height: | Size: 318 KiB |
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 166 KiB |
BIN
man/figures/README-example-waffke-plot-1.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
man/figures/README-example-waffle-plot-1.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
31
man/pal_fallback.Rd
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/pal_fallback.R
|
||||
\name{pal_fallback}
|
||||
\alias{pal_fallback}
|
||||
\title{Return function to interpolate a fallback palette base on viridis::magma()}
|
||||
\usage{
|
||||
pal_fallback(
|
||||
reverse = FALSE,
|
||||
color_ramp_palette = FALSE,
|
||||
discrete = FALSE,
|
||||
n = 5,
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{reverse}{Boolean indicating whether the palette should be reversed}
|
||||
|
||||
\item{color_ramp_palette}{Should the output be a `grDevices::colorRampPalette` function or a vector of hex codes? Default to the latter with `FALSE`}
|
||||
|
||||
\item{discrete}{Boolean. Discrete or not? Default to FALSE.}
|
||||
|
||||
\item{n}{Number of colors in the palette. Default to 5. Passe to `viridis::magma()`}
|
||||
|
||||
\item{...}{Other parameters to pass to `grDevices::colorRampPalette()`}
|
||||
}
|
||||
\value{
|
||||
A color palette
|
||||
}
|
||||
\description{
|
||||
Return function to interpolate a fallback palette base on viridis::magma()
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@ scale_color(
|
|||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{initiative}{Either "reach" or "agora.}
|
||||
\item{initiative}{Either "reach" or "agora" or "default".}
|
||||
|
||||
\item{palette}{Palette name from `pal_reach()` or `pal_agora()`.}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ scale_fill(
|
|||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{initiative}{Either "reach" or "agora.}
|
||||
\item{initiative}{Either "reach" or "agora" or "default".}
|
||||
|
||||
\item{palette}{Palette name from `pal_reach()` or `pal_agora()`.}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
\title{ggplot2 theme with REACH color palettes}
|
||||
\usage{
|
||||
theme_reach(
|
||||
initiative = "reach",
|
||||
palette = "main",
|
||||
discrete = TRUE,
|
||||
reverse = FALSE,
|
||||
|
|
@ -12,11 +13,14 @@ theme_reach(
|
|||
title_size = 12,
|
||||
title_color = cols_reach("main_grey"),
|
||||
title_font_face = "bold",
|
||||
title_hjust = NULL,
|
||||
title_position_to_plot = TRUE,
|
||||
text_size = 10,
|
||||
text_color = cols_reach("main_grey"),
|
||||
text_font_face = "plain",
|
||||
panel_background_color = "#FFFFFF",
|
||||
panel_border = FALSE,
|
||||
panel_border_color = cols_reach("main_grey"),
|
||||
legend_position = "right",
|
||||
legend_direction = "vertical",
|
||||
legend_reverse = TRUE,
|
||||
|
|
@ -52,13 +56,15 @@ theme_reach(
|
|||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{initiative}{Either "reach" or "default".}
|
||||
|
||||
\item{palette}{Palette name from 'pal_reach()'.}
|
||||
|
||||
\item{discrete}{Boolean indicating whether color aesthetic is discrete or not.}
|
||||
|
||||
\item{reverse}{Boolean indicating whether the palette should be reversed.}
|
||||
|
||||
\item{font_family}{The font family for all plot's texts. Default to "Leelawadee".}
|
||||
\item{font_family}{The font family for all plot's texts. Default to "Segoe UI".}
|
||||
|
||||
\item{title_size}{The size of the legend title. Defaults to 11.}
|
||||
|
||||
|
|
@ -66,6 +72,8 @@ theme_reach(
|
|||
|
||||
\item{title_font_face}{Legend title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").}
|
||||
|
||||
\item{title_hjust}{Title horizontal justification. Default to NULL. Use 0.5 to center the title.}
|
||||
|
||||
\item{title_position_to_plot}{TRUE or FALSE. Positioning to plot or to panel?}
|
||||
|
||||
\item{text_size}{The size of all text other than the title, subtitle and caption. Defaults to 10.}
|
||||
|
|
@ -76,6 +84,10 @@ theme_reach(
|
|||
|
||||
\item{panel_background_color}{The color for the panel background color. Default to white.}
|
||||
|
||||
\item{panel_border}{Boolean. Plot a panel border? Default to FALSE.}
|
||||
|
||||
\item{panel_border_color}{A color. Default to REACH main grey.}
|
||||
|
||||
\item{legend_position}{Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".}
|
||||
|
||||
\item{legend_direction}{Direction of the legend. Default to "vertical". Can take "vertical" or "horizontal".}
|
||||
|
|
|
|||
25
man/visualizeR-package.Rd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/visualizeR-package.R
|
||||
\docType{package}
|
||||
\name{visualizeR-package}
|
||||
\alias{visualizeR}
|
||||
\alias{visualizeR-package}
|
||||
\title{visualizeR: What a color! What a viz!}
|
||||
\description{
|
||||
\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}}
|
||||
|
||||
It basically provides colors as hex codes, color palettes, and some viz functions (graphs and maps).
|
||||
}
|
||||
\seealso{
|
||||
Useful links:
|
||||
\itemize{
|
||||
\item \url{https://github.com/gnoblet/visualizeR}
|
||||
\item \url{https://gnoblet.github.io/visualizeR/}
|
||||
}
|
||||
|
||||
}
|
||||
\author{
|
||||
\strong{Maintainer}: Noblet Guillaume \email{gnoblet@zaclys.net}
|
||||
|
||||
}
|
||||
\keyword{internal}
|
||||
53
man/waffle.Rd
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/waffle.R
|
||||
\name{waffle}
|
||||
\alias{waffle}
|
||||
\title{Simple waffle chart}
|
||||
\usage{
|
||||
waffle(
|
||||
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)
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{df}{A data frame.}
|
||||
|
||||
\item{x}{A character column or coercible as a character column. Will give the waffle's fill color.}
|
||||
|
||||
\item{y}{A numeric column (if plotting proportion, make sure to have percentages between 0 and 100 and not 0 and 1).}
|
||||
|
||||
\item{n_rows}{Number of rows. Default to 10.}
|
||||
|
||||
\item{size}{Width of the separator between blocks (defaults to 2).}
|
||||
|
||||
\item{x_title}{The x scale title. Default to NULL.}
|
||||
|
||||
\item{x_lab}{The x scale caption. Default to NULL.}
|
||||
|
||||
\item{title}{Plot title. Default to NULL.}
|
||||
|
||||
\item{subtitle}{Plot subtitle. Default to NULL.}
|
||||
|
||||
\item{caption}{Plot caption. Default to NULL.}
|
||||
|
||||
\item{arrange}{TRUE or FALSE. Arrange by highest percentage first.}
|
||||
|
||||
\item{theme}{Whatever theme. Default to theme_reach().}
|
||||
}
|
||||
\value{
|
||||
A waffle chart
|
||||
}
|
||||
\description{
|
||||
Simple waffle chart
|
||||
}
|
||||