Compare commits
108 commits
indicator-
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b508150a7 | |||
| 0aae59491e | |||
| 186fce48da | |||
| 1584bdca30 | |||
| 201fe39973 | |||
| 8de44120ec | |||
| a791074dde | |||
| fa2b174898 | |||
| d7b3052d83 | |||
| 50d9402d4a | |||
| 00dbf61081 | |||
| 08ef592649 | |||
| ef0de46969 | |||
| 7ccaa74d17 | |||
| 767ad2f064 | |||
| bd51d111a8 | |||
| 9e31379d58 | |||
| bdecad64c7 | |||
| 0cb6817cbe | |||
| 9f3feb39b3 | |||
| 7b8a01593f | |||
| 5ffc75387a | |||
| 5bda0e58ad | |||
| 423440b5dc | |||
| 3e7dcfb27e | |||
| 3add388e25 | |||
| 406ee1ac68 | |||
| f09ec46477 | |||
| 47bf1ffa30 | |||
| cc8fab9a19 | |||
| a8ea3ea284 | |||
| db6b42e64e | |||
| bf76ad06a7 | |||
| 94045e30c0 | |||
| ead630c106 | |||
| a4f398ab3d | |||
| 46fd57e0b5 | |||
| 3df1d990ec | |||
| 129834af5d | |||
| 26608c9437 | |||
| f138a1faa8 | |||
| ae7e76b862 | |||
| 7f56642954 | |||
| 5beec7fb90 | |||
| a9b8b5f708 | |||
| 515a94fbb5 | |||
| 26bb7e333d | |||
| 12ff1d2cce | |||
| 06c757fcc5 | |||
| 09ef523c64 | |||
| b8b50b09b2 | |||
| 73e3fa7c5d | |||
| 9e6bfa2eb7 | |||
| 870107b2bc | |||
| 079b3f8fe4 | |||
| 97b74dc343 | |||
| c7d5a2405c | |||
| f6958ff234 | |||
| f4b03edcbd | |||
| e9e4887f8e | |||
| c7cb7c0975 | |||
| 28ab9f6581 | |||
| 26dc4470c4 | |||
| 2fae078357 | |||
| 5edf0c7700 | |||
| 1cf130665c | |||
| b1e4f104cb | |||
| b27be73bf1 | |||
| a8ff478e21 | |||
| 91734ed7f6 | |||
| 133a4b29b0 | |||
| aba8c79f82 | |||
| 1207731340 | |||
| bbd7bcd26e | |||
| 1c03db7077 | |||
| 8f9c47f917 | |||
| c4cb359cda | |||
| 84797c8268 | |||
| 9c2e1cb6da | |||
| dff1287e9a | |||
| b8689815d8 | |||
| a6bba23e3e | |||
| 67c6921be0 | |||
| fb61aa8b63 | |||
| 32f9ab9c63 | |||
| 7e507a489a | |||
| 560d5288db | |||
| 9d92469673 | |||
| 652976724b | |||
| 519c9c62a3 | |||
| 6ff42bac73 | |||
| e8a6734d0f | |||
| bdb44ed82f | |||
| 291e46ef73 | |||
| 4861a4c59d | |||
| 5e6ceefe22 | |||
| 2c6be8e146 | |||
| 8b8646f1c0 | |||
| f0395fcd7e | |||
| 26d480a081 | |||
| d2534f6fa1 | |||
| cbee42a39e | |||
| 5c881dc558 | |||
| a4dd640439 | |||
| c55e293752 | |||
| 192ef98752 | |||
| 7018906f9f | |||
| d3f2df522a |
209 changed files with 13312 additions and 3089 deletions
|
|
@ -1,10 +1,19 @@
|
|||
^.*\.Rproj$
|
||||
^\.Rproj\.user$
|
||||
^LICENSE\.md$
|
||||
^README\.Rmd
|
||||
^pkgdown\.css
|
||||
^docs
|
||||
^_pkgdown\.yml$
|
||||
^docs$
|
||||
^pkgdown$
|
||||
^data-raw$
|
||||
^.*\.Rproj$
|
||||
^LICENSE\.md$
|
||||
^README\.Rmd
|
||||
^\.Rproj\.user$
|
||||
^\.github$
|
||||
^\.pre-commit-config\.yaml$
|
||||
^_pkgdown\.yml$
|
||||
^codecov\.yml$
|
||||
^data-raw$
|
||||
^docs
|
||||
^docs$
|
||||
^pkgdown$
|
||||
^pkgdown\.css
|
||||
^renv$
|
||||
^renv$
|
||||
^renv\.lock$
|
||||
^renv\.lock$
|
||||
^test-example.R
|
||||
^test\.R$
|
||||
|
|
|
|||
3
.Rprofile
Normal file
3
.Rprofile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# source("renv/activate.R")
|
||||
options(repos = c(CRAN = "https://p3m.dev/cran/__linux__/manylinux_2_28/latest"))
|
||||
options(renv.config.pak.enabled = TRUE)
|
||||
1
.github/.gitignore
vendored
Normal file
1
.github/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.html
|
||||
32
.github/pull_request_template.md
vendored
Normal file
32
.github/pull_request_template.md
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
## PR Description
|
||||
<!-- Please include a summary of the changes and which issue is fixed or what feature is added -->
|
||||
|
||||
## Type of change
|
||||
<!-- Please mark relevant options with [x] -->
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Documentation update
|
||||
- [ ] Code refactoring or style updates
|
||||
|
||||
## Checklist:
|
||||
<!-- Please mark relevant options with [x] -->
|
||||
|
||||
- [ ] My code follows the style guidelines of this project
|
||||
- [ ] I have performed a self-review of my own code
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] I have made corresponding changes to the documentation
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||
- [ ] New and existing unit tests pass locally with my changes
|
||||
|
||||
## Notes for reviewers
|
||||
<!-- Optional: Any notes or context that would be useful for the reviewer -->
|
||||
|
||||
## Automated Checks
|
||||
The following checks will run automatically on this PR:
|
||||
- R CMD check
|
||||
- Documentation updates
|
||||
- Test coverage
|
||||
- Linting and style checks
|
||||
56
.github/workflows/R-CMD-check.yml
vendored
Normal file
56
.github/workflows/R-CMD-check.yml
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
|
||||
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
name: R-CMD-check
|
||||
|
||||
jobs:
|
||||
R-CMD-check:
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {os: windows-latest, r: 'release'}
|
||||
- {os: macOS-latest, r: 'release'}
|
||||
- {os: ubuntu-latest, r: 'release'}
|
||||
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
|
||||
|
||||
env:
|
||||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
||||
RSPM: ${{ matrix.config.rspm }}
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: r-lib/actions/setup-pandoc@v2
|
||||
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
r-version: ${{ matrix.config.r }}
|
||||
http-user-agent: ${{ matrix.config.http-user-agent }}
|
||||
use-public-rspm: true
|
||||
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
with:
|
||||
extra-packages: any::rcmdcheck
|
||||
needs: check
|
||||
|
||||
- name: Document
|
||||
run: |
|
||||
install.packages("devtools")
|
||||
devtools::document()
|
||||
shell: Rscript {0}
|
||||
if: github.event_name == 'pull_request'
|
||||
|
||||
- uses: r-lib/actions/check-r-package@v2
|
||||
with:
|
||||
upload-snapshots: true
|
||||
40
.github/workflows/lint.yml
vendored
Normal file
40
.github/workflows/lint.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# Workflow for linting and style checks
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
name: lint
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
use-public-rspm: true
|
||||
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
with:
|
||||
extra-packages: |
|
||||
any::lintr
|
||||
any::styler
|
||||
needs: lint
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
lintr::lint_package()
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Style check
|
||||
run: |
|
||||
if (!styler::style_pkg(dry = TRUE)) {
|
||||
message("Some files are not properly styled!")
|
||||
quit(status = 1)
|
||||
}
|
||||
shell: Rscript {0}
|
||||
49
.github/workflows/pkgdown.yaml
vendored
Normal file
49
.github/workflows/pkgdown.yaml
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
|
||||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
name: pkgdown.yaml
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
pkgdown:
|
||||
runs-on: ubuntu-latest
|
||||
# Only restrict concurrency for non-PR jobs
|
||||
concurrency:
|
||||
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
|
||||
env:
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: r-lib/actions/setup-pandoc@v2
|
||||
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
use-public-rspm: true
|
||||
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
with:
|
||||
extra-packages: any::pkgdown, local::.
|
||||
needs: website
|
||||
|
||||
- name: Build site
|
||||
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Deploy to GitHub pages 🚀
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
||||
with:
|
||||
clean: false
|
||||
branch: gh-pages
|
||||
folder: docs
|
||||
55
.github/workflows/test-coverage.yml
vendored
Normal file
55
.github/workflows/test-coverage.yml
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# Run test-coverage for visualizeR package
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
name: test-coverage
|
||||
|
||||
jobs:
|
||||
test-coverage:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
use-public-rspm: true
|
||||
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
with:
|
||||
extra-packages: |
|
||||
any::covr
|
||||
any::remotes
|
||||
needs: coverage
|
||||
|
||||
- name: Install package
|
||||
run: |
|
||||
R CMD build .
|
||||
R CMD INSTALL *.tar.gz
|
||||
|
||||
- name: Test coverage
|
||||
run: |
|
||||
covr::codecov(
|
||||
quiet = FALSE,
|
||||
clean = FALSE,
|
||||
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
|
||||
)
|
||||
shell: Rscript {0}
|
||||
|
||||
- name: Show testthat output
|
||||
if: always()
|
||||
run: |
|
||||
## Print out test results details
|
||||
find . -name 'testthat.Rout*' -exec cat '{}' \; || true
|
||||
shell: bash
|
||||
|
||||
- name: Upload test results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-test-failures
|
||||
path: ${{ runner.temp }}/package
|
||||
15
.gitignore
vendored
15
.gitignore
vendored
|
|
@ -1,5 +1,10 @@
|
|||
.Rproj.user
|
||||
.Rhistory
|
||||
.Rdata
|
||||
.httr-oauth
|
||||
.DS_Store
|
||||
.Rproj.user
|
||||
.Rhistory
|
||||
.Rdata
|
||||
.httr-oauth
|
||||
.DS_Store
|
||||
R/test.R
|
||||
inst/doc
|
||||
|
||||
/.quarto/
|
||||
docs
|
||||
|
|
|
|||
93
.pre-commit-config.yaml
Normal file
93
.pre-commit-config.yaml
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
# All available hooks: https://pre-commit.com/hooks.html
|
||||
# R specific hooks: https://github.com/lorenzwalthert/precommit
|
||||
repos:
|
||||
- repo: https://github.com/lorenzwalthert/precommit
|
||||
rev: v0.4.3.9012
|
||||
hooks:
|
||||
- id: style-files
|
||||
args: [--style_pkg=styler, --style_fun=tidyverse_style]
|
||||
- id: roxygenize
|
||||
# roxygen requires loading pkg -> add dependencies from DESCRIPTION
|
||||
additional_dependencies:
|
||||
- ggplot2
|
||||
- rlang
|
||||
- grDevices
|
||||
- glue
|
||||
- scales
|
||||
- ggtext
|
||||
- ggrepel
|
||||
- tidyr
|
||||
- dplyr
|
||||
- ggalluvial
|
||||
- viridisLite
|
||||
- waffle
|
||||
- stringr
|
||||
- checkmate
|
||||
- forcats
|
||||
|
||||
# codemeta must be above use-tidy-description when both are used
|
||||
# - id: codemeta-description-updated
|
||||
- id: use-tidy-description
|
||||
- id: spell-check
|
||||
exclude: >
|
||||
(?x)^(
|
||||
.*\.[rR]|
|
||||
.*\.feather|
|
||||
.*\.jpeg|
|
||||
.*\.pdf|
|
||||
.*\.png|
|
||||
.*\.py|
|
||||
.*\.RData|
|
||||
.*\.rds|
|
||||
.*\.Rds|
|
||||
.*\.Rproj|
|
||||
.*\.sh|
|
||||
(.*/|)\.gitignore|
|
||||
(.*/|)\.gitlab-ci\.yml|
|
||||
(.*/|)\.lintr|
|
||||
(.*/|)\.pre-commit-.*|
|
||||
(.*/|)\.Rbuildignore|
|
||||
(.*/|)\.Renviron|
|
||||
(.*/|)\.Rprofile|
|
||||
(.*/|)\.travis\.yml|
|
||||
(.*/|)appveyor\.yml|
|
||||
(.*/|)NAMESPACE|
|
||||
(.*/|)renv/settings\.dcf|
|
||||
(.*/|)renv\.lock|
|
||||
(.*/|)WORDLIST|
|
||||
\.github/workflows/.*|
|
||||
data/.*|
|
||||
)$
|
||||
- id: readme-rmd-rendered
|
||||
- id: parsable-R
|
||||
- id: no-browser-statement
|
||||
- id: no-print-statement
|
||||
- id: no-debug-statement
|
||||
- id: deps-in-desc
|
||||
- id: pkgdown
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
args: ["--maxkb=200"]
|
||||
- id: file-contents-sorter
|
||||
files: '^\.Rbuildignore$'
|
||||
- id: end-of-file-fixer
|
||||
exclude: '\.Rd'
|
||||
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
|
||||
rev: v1.6.1
|
||||
hooks:
|
||||
# Only required when https://pre-commit.ci is used for config validation
|
||||
- id: check-pre-commit-ci-config
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: forbid-to-commit
|
||||
name: Don't commit common R artifacts
|
||||
entry: Cannot commit .Rhistory, .RData, .Rds or .rds.
|
||||
language: fail
|
||||
files: '\.(Rhistory|RData|Rds|rds)$'
|
||||
# `exclude: <regex>` to allow committing specific files
|
||||
|
||||
ci:
|
||||
autoupdate_schedule: monthly
|
||||
skip: [pkgdown]
|
||||
58
DESCRIPTION
58
DESCRIPTION
|
|
@ -1,29 +1,41 @@
|
|||
Package: visualizeR
|
||||
Type: Package
|
||||
Package: visualizeR
|
||||
Title: What a color! What a viz!
|
||||
Version: 0.3.9000
|
||||
Authors@R: c(
|
||||
person(
|
||||
'Noblet', 'Guillaume',
|
||||
email = 'gnoblet@zaclys.net',
|
||||
role = c('aut', 'cre')
|
||||
)
|
||||
)
|
||||
URL: https://github.com/gnoblet/visualizeR,
|
||||
https://gnoblet.github.io/visualizeR/
|
||||
Version: 1.0
|
||||
Authors@R:
|
||||
person("Noblet", "Guillaume", , "gnoblet@zaclys.net", role = c("aut", "cre"))
|
||||
Maintainer: Guillaume Noblet <gnoblet@zaclys.net>
|
||||
Description: It basically provides colors as hex codes, color palettes, and some viz functions (graphs and maps).
|
||||
Depends: R (>= 4.1.0)
|
||||
Description: It basically provides colors as hex codes, color palettes,
|
||||
and some viz functions (graphs and maps).
|
||||
License: GPL (>= 3)
|
||||
URL: https://github.com/gnoblet/visualizeR,
|
||||
https://gnoblet.github.io/visualizeR/
|
||||
Depends:
|
||||
R (>= 4.1.0)
|
||||
Imports:
|
||||
checkmate,
|
||||
dplyr,
|
||||
forcats,
|
||||
ggplot2,
|
||||
ggrepel,
|
||||
ggtext,
|
||||
glue,
|
||||
grDevices,
|
||||
rlang (>= 0.4.11),
|
||||
scales,
|
||||
tidyr
|
||||
Suggests:
|
||||
covr,
|
||||
knitr,
|
||||
rio,
|
||||
rmarkdown,
|
||||
roxygen2,
|
||||
testthat (>= 3.0.0),
|
||||
vdiffr,
|
||||
withr
|
||||
VignetteBuilder:
|
||||
knitr
|
||||
Config/testthat/edition: 3
|
||||
Encoding: UTF-8
|
||||
LazyData: true
|
||||
RoxygenNote: 7.2.1
|
||||
Imports:
|
||||
ggplot2,
|
||||
rlang,
|
||||
grDevices,
|
||||
glue,
|
||||
scales,
|
||||
ggblanket (== 1.6.1)
|
||||
Suggests: knitr, sf, tmap
|
||||
VignetteBuilder: knitr
|
||||
RoxygenNote: 7.3.2
|
||||
|
|
|
|||
44
NEWS.md
44
NEWS.md
|
|
@ -1,8 +1,52 @@
|
|||
# visualizeR 0.8.9000
|
||||
|
||||
* Add `waffle()`.
|
||||
* 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
|
||||
|
||||
|
|
|
|||
498
R/bar.R
498
R/bar.R
|
|
@ -1,72 +1,464 @@
|
|||
#' @title Simple bar chart
|
||||
#' @rdname bar
|
||||
#'
|
||||
#' @inheritParams bar
|
||||
#'
|
||||
#' @param ... Additional arguments passed to `bar()`
|
||||
#'
|
||||
#' @export
|
||||
hbar <- function(
|
||||
...,
|
||||
flip = TRUE,
|
||||
add_text = FALSE,
|
||||
theme_fun = theme_bar(flip = flip, add_text = add_text)) {
|
||||
bar(flip = flip, add_text = add_text, theme_fun = theme_fun, ...)
|
||||
}
|
||||
|
||||
#' Simple bar chart
|
||||
#'
|
||||
#' `bar()` is a simple bar chart with some customization allowed, in particular the `theme_fun` argument for theming. `hbar()` uses `bar()` with sane defaults for a horizontal 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 palette Palette name from 'pal_reach()'.
|
||||
#' @param percent TRUE or FALSE. Should the x-labels be displayed as percentages? Default to TRUE.
|
||||
#' @param reverse Boolean indicating whether the palette should be reversed.
|
||||
#' @param family The font family for all plot's texts. Default to "Leelawadee".
|
||||
#' @param alpha Transparency.
|
||||
#' @param width Width.
|
||||
#' @param x A quoted numeric column.
|
||||
#' @param y A quoted character column or coercible as a character column.
|
||||
#' @param group Some quoted grouping categorical column, e.g. administrative areas or population groups.
|
||||
#' @param facet Some quoted grouping categorical column, e.g. administrative areas or population groups.
|
||||
#' @param x_rm_na Remove NAs in x?
|
||||
#' @param y_rm_na Remove NAs in y?
|
||||
#' @param group_rm_na Remove NAs in group?
|
||||
#' @param facet_rm_na Remove NAs in facet?
|
||||
#' @param y_expand Multiplier to expand the y axis.
|
||||
#' @param add_color Add a color to bars (if no grouping).
|
||||
#' @param add_color_guide Should a legend be added?
|
||||
#' @param flip TRUE or FALSE (default). Default to TRUE or horizontal bar plot.
|
||||
#' @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 position Should the chart be stacked? Default to "dodge". Can take "dodge" and "stack".
|
||||
#' @param title Plot title. Default to NULL.
|
||||
#' @param subtitle Plot subtitle. Default to NULL.
|
||||
#' @param caption Caption title string. Default to NULL.
|
||||
#' @param text_size The size of all text other than the title, subtitle and caption. Defaults to 10.
|
||||
#' @param title_size The size of the title text. Defaults to 14.
|
||||
#' @param legend_position Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".
|
||||
#' @param legend_rev Reverse the color in the guide? Default to TRUE.
|
||||
#' @param ... Other arguments to be passed to "ggblanket::gg_col"
|
||||
#' @param caption Plot caption. Default to NULL.
|
||||
#' @param width Bar width.
|
||||
#' @param add_text TRUE or FALSE. Add values as text.
|
||||
#' @param add_text_size Text size.
|
||||
#' @param add_text_color Text color.
|
||||
#' @param add_text_font_face Text font_face.
|
||||
#' @param add_text_threshold_display Minimum value to add the text label.
|
||||
#' @param add_text_suffix If percent is FALSE, should we add a suffix to the text label?
|
||||
#' @param add_text_expand_limit Default to adding 10\% on top of the bar.
|
||||
#' @param add_text_round Round the text label.
|
||||
#' @param theme_fun Whatever theme function. For no custom theme, use theme_fun = NULL.
|
||||
#' @param scale_fill_fun Scale fill function. Default to scale_fill_visualizer_discrete().
|
||||
#' @param scale_color_fun Scale color function. Default to scale_color_visualizer_discrete().
|
||||
#'
|
||||
#' @description `ggblanket` as internals for deciding whether the bar chart is horizontally readable.
|
||||
#' @inheritParams reorder_by
|
||||
#'
|
||||
#' @return A bar chart
|
||||
#' @importFrom rlang `:=`
|
||||
#'
|
||||
#' @export
|
||||
bar_reach <- function(df, x, y, group = NULL, percent = TRUE, palette = "main", reverse = FALSE, family = "Leelawadee", alpha = 1, width = 0.5, x_title = NULL, y_title = NULL, group_title = NULL, position = "dodge", title = NULL, subtitle = NULL, caption = NULL, text_size = 10, title_size = 14, legend_position = "right", legend_rev = TRUE, ...){
|
||||
bar <- function(
|
||||
df,
|
||||
x,
|
||||
y,
|
||||
group = "",
|
||||
facet = "",
|
||||
order = "none",
|
||||
x_rm_na = TRUE,
|
||||
y_rm_na = TRUE,
|
||||
group_rm_na = TRUE,
|
||||
facet_rm_na = TRUE,
|
||||
y_expand = 0.1,
|
||||
add_color = color("cat_5_main_1"),
|
||||
add_color_guide = TRUE,
|
||||
flip = FALSE,
|
||||
wrap = NULL,
|
||||
position = "dodge",
|
||||
alpha = 1,
|
||||
x_title = NULL,
|
||||
y_title = NULL,
|
||||
group_title = NULL,
|
||||
title = NULL,
|
||||
subtitle = NULL,
|
||||
caption = NULL,
|
||||
width = 0.8,
|
||||
add_text = FALSE,
|
||||
add_text_size = 4.5,
|
||||
add_text_color = color("dark_grey"),
|
||||
add_text_font_face = "bold",
|
||||
add_text_threshold_display = 0.05,
|
||||
add_text_suffix = "%",
|
||||
add_text_expand_limit = 1.2,
|
||||
add_text_round = 1,
|
||||
theme_fun = theme_bar(
|
||||
flip = flip,
|
||||
add_text = add_text,
|
||||
axis_text_x_angle = 0,
|
||||
axis_text_x_vjust = 0.5,
|
||||
axis_text_x_hjust = 0.5
|
||||
),
|
||||
scale_fill_fun = scale_fill_visualizer_discrete(),
|
||||
scale_color_fun = scale_color_visualizer_discrete()) {
|
||||
#------ Checks
|
||||
|
||||
pal <- pal_reach(palette)
|
||||
# df is a data frame
|
||||
checkmate::assert_data_frame(df)
|
||||
|
||||
if(is.null(pal)) rlang::warn(
|
||||
c(paste0("There is no palette '", palette, "' for initiative 'reach'. Fallback to ggblanket's default color palette."),
|
||||
"i" = paste0("Use `pal_reach(show_palettes = T)` to see the list of availabale palettes.")
|
||||
)
|
||||
# x and y and group are character
|
||||
checkmate::assert_character(x, len = 1)
|
||||
checkmate::assert_character(y, len = 1)
|
||||
checkmate::assert_character(group, len = 1)
|
||||
|
||||
# x and y are columns in df
|
||||
checkmate::assert_choice(x, colnames(df))
|
||||
checkmate::assert_choice(y, colnames(df))
|
||||
if (group != "") {
|
||||
checkmate::assert_choice(group, colnames(df))
|
||||
}
|
||||
|
||||
# x_rm_na, y_rm_na and group_rm_na are logical scalar
|
||||
checkmate::assert_logical(x_rm_na, len = 1)
|
||||
checkmate::assert_logical(y_rm_na, len = 1)
|
||||
checkmate::assert_logical(group_rm_na, len = 1)
|
||||
checkmate::assert_logical(facet_rm_na, len = 1)
|
||||
|
||||
# flip is a logical scalar
|
||||
checkmate::assert_logical(flip, len = 1)
|
||||
|
||||
# wrap is a numeric scalar or NULL
|
||||
if (!is.null(wrap)) {
|
||||
checkmate::assert_numeric(wrap, len = 1, null.ok = TRUE)
|
||||
}
|
||||
|
||||
# alpha is a numeric scalar between 0 and 1
|
||||
checkmate::assert_numeric(alpha, lower = 0, upper = 1, len = 1)
|
||||
|
||||
# add_text is a logical scalar
|
||||
checkmate::assert_logical(add_text, len = 1)
|
||||
|
||||
# add_text_size is a numeric scalar
|
||||
checkmate::assert_numeric(add_text_size, len = 1)
|
||||
|
||||
# add_text_font_face is a character scalar in bold plain or italic
|
||||
checkmate::assert_choice(add_text_font_face, c("bold", "plain", "italic"))
|
||||
|
||||
# add_text_threshold_display is a numeric scalar
|
||||
checkmate::assert_numeric(add_text_threshold_display, len = 1)
|
||||
|
||||
# add_text_suffix is a character scalar
|
||||
checkmate::assert_character(add_text_suffix, len = 1)
|
||||
|
||||
# add_text_expand_limit is a numeric scalar
|
||||
checkmate::assert_numeric(add_text_expand_limit, len = 1)
|
||||
|
||||
# add_text_round is a numeric scalar
|
||||
checkmate::assert_numeric(add_text_round, len = 1)
|
||||
|
||||
# x and y are numeric or character
|
||||
if (class(df[[y]]) %notin% c("integer", "numeric")) {
|
||||
rlang::abort(paste0(y, " must be numeric."))
|
||||
}
|
||||
if (!any(class(df[[x]]) %in% c("character", "factor"))) {
|
||||
rlang::abort(paste0(x, " must be character or factor"))
|
||||
}
|
||||
|
||||
# width is a numeric scalar between 0 and 1
|
||||
checkmate::assert_numeric(width, lower = 0, upper = 1, len = 1)
|
||||
|
||||
# Check if position is stack or dodge
|
||||
if (position %notin% c("stack", "dodge")) {
|
||||
rlang::abort("Position should be either 'stack' or 'dodge'.")
|
||||
}
|
||||
|
||||
#----- Data wrangling
|
||||
|
||||
# facets over group
|
||||
if (group != "" && facet != "" && group == facet) {
|
||||
rlang::warn("'group' and 'facet' are the same identical.")
|
||||
}
|
||||
|
||||
# remove NAs using base R
|
||||
if (x_rm_na) {
|
||||
df <- df[!(is.na(df[[x]])), ]
|
||||
}
|
||||
if (y_rm_na) {
|
||||
df <- df[!(is.na(df[[y]])), ]
|
||||
}
|
||||
if (group != "" && group_rm_na) {
|
||||
df <- df[!(is.na(df[[group]])), ]
|
||||
}
|
||||
if (facet != "" && facet_rm_na) {
|
||||
df <- df[!(is.na(df[[facet]])), ]
|
||||
}
|
||||
|
||||
# reorder
|
||||
dir_order <- if (flip && order %in% c("x", "grouped_x")) {
|
||||
-1
|
||||
} else if (!flip && order %in% c("x", "grouped_x")) {
|
||||
1
|
||||
} else if (flip) {
|
||||
1
|
||||
} else {
|
||||
-1
|
||||
}
|
||||
group_order <- if (group != "" || (group == "" && facet == "")) {
|
||||
group
|
||||
} else if (group == "" && facet != "") {
|
||||
facet
|
||||
}
|
||||
df <- reorder_by(
|
||||
df = df,
|
||||
x = x,
|
||||
y = y,
|
||||
group = group_order,
|
||||
order = order,
|
||||
dir_order = dir_order
|
||||
)
|
||||
|
||||
if (percent) x_labels <- scales::percent else x_labels <- NULL
|
||||
# prepare aes
|
||||
if (group != "") {
|
||||
g <- ggplot2::ggplot(
|
||||
df,
|
||||
mapping = ggplot2::aes(
|
||||
x = !!rlang::sym(x),
|
||||
y = !!rlang::sym(y),
|
||||
fill = !!rlang::sym(group),
|
||||
color = !!rlang::sym(group)
|
||||
)
|
||||
)
|
||||
} else {
|
||||
g <- ggplot2::ggplot(
|
||||
df,
|
||||
mapping = ggplot2::aes(
|
||||
x = !!rlang::sym(x),
|
||||
y = !!rlang::sym(y)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
pl <- df |>
|
||||
ggblanket::gg_col(x = {{ x }},
|
||||
y = {{ y }},
|
||||
col = {{ group }},
|
||||
x_title = x_title,
|
||||
x_labels = x_labels,
|
||||
y_title = y_title,
|
||||
col_title = group_title,
|
||||
alpha = alpha,
|
||||
width = width,
|
||||
position = position,
|
||||
title = title,
|
||||
subtitle = subtitle,
|
||||
caption = caption,
|
||||
col_legend_place = legend_position,
|
||||
theme = theme_reach(
|
||||
palette = palette,
|
||||
reverse = reverse,
|
||||
family = family,
|
||||
text_size = text_size,
|
||||
title_size = title_size,
|
||||
plot_background_pal = "#FFFFFF",
|
||||
panel_background_pal = "#FFFFFF",
|
||||
legend_reverse = legend_rev
|
||||
# add title, subtitle, caption, x_title, y_title
|
||||
g <- g +
|
||||
ggplot2::labs(
|
||||
title = title,
|
||||
subtitle = subtitle,
|
||||
caption = caption,
|
||||
x = y_title,
|
||||
y = x_title,
|
||||
color = group_title,
|
||||
fill = group_title
|
||||
)
|
||||
|
||||
# width
|
||||
width <- width
|
||||
dodge_width <- width
|
||||
|
||||
# facets
|
||||
if (facet != "") {
|
||||
if (flip) {
|
||||
g <- g +
|
||||
ggplot2::facet_grid(
|
||||
rows = ggplot2::vars(!!rlang::sym(facet)),
|
||||
scales = "free",
|
||||
space = "free_y"
|
||||
)
|
||||
} else {
|
||||
g <- g +
|
||||
ggplot2::facet_grid(
|
||||
cols = ggplot2::vars(!!rlang::sym(facet)),
|
||||
scales = "free",
|
||||
space = "free_x"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
# should the graph use position_fill?
|
||||
if (group != "") {
|
||||
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
|
||||
)
|
||||
}
|
||||
} else {
|
||||
if (position == "stack") {
|
||||
g <- g +
|
||||
ggplot2::geom_col(
|
||||
alpha = alpha,
|
||||
width = width,
|
||||
position = ggplot2::position_stack(),
|
||||
fill = add_color,
|
||||
color = add_color
|
||||
)
|
||||
} else if (position == "dodge") {
|
||||
g <- g +
|
||||
ggplot2::geom_col(
|
||||
alpha = alpha,
|
||||
width = width,
|
||||
position = ggplot2::position_dodge2(
|
||||
width = dodge_width,
|
||||
preserve = "single"
|
||||
),
|
||||
...
|
||||
)
|
||||
fill = add_color,
|
||||
color = add_color
|
||||
)
|
||||
} else {
|
||||
g <- g +
|
||||
ggplot2::geom_col(
|
||||
alpha = alpha,
|
||||
width = width,
|
||||
fill = add_color,
|
||||
color = add_color
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return(pl)
|
||||
# wrap labels on the x scale?
|
||||
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 <- -0.5
|
||||
} else {
|
||||
hjust_flip <- 0.5
|
||||
}
|
||||
if (flip) {
|
||||
vjust_flip <- 0.5
|
||||
} else {
|
||||
vjust_flip <- -0.5
|
||||
}
|
||||
|
||||
# function for interactio
|
||||
interaction_f <- function(group, facet, data) {
|
||||
if (group == "" && facet == "") {
|
||||
return(NULL)
|
||||
} else if (group != "" && facet != "") {
|
||||
return(interaction(data[[group]], data[[facet]]))
|
||||
} else if (group != "") {
|
||||
return(data[[group]])
|
||||
} else if (facet != "") {
|
||||
return(data[[facet]])
|
||||
} else {
|
||||
return(NULL)
|
||||
}
|
||||
}
|
||||
|
||||
# add text labels
|
||||
if (add_text & position == "dodge") {
|
||||
df$y_threshold <- ifelse(df[[y]] >= add_text_threshold_display, df[[y]], NA)
|
||||
|
||||
# expand limits
|
||||
g <- g +
|
||||
ggplot2::geom_blank(
|
||||
data = df,
|
||||
ggplot2::aes(
|
||||
x = !!rlang::sym(x),
|
||||
y = !!rlang::sym(y) * add_text_expand_limit,
|
||||
group = interaction_f(group, facet, df)
|
||||
)
|
||||
)
|
||||
g <- g +
|
||||
ggplot2::geom_text(
|
||||
data = df,
|
||||
ggplot2::aes(
|
||||
label = ifelse(
|
||||
is.na(!!rlang::sym("y_threshold")),
|
||||
NA,
|
||||
paste0(
|
||||
round(!!rlang::sym("y_threshold"), add_text_round),
|
||||
add_text_suffix
|
||||
)
|
||||
),
|
||||
group = interaction_f(group, facet, df)
|
||||
),
|
||||
hjust = hjust_flip,
|
||||
vjust = vjust_flip,
|
||||
color = add_text_color,
|
||||
fontface = add_text_font_face,
|
||||
size = add_text_size,
|
||||
position = ggplot2::position_dodge2(width = dodge_width)
|
||||
)
|
||||
} else if (add_text & position == "stack") {
|
||||
df$y_threshold <- ifelse(df[[y]] >= add_text_threshold_display, df[[y]], NA)
|
||||
|
||||
g <- g +
|
||||
ggplot2::geom_text(
|
||||
data = df,
|
||||
ggplot2::aes(
|
||||
label = ifelse(
|
||||
is.na(!!rlang::sym("y_threshold")),
|
||||
NA,
|
||||
paste0(
|
||||
round(!!rlang::sym("y_threshold"), add_text_round),
|
||||
add_text_suffix
|
||||
)
|
||||
),
|
||||
group = interaction_f(group, facet, df)
|
||||
),
|
||||
hjust = hjust_flip,
|
||||
vjust = vjust_flip,
|
||||
color = add_text_color,
|
||||
fontface = add_text_font_face,
|
||||
size = add_text_size,
|
||||
position = ggplot2::position_dodge2(width = dodge_width)
|
||||
)
|
||||
}
|
||||
|
||||
# y scale tweaks
|
||||
g <- g +
|
||||
ggplot2::scale_y_continuous(
|
||||
# start at 0
|
||||
expand = ggplot2::expansion(mult = c(0, y_expand)),
|
||||
# remove trailing 0 and choose accuracy of y labels
|
||||
labels = scales::label_number(
|
||||
accuracy = 0.1,
|
||||
drop0trailing = TRUE,
|
||||
big.mark = "",
|
||||
decimal.mark = "."
|
||||
),
|
||||
)
|
||||
|
||||
# # remove guides for legend if !add_color_guide
|
||||
if (!add_color_guide) {
|
||||
g <- g + ggplot2::guides(fill = "none", color = "none")
|
||||
}
|
||||
|
||||
# # add theme fun
|
||||
if (!is.null(theme_fun)) {
|
||||
g <- g + theme_fun
|
||||
}
|
||||
|
||||
# # # add scale fun
|
||||
if (!is.null(scale_fill_fun)) {
|
||||
g <- g + scale_fill_fun
|
||||
}
|
||||
|
||||
if (!is.null(scale_color_fun)) {
|
||||
g <- g + scale_color_fun
|
||||
}
|
||||
|
||||
return(g)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
#' @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.")
|
||||
}
|
||||
|
||||
}
|
||||
17
R/checks.R
Normal file
17
R/checks.R
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#' @title Check if variables are in data frame
|
||||
#'
|
||||
#' @param df A data frame
|
||||
#' @param vars A vector of variable names
|
||||
#'
|
||||
#' @return A stop statement
|
||||
check_vars_in_df <- function(df, vars) {
|
||||
vars_nin <- setdiff(vars, colnames(df))
|
||||
|
||||
if (length(vars_nin) > 0) {
|
||||
rlang::abort(glue::glue(
|
||||
"Variables ",
|
||||
glue::glue_collapse(vars_nin, sep = ", ", last = ", and "),
|
||||
" not found in data frame."
|
||||
))
|
||||
}
|
||||
}
|
||||
162
R/color.R
Normal file
162
R/color.R
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
#' Helpers to extract defined colors as hex codes
|
||||
#'
|
||||
#' [color()] returns the requested columns, returns NA if absent. [color_pattern()] returns all colors that start with the pattern.
|
||||
#'
|
||||
#' @param ... Character names of colors. If NULL returns all colors.
|
||||
#' @param unname Boolean. Should the output vector be unnamed? Default to `TRUE`.
|
||||
#' @section Naming of colors:
|
||||
#' * All branding colors start with "branding";
|
||||
#' * All , categorical colors start with ", cat_";
|
||||
#' * All sequential colors start with "seq_";
|
||||
#'
|
||||
#' Then, a number indicates the number of colors that belong to the palettes, a string the name of the palette, and, finally, a number the position of the color. E.g., "seq_5_red_4" would be the 4th color of a continuous palettes of 5 colors in the red band. Exception is made for white, light_grey, dark_grey, and black.
|
||||
#'
|
||||
#'
|
||||
#' @return Hex codes named or unnamed.
|
||||
#'
|
||||
#' @export
|
||||
color <- function(..., unname = TRUE) {
|
||||
#------ Checks
|
||||
|
||||
# unname is a logical scalar
|
||||
checkmate::assert_logical(unname, len = 1)
|
||||
|
||||
# all elements in ... are character strings
|
||||
dots <- list(...)
|
||||
if (length(dots) > 0) {
|
||||
# Check each argument is a single character string
|
||||
for (i in seq_along(dots)) {
|
||||
checkmate::assert_string(dots[[i]], .var.name = paste0("Argument #", i))
|
||||
}
|
||||
}
|
||||
|
||||
#------ Prep
|
||||
|
||||
# retrieve colors
|
||||
cols <- c(...)
|
||||
|
||||
# define color vector
|
||||
colors <- c(
|
||||
white = "#FFFFFF",
|
||||
lighter_grey = "#F5F5F5",
|
||||
light_grey = "#E3E3E3",
|
||||
dark_grey = "#464647",
|
||||
light_blue_grey = "#B3C6D1",
|
||||
grey = "#71716F",
|
||||
black = "#000000",
|
||||
cat_2_yellow_1 = "#ffc20a",
|
||||
cat_2_yellow_2 = "#0c7bdc",
|
||||
cat_2_light_1 = "#fefe62",
|
||||
cat_2_light_2 = "#d35fb7",
|
||||
cat_2_green_1 = "#1aff1a",
|
||||
cat_2_green_2 = "#4b0092",
|
||||
cat_2_blue_1 = "#1a85ff",
|
||||
cat_2_blue_2 = "#d41159",
|
||||
cat_5_main_1 = "#083d77", # yale blue
|
||||
cat_5_main_2 = "#4ecdc4", # robin egg blue
|
||||
cat_5_main_3 = "#f4c095", # peach
|
||||
cat_5_main_4 = "#b47eb3", # african violet
|
||||
cat_5_main_5 = "#ffd5ff", # mimi pink
|
||||
seq_5_main_1 = "#083d77", # yale blue
|
||||
seq_5_main_2 = "##396492",
|
||||
seq_5_main_3 = "#6b8bad",
|
||||
seq_5_main_4 = "#9cb1c9",
|
||||
seq_5_main_5 = "#ced8e4",
|
||||
cat_5_ibm_1 = "#648fff",
|
||||
cat_5_ibm_2 = "#785ef0",
|
||||
cat_5_ibm_3 = "#dc267f",
|
||||
cat_5_ibm_4 = "#fe6100",
|
||||
cat_5_ibm_5 = "#ffb000",
|
||||
cat_3_aquamarine_1 = "aquamarine2",
|
||||
cat_3_aquamarine_2 = "cornflowerblue",
|
||||
cat_3_aquamarine_3 = "brown1",
|
||||
cat_3_tol_high_contrast_1 = "#215589",
|
||||
cat_3_tol_high_contrast_2 = "#cfaa34",
|
||||
cat_3_tol_high_contrast_3 = "#a35364",
|
||||
cat_8_tol_adapted_1 = "#332e86",
|
||||
cat_8_tol_adapted_2 = "#50504f",
|
||||
cat_8_tol_adapted_3 = "#3dab9a",
|
||||
cat_8_tol_adapted_4 = "#86ccee",
|
||||
cat_8_tol_adapted_5 = "#ddcb77",
|
||||
cat_8_tol_adapted_6 = "#ee5859",
|
||||
cat_8_tol_adapted_7 = "#aa4599",
|
||||
cat_8_tol_adapted_8 = "#721220",
|
||||
div_5_orange_blue_1 = "#c85200",
|
||||
div_5_orange_blue_2 = "#e48646",
|
||||
div_5_orange_blue_3 = "#cccccc",
|
||||
div_5_orange_blue_4 = "#6b8ea4",
|
||||
div_5_orange_blue_5 = "#366785",
|
||||
div_5_green_purple_1 = "#c85200",
|
||||
div_5_green_purple_2 = "#e48646",
|
||||
div_5_green_purple_3 = "#cccccc",
|
||||
div_5_green_purple_4 = "#6b8ea4",
|
||||
div_5_green_purple_5 = "#366785"
|
||||
)
|
||||
|
||||
#------ Checks
|
||||
|
||||
# Check that if ... is not null, all colors are defined
|
||||
if (!is.null(cols)) {
|
||||
if (cols %notallin% names(colors)) {
|
||||
rlang::abort(c(
|
||||
"Some colors not defined",
|
||||
"*" = glue::glue_collapse(
|
||||
...[which(!... %in% names(cols))],
|
||||
sep = ", ",
|
||||
last = ", and "
|
||||
),
|
||||
"i" = "Use `color(unname = FALSE)` to see all named available colors."
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
# ------ Return
|
||||
|
||||
if (is.null(cols)) {
|
||||
cols_to_return <- colors
|
||||
} else {
|
||||
cols_to_return <- colors[cols]
|
||||
}
|
||||
|
||||
if (unname) {
|
||||
cols_to_return <- unname(cols_to_return)
|
||||
}
|
||||
|
||||
return(cols_to_return)
|
||||
}
|
||||
|
||||
#' @rdname color
|
||||
#'
|
||||
#' @param pattern Pattern of the start of colors' name.
|
||||
#'
|
||||
#' @export
|
||||
color_pattern <- function(pattern, unname = TRUE) {
|
||||
#------ Checks
|
||||
|
||||
# Check that pattern is a character scalar
|
||||
checkmate::assert_character(pattern, len = 1)
|
||||
|
||||
# Check that unname is a logical scalar
|
||||
checkmate::assert_logical(unname, len = 1)
|
||||
|
||||
#------ Get colors
|
||||
|
||||
# Get colors
|
||||
col <- color(unname = FALSE)
|
||||
col <- col[startsWith(names(col), pattern)]
|
||||
|
||||
if (unname) {
|
||||
col <- unname(col)
|
||||
}
|
||||
|
||||
# If col is of length 0, warn
|
||||
if (length(col) == 0) {
|
||||
rlang::warn(c(
|
||||
"No colors match the pattern",
|
||||
"*" = glue::glue("Pattern used is:'{pattern}'"),
|
||||
"i" = "Use `color(unname = FALSE)` to see all named available colors."
|
||||
))
|
||||
}
|
||||
|
||||
return(col)
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
#' @title Function to extract AGORA 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_agora <- function(..., unnamed = TRUE) {
|
||||
cols <- c(...)
|
||||
|
||||
colors_agora <- c(white = "#FFFFFF",
|
||||
black = "#000000",
|
||||
main_bordeaux = "#581522",
|
||||
main_lt_beige = "#DDD8C4",
|
||||
main_dk_beige = "#B7AD99",
|
||||
main_lt_grey = "#BCB8B1")
|
||||
|
||||
if (is.null(cols)) {
|
||||
cols_to_return <- colors_agora
|
||||
} else {
|
||||
cols_to_return <- colors_agora[cols]
|
||||
}
|
||||
|
||||
if(unnamed){
|
||||
cols_to_return <- unname(cols_to_return)
|
||||
}
|
||||
|
||||
return(cols_to_return)
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#' @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)
|
||||
}
|
||||
168
R/cols_reach.R
168
R/cols_reach.R
|
|
@ -1,168 +0,0 @@
|
|||
#' @title Function to extract REACH 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_reach <- function(..., unnamed = TRUE) {
|
||||
cols <- c(...)
|
||||
|
||||
colors_reach <- c(
|
||||
white = "#FFFFFF",
|
||||
black = "#000000",
|
||||
main_grey = "#58585A",
|
||||
main_red = "#EE5859",
|
||||
main_lt_grey = "#C7C8CA",
|
||||
main_beige = "#D2CBB8",
|
||||
iroise_1 = "#DFECEF",
|
||||
iroise_2 = "#B1D7E0",
|
||||
iroise_3 = "#699DA3",
|
||||
iroise_4 = "#236A7A",
|
||||
iroise_5 = "#0C3842",
|
||||
red_main_1 = "#AE2829",
|
||||
red_main_2 = "#D05E5F",
|
||||
red_main_3 = "#DB9797",
|
||||
red_main_4 = "#EBC7C8",
|
||||
red_main_5 = "#FAF2F2",
|
||||
red_alt_1 = "#792a2e",
|
||||
red_alt_2 = "#c0474a",
|
||||
red_alt_3 = "#ee5859",
|
||||
red_alt_4 = "#f49695",
|
||||
red_alt_5 = "#f8d6d6",
|
||||
red_alt_na = "#f8f4f4",
|
||||
lt_grey_1 = "#C6C6C6",
|
||||
lt_grey_2 = "#818183",
|
||||
grey3 = "#E3E3E3",
|
||||
dk_grey = "#464647",
|
||||
two_dots_1 = "#706441",
|
||||
two_dots_2 = "#56b4e9",
|
||||
two_dots_flashy_1 = "gold1",
|
||||
two_dots_flashy_2 = "blue2",
|
||||
three_dots_1 = "aquamarine2",
|
||||
three_dots_2 = "cornflowerbluer",
|
||||
three_dots_3 = "brown1",
|
||||
orpink = "#f8aa9b",
|
||||
pink = "#f5a6a7",
|
||||
lt_pink = "#F9C6C7",
|
||||
hot_pink = "#ef6d6f",
|
||||
mddk_red = "#bf4749",
|
||||
dk_red = "#782c2e",
|
||||
orange = "#F69E61",
|
||||
lt_green = "#B0CFAC",
|
||||
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)) {
|
||||
cols_to_return <- colors_reach
|
||||
} else {
|
||||
cols_to_return <- colors_reach[cols]
|
||||
}
|
||||
|
||||
if (unnamed) {
|
||||
cols_to_return <- unname(cols_to_return)
|
||||
}
|
||||
|
||||
return(cols_to_return)
|
||||
}
|
||||
93
R/data.R
93
R/data.R
|
|
@ -1,93 +0,0 @@
|
|||
#' 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"
|
||||
211
R/dumbbell.R
Normal file
211
R/dumbbell.R
Normal file
|
|
@ -0,0 +1,211 @@
|
|||
#' 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_fun A ggplot2 theme, default to `theme_dumbbell()`
|
||||
#' @param scale_fill_fun A ggplot2 scale_fill function, default to `scale_fill_visualizer_discrete()`
|
||||
#' @param scale_color_fun A ggplot2 scale_color function, default to `scale_color_visualizer_discrete()`
|
||||
#'
|
||||
#' @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 = color("light_blue_grey"),
|
||||
group_x_title = NULL,
|
||||
group_y_title = NULL,
|
||||
x_title = NULL,
|
||||
title = NULL,
|
||||
subtitle = NULL,
|
||||
caption = NULL,
|
||||
line_to_y_axis = FALSE,
|
||||
line_to_y_axis_type = 3,
|
||||
line_to_y_axis_width = 0.5,
|
||||
line_to_y_axis_color = color("dark_grey"),
|
||||
add_text = FALSE,
|
||||
add_text_vjust = 2,
|
||||
add_text_size = 3.5,
|
||||
add_text_color = color("dark_grey"),
|
||||
theme_fun = theme_dumbbell(),
|
||||
scale_fill_fun = scale_fill_visualizer_discrete(),
|
||||
scale_color_fun = scale_color_visualizer_discrete()
|
||||
) {
|
||||
#------ Checks
|
||||
|
||||
# df is a data frame
|
||||
checkmate::assert_data_frame(df)
|
||||
|
||||
# col, group_x, group_y are character
|
||||
checkmate::assert_character(col, len = 1)
|
||||
checkmate::assert_character(group_x, len = 1)
|
||||
checkmate::assert_character(group_y, len = 1)
|
||||
|
||||
# col, group_x, group_y are columns in df
|
||||
checkmate::assert_choice(col, colnames(df))
|
||||
checkmate::assert_choice(group_x, colnames(df))
|
||||
checkmate::assert_choice(group_y, colnames(df))
|
||||
|
||||
# Check numeric/logical values
|
||||
checkmate::assert_numeric(point_size, len = 1)
|
||||
checkmate::assert_numeric(point_alpha, lower = 0, upper = 1, len = 1)
|
||||
checkmate::assert_numeric(segment_size, len = 1)
|
||||
checkmate::assert_logical(line_to_y_axis, len = 1)
|
||||
checkmate::assert_numeric(line_to_y_axis_type, len = 1)
|
||||
checkmate::assert_numeric(line_to_y_axis_width, len = 1)
|
||||
checkmate::assert_logical(add_text, len = 1)
|
||||
checkmate::assert_numeric(add_text_vjust, len = 1)
|
||||
checkmate::assert_numeric(add_text_size, len = 1)
|
||||
|
||||
# Get group keys
|
||||
group_x_keys <- df |>
|
||||
dplyr::group_by(!!rlang::sym(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(!!rlang::sym(group_y)),
|
||||
values_from = !!rlang::sym(col),
|
||||
names_from = !!rlang::sym(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, !!rlang::sym(col)))
|
||||
|
||||
g <- g +
|
||||
ggplot2::geom_segment(
|
||||
ggplot2::aes(
|
||||
x = min,
|
||||
y = !!rlang::sym(group_y),
|
||||
yend = !!rlang::sym(group_y)
|
||||
),
|
||||
xend = xend,
|
||||
linetype = line_to_y_axis_type,
|
||||
linewidth = 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 = !!rlang::sym(group_y),
|
||||
xend = !!rlang::sym(group_x_keys[[2]]),
|
||||
yend = !!rlang::sym(group_y)
|
||||
),
|
||||
linewidth = segment_size,
|
||||
color = segment_color
|
||||
)
|
||||
|
||||
# Add points
|
||||
g <- g +
|
||||
ggplot2::geom_point(
|
||||
data = df,
|
||||
ggplot2::aes(
|
||||
x = !!rlang::sym(col),
|
||||
y = !!rlang::sym(group_y),
|
||||
color = !!rlang::sym(group_x),
|
||||
fill = !!rlang::sym(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 = !!rlang::sym(col),
|
||||
y = !!rlang::sym(group_y),
|
||||
label = !!rlang::sym(col)
|
||||
),
|
||||
vjust = add_text_vjust,
|
||||
size = add_text_size,
|
||||
color = add_text_color
|
||||
)
|
||||
}
|
||||
|
||||
# Add theme
|
||||
g <- g + theme_fun
|
||||
|
||||
# Add scale fun
|
||||
if (!is.null(scale_fill_fun)) {
|
||||
g <- g + scale_fill_fun
|
||||
}
|
||||
|
||||
if (!is.null(scale_color_fun)) {
|
||||
g <- g + scale_color_fun
|
||||
}
|
||||
|
||||
return(g)
|
||||
}
|
||||
106
R/internals.R
106
R/internals.R
|
|
@ -1,95 +1,25 @@
|
|||
#' @title Abord bad argument
|
||||
# not in
|
||||
#' Not In Operator
|
||||
#'
|
||||
#' @param arg An argument
|
||||
#' @param must What arg must be
|
||||
#' @param not Optional. What arg must not be.
|
||||
#' A negation of the `%in%` operator that tests if elements of `a` are not in `b`.
|
||||
#'
|
||||
#' @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
|
||||
)
|
||||
#' @param a Vector or value to test
|
||||
#' @param b Vector to test against
|
||||
#'
|
||||
#' @return Logical vector with TRUE for elements of `a` that are not in `b`
|
||||
`%notin%` <- function(a, b) {
|
||||
!(a %in% b)
|
||||
}
|
||||
|
||||
|
||||
|
||||
#' @title Stop statement "If not in colnames" with colnames
|
||||
# not all in
|
||||
#' Not All In Operator
|
||||
#'
|
||||
#' @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.
|
||||
#' Tests if not all elements of `a` are contained in `b`.
|
||||
#'
|
||||
#' @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)]
|
||||
#' @param a Vector to test
|
||||
#' @param b Vector to test against
|
||||
#'
|
||||
#' @return TRUE if at least one element of `a` is not in `b`, otherwise FALSE
|
||||
`%notallin%` <- function(a, b) {
|
||||
!(all(a %in% b))
|
||||
}
|
||||
|
|
|
|||
338
R/lollipop.R
Normal file
338
R/lollipop.R
Normal file
|
|
@ -0,0 +1,338 @@
|
|||
#' @rdname lollipop
|
||||
#'
|
||||
#' @inheritParams lollipop
|
||||
#' @param ... Additional arguments passed to `lollipop()`
|
||||
#'
|
||||
#' @export
|
||||
hlollipop <- function(
|
||||
...,
|
||||
flip = TRUE,
|
||||
theme_fun = theme_lollipop(flip = flip)) {
|
||||
lollipop(flip = flip, theme_fun = theme_fun, ...)
|
||||
}
|
||||
|
||||
#' Simple lollipop chart
|
||||
#'
|
||||
#' @description
|
||||
#' `lollipop()` is a simple lollipop chart (dots connected to the baseline by a segment) with some customization allowed.
|
||||
#' `hlollipop()` uses `lollipop()` with sane defaults for a horizontal lollipop chart.
|
||||
#'
|
||||
#' @param df A data frame.
|
||||
#' @param x A quoted character column or coercible as a character column.
|
||||
#' @param y A quoted numeric column.
|
||||
#' @param group Some quoted grouping categorical column, e.g. administrative areas or population groups.
|
||||
#' @param facet Some quoted grouping categorical column, e.g. administrative areas or population groups.
|
||||
#' @param x_rm_na Remove NAs in x?
|
||||
#' @param y_rm_na Remove NAs in y?
|
||||
#' @param group_rm_na Remove NAs in group?
|
||||
#' @param facet_rm_na Remove NAs in facet?
|
||||
#' @param y_expand Multiplier to expand the y axis.
|
||||
#' @param add_color Add a color to dots (if no grouping).
|
||||
#' @param add_color_guide Should a legend be added?
|
||||
#' @param flip TRUE or FALSE (default). Default to TRUE or horizontal lollipop plot.
|
||||
#' @param wrap Should x-labels be wrapped? Number of characters.
|
||||
#' @param alpha Fill transparency for dots.
|
||||
#' @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 dot_size The size of the dots.
|
||||
#' @param line_size The size/width of the line connecting dots to the baseline.
|
||||
#' @param line_color The color of the line connecting dots to the baseline.
|
||||
#' @param dodge_width Width for position dodge when using groups (controls space between grouped lollipops).
|
||||
#' @param theme_fun Whatever theme function. For no custom theme, use theme_fun = NULL.
|
||||
#' @param scale_fill_fun Scale fill function. Default to scale_fill_visualizer_discrete().
|
||||
#' @param scale_color_fun Scale color function. Default to scale_color_visualizer_discrete().
|
||||
#'
|
||||
#'
|
||||
#' @inheritParams reorder_by
|
||||
#'
|
||||
#' @importFrom rlang `:=`
|
||||
#'
|
||||
#' @return A ggplot object
|
||||
#' @export
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' df <- data.frame(x = letters[1:5], y = c(10, 5, 7, 12, 8))
|
||||
#' # Vertical lollipop
|
||||
#' lollipop(df, "x", "y")
|
||||
#' # Horizontal lollipop
|
||||
#' hlollipop(df, "x", "y")
|
||||
#' }
|
||||
lollipop <- function(
|
||||
df,
|
||||
x,
|
||||
y,
|
||||
group = "",
|
||||
facet = "",
|
||||
order = "y",
|
||||
x_rm_na = TRUE,
|
||||
y_rm_na = TRUE,
|
||||
group_rm_na = TRUE,
|
||||
facet_rm_na = TRUE,
|
||||
y_expand = 0.1,
|
||||
add_color = color("cat_5_main_1"),
|
||||
add_color_guide = TRUE,
|
||||
flip = FALSE,
|
||||
wrap = NULL,
|
||||
alpha = 1,
|
||||
x_title = NULL,
|
||||
y_title = NULL,
|
||||
group_title = NULL,
|
||||
title = NULL,
|
||||
subtitle = NULL,
|
||||
caption = NULL,
|
||||
dot_size = 4,
|
||||
line_size = 0.8,
|
||||
line_color = color("dark_grey"),
|
||||
dodge_width = 0.9,
|
||||
theme_fun = theme_lollipop(
|
||||
flip = flip,
|
||||
axis_text_x_angle = 0,
|
||||
axis_text_x_vjust = 0.5,
|
||||
axis_text_x_hjust = 0.5
|
||||
),
|
||||
scale_fill_fun = scale_fill_visualizer_discrete(),
|
||||
scale_color_fun = scale_color_visualizer_discrete()) {
|
||||
#------ Checks
|
||||
|
||||
# df is a data frame
|
||||
checkmate::assert_data_frame(df)
|
||||
|
||||
# x and y and group are character
|
||||
checkmate::assert_character(x, len = 1)
|
||||
checkmate::assert_character(y, len = 1)
|
||||
checkmate::assert_character(group, len = 1)
|
||||
checkmate::assert_character(facet, len = 1)
|
||||
|
||||
# x and y are columns in df
|
||||
checkmate::assert_choice(x, colnames(df))
|
||||
checkmate::assert_choice(y, colnames(df))
|
||||
if (group != "") {
|
||||
checkmate::assert_choice(group, colnames(df))
|
||||
}
|
||||
if (facet != "") {
|
||||
checkmate::assert_choice(facet, colnames(df))
|
||||
}
|
||||
|
||||
# x_rm_na, y_rm_na and group_rm_na are logical scalar
|
||||
checkmate::assert_logical(x_rm_na, len = 1)
|
||||
checkmate::assert_logical(y_rm_na, len = 1)
|
||||
checkmate::assert_logical(group_rm_na, len = 1)
|
||||
checkmate::assert_logical(facet_rm_na, len = 1)
|
||||
|
||||
# flip is a logical scalar
|
||||
checkmate::assert_logical(flip, len = 1)
|
||||
|
||||
# dodge_width is a numeric scalar
|
||||
checkmate::assert_numeric(dodge_width, len = 1, lower = 0)
|
||||
|
||||
# wrap is a numeric scalar or NULL
|
||||
if (!is.null(wrap)) {
|
||||
checkmate::assert_numeric(wrap, len = 1, null.ok = TRUE)
|
||||
}
|
||||
|
||||
# alpha is a numeric scalar between 0 and 1
|
||||
checkmate::assert_numeric(alpha, lower = 0, upper = 1, len = 1)
|
||||
|
||||
# dot_size is a numeric scalar
|
||||
checkmate::assert_numeric(dot_size, len = 1)
|
||||
|
||||
# line_size is a numeric scalar
|
||||
checkmate::assert_numeric(line_size, len = 1)
|
||||
|
||||
# order is a character scalar in valid choices
|
||||
checkmate::assert_choice(order, c("none", "y", "grouped_y", "x", "grouped_x"))
|
||||
|
||||
# x and y are numeric or character
|
||||
if (class(df[[y]]) %notin% c("integer", "numeric")) {
|
||||
rlang::abort(paste0(y, " must be numeric."))
|
||||
}
|
||||
if (!any(class(df[[x]]) %in% c("character", "factor"))) {
|
||||
rlang::abort(paste0(x, " must be character or factor"))
|
||||
}
|
||||
|
||||
#----- Data wrangling
|
||||
|
||||
# facets over group
|
||||
if (group != "" && facet != "" && group == facet) {
|
||||
rlang::warn("'group' and 'facet' are the same identical.")
|
||||
}
|
||||
|
||||
# remove NAs using base R
|
||||
if (x_rm_na) {
|
||||
df <- df[!(is.na(df[[x]])), ]
|
||||
}
|
||||
if (y_rm_na) {
|
||||
df <- df[!(is.na(df[[y]])), ]
|
||||
}
|
||||
if (group != "" && group_rm_na) {
|
||||
df <- df[!(is.na(df[[group]])), ]
|
||||
}
|
||||
if (facet != "" && facet_rm_na) {
|
||||
df <- df[!(is.na(df[[facet]])), ]
|
||||
}
|
||||
|
||||
# reorder
|
||||
dir_order <- if (flip && order %in% c("x", "grouped_x")) {
|
||||
-1
|
||||
} else if (!flip && order %in% c("x", "grouped_x")) {
|
||||
1
|
||||
} else if (flip) {
|
||||
1
|
||||
} else {
|
||||
-1
|
||||
}
|
||||
group_order <- if (group != "" || (group == "" && facet == "")) {
|
||||
group
|
||||
} else if (group == "" && facet != "") {
|
||||
facet
|
||||
}
|
||||
df <- reorder_by(
|
||||
df = df,
|
||||
x = x,
|
||||
y = y,
|
||||
group = group_order,
|
||||
order = order,
|
||||
dir_order = dir_order
|
||||
)
|
||||
|
||||
# prepare aes
|
||||
if (group != "") {
|
||||
g <- ggplot2::ggplot(
|
||||
df,
|
||||
mapping = ggplot2::aes(
|
||||
x = !!rlang::sym(x),
|
||||
y = !!rlang::sym(y),
|
||||
fill = !!rlang::sym(group),
|
||||
color = !!rlang::sym(group)
|
||||
)
|
||||
)
|
||||
} else {
|
||||
g <- ggplot2::ggplot(
|
||||
df,
|
||||
mapping = ggplot2::aes(
|
||||
x = !!rlang::sym(x),
|
||||
y = !!rlang::sym(y)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
# add title, subtitle, caption, x_title, y_title
|
||||
g <- g +
|
||||
ggplot2::labs(
|
||||
title = title,
|
||||
subtitle = subtitle,
|
||||
caption = caption,
|
||||
x = y_title,
|
||||
y = x_title,
|
||||
color = group_title,
|
||||
fill = group_title
|
||||
)
|
||||
|
||||
# facets
|
||||
if (facet != "") {
|
||||
if (flip) {
|
||||
g <- g +
|
||||
ggplot2::facet_grid(
|
||||
rows = ggplot2::vars(!!rlang::sym(facet)),
|
||||
scales = "free",
|
||||
space = "free_y"
|
||||
)
|
||||
} else {
|
||||
g <- g +
|
||||
ggplot2::facet_grid(
|
||||
cols = ggplot2::vars(!!rlang::sym(facet)),
|
||||
scales = "free",
|
||||
space = "free_x"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
# Add segments and points
|
||||
if (group != "") {
|
||||
# With grouping - use position_dodge for side-by-side display
|
||||
position_dodge_obj <- ggplot2::position_dodge(width = dodge_width)
|
||||
|
||||
g <- g +
|
||||
ggplot2::geom_linerange(
|
||||
mapping = ggplot2::aes(
|
||||
ymin = 0,
|
||||
ymax = !!rlang::sym(y),
|
||||
group = !!rlang::sym(group)
|
||||
),
|
||||
position = position_dodge_obj,
|
||||
color = line_color,
|
||||
linewidth = line_size
|
||||
) +
|
||||
ggplot2::geom_point(
|
||||
position = position_dodge_obj,
|
||||
size = dot_size,
|
||||
alpha = alpha
|
||||
)
|
||||
} else {
|
||||
# Without grouping
|
||||
g <- g +
|
||||
ggplot2::geom_linerange(
|
||||
mapping = ggplot2::aes(
|
||||
ymin = 0,
|
||||
ymax = !!rlang::sym(y)
|
||||
),
|
||||
color = line_color,
|
||||
linewidth = line_size
|
||||
) +
|
||||
ggplot2::geom_point(
|
||||
size = dot_size,
|
||||
alpha = alpha,
|
||||
color = add_color,
|
||||
fill = add_color
|
||||
)
|
||||
}
|
||||
|
||||
# wrap labels on the x scale?
|
||||
if (!is.null(wrap)) {
|
||||
g <- g + ggplot2::scale_x_discrete(labels = scales::label_wrap(wrap))
|
||||
}
|
||||
|
||||
# flip coordinates if needed
|
||||
if (flip) {
|
||||
g <- g + ggplot2::coord_flip()
|
||||
}
|
||||
|
||||
# y scale tweaks
|
||||
g <- g +
|
||||
ggplot2::scale_y_continuous(
|
||||
# start at 0
|
||||
expand = ggplot2::expansion(mult = c(0, y_expand)),
|
||||
# remove trailing 0 and choose accuracy of y labels
|
||||
labels = scales::label_number(
|
||||
accuracy = 0.1,
|
||||
drop0trailing = TRUE,
|
||||
big.mark = "",
|
||||
decimal.mark = "."
|
||||
),
|
||||
)
|
||||
|
||||
# remove guides for legend if !add_color_guide
|
||||
if (!add_color_guide) {
|
||||
g <- g + ggplot2::guides(fill = "none", color = "none")
|
||||
}
|
||||
|
||||
# add theme fun
|
||||
if (!is.null(theme_fun)) {
|
||||
g <- g + theme_fun
|
||||
}
|
||||
|
||||
# add scale fun
|
||||
if (!is.null(scale_fill_fun)) {
|
||||
g <- g + scale_fill_fun
|
||||
}
|
||||
|
||||
if (!is.null(scale_color_fun)) {
|
||||
g <- g + scale_color_fun
|
||||
}
|
||||
|
||||
return(g)
|
||||
}
|
||||
354
R/map.R
354
R/map.R
|
|
@ -1,354 +0,0 @@
|
|||
|
||||
|
||||
#' 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,
|
||||
...)
|
||||
}
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
#' @title Return function to interpolate an AGORA color palette
|
||||
#'
|
||||
#' @param palette Character name of a palette in AGORA 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_agora <- function(palette = "main", reverse = FALSE, color_ramp_palette = FALSE, show_palettes = FALSE, ...) {
|
||||
|
||||
|
||||
palettes_agora <- list(
|
||||
`main` = cols_agora("main_grey", "main_red", "main_lt_grey", "main_beige"),
|
||||
`primary` = cols_agora("main_grey", "main_red"),
|
||||
`secondary` = cols_agora("main_lt_grey", "main_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))
|
||||
|
||||
pal <- palettes_agora[[palette]]
|
||||
|
||||
if (reverse) pal <- rev(pal)
|
||||
|
||||
if (color_ramp_palette) {
|
||||
rlang::check_installed("grDevices", reason = "Package \"grDevices\" needed for `pal_agora()` woth 'color_ramp_palette' set to `TRUE` to work. Please install it.")
|
||||
|
||||
pal <- grDevices::colorRampPalette(pal, ...)
|
||||
}
|
||||
|
||||
return(pal)
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
#' @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)
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
#' @title Return function to interpolate a REACH color palette
|
||||
#'
|
||||
#' @param palette Character name of a palette in REACH 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_reach <- function(palette = "main", reverse = FALSE, color_ramp_palette = FALSE, show_palettes = FALSE, ...) {
|
||||
|
||||
palettes_reach <- list(
|
||||
`main` = cols_reach("main_grey", "main_red", "main_lt_grey", "main_beige"),
|
||||
`primary` = cols_reach("main_grey", "main_red"),
|
||||
`secondary` = cols_reach("main_lt_grey", "main_beige"),
|
||||
`two_dots` = cols_reach("two_dots_1", "two_dots_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_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_5` = 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"),
|
||||
`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"),
|
||||
`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"),
|
||||
`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"),
|
||||
`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"),
|
||||
`green_2` = cols_reach("green_2_1", "green_2_2"),
|
||||
`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"),
|
||||
`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"),
|
||||
`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/palette.R
Normal file
81
R/palette.R
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
#' @title Interpolate a color palette
|
||||
#'
|
||||
#' @param palette Character name of a palette in palettes
|
||||
#' @param reverse Boolean indicating whether the palette should be reversed
|
||||
#' @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
|
||||
palette <- function(
|
||||
palette = "cat_5_main",
|
||||
reverse = FALSE,
|
||||
show_palettes = FALSE,
|
||||
...
|
||||
) {
|
||||
#------ Checks
|
||||
|
||||
# palette is a character scalar
|
||||
checkmate::assert_character(palette, len = 1)
|
||||
|
||||
# reverse is a logical scalar
|
||||
checkmate::assert_logical(reverse, len = 1)
|
||||
|
||||
# show_palettes is a logical scalar
|
||||
checkmate::assert_logical(show_palettes, len = 1)
|
||||
|
||||
#------ Get colors
|
||||
|
||||
# Define palettes
|
||||
pals <- list(
|
||||
cat_2_yellow = color_pattern("cat_2_yellow"),
|
||||
cat_2_light = color_pattern("cat_2_light"),
|
||||
cat_2_green = color_pattern("cat_2_green"),
|
||||
cat_2_blue = color_pattern("cat_2_blue"),
|
||||
cat_5_main = color_pattern("cat_5_main"),
|
||||
cat_5_ibm = color_pattern("cat_5_ibm"),
|
||||
cat_3_aquamarine = color_pattern("cat_3_aquamarine"),
|
||||
cat_3_tol_high_contrast = color_pattern("cat_3_tol_high_contrast"),
|
||||
cat_8_tol_adapted = color_pattern("cat_8_tol_adapted"),
|
||||
cat_3_custom_1 = c("#003F5C", "#58508D", "#FFA600"),
|
||||
cat_4_custom_1 = c("#003F5C", "#7a5195", "#ef5675", "#ffa600"),
|
||||
cat_5_custom_1 = c("#003F5C", "#58508d", "#bc5090", "#ff6361", "#ffa600"),
|
||||
cat_6_custom_1 = c(
|
||||
"#003F5C",
|
||||
"#444e86",
|
||||
"#955196",
|
||||
"#dd5182",
|
||||
"#ff6e54",
|
||||
"#ffa600"
|
||||
),
|
||||
div_5_orange_blue = color_pattern("div_5_orange_blue"),
|
||||
div_5_green_purple = color_pattern("div_5_green_purple")
|
||||
)
|
||||
|
||||
# Return if show palettes
|
||||
if (show_palettes) {
|
||||
return(names(pals))
|
||||
}
|
||||
|
||||
# palette is in pals
|
||||
if (palette %notin% names(pals)) {
|
||||
rlang::abort(c(
|
||||
"Palette not defined",
|
||||
"*" = glue::glue(
|
||||
"Palette `{palette}` is not defined in the `palettes` list."
|
||||
),
|
||||
"i" = "Use `palette(show_palettes = TRUE)` to see all available palettes."
|
||||
))
|
||||
}
|
||||
|
||||
#------ Get palette
|
||||
|
||||
pal <- pals[[palette]]
|
||||
|
||||
if (reverse) {
|
||||
pal <- rev(pal)
|
||||
}
|
||||
|
||||
return(pal)
|
||||
}
|
||||
79
R/palette_gen.R
Normal file
79
R/palette_gen.R
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
#' Generate color palettes
|
||||
#'
|
||||
#' [palette_gen()] generates a color palette and let you choose whether continuous or discrete. [palette_gen_categorical()] and [palette_gen_sequential()] generates respectively discrete and continuous palettes.
|
||||
#'
|
||||
#' @param palette Palette name from [palette()].
|
||||
#' @param type "categorical" or "sequential" or "divergent".
|
||||
#' @param direction 1 or -1; should the order of colors be reversed?
|
||||
#' @param ... Additional arguments to pass to [colorRampPalette()] when type is "continuous".
|
||||
#'
|
||||
#' @export
|
||||
palette_gen <- function(palette, type, direction = 1, ...) {
|
||||
#------ Checks
|
||||
|
||||
checkmate::assert_string(palette)
|
||||
checkmate::assert_choice(type, c("categorical", "sequential", "divergent"))
|
||||
checkmate::assert_number(direction, lower = -1, upper = 1)
|
||||
checkmate::assert_true(abs(direction) == 1)
|
||||
|
||||
if (type == "categorical") {
|
||||
return(palette_gen_categorical(palette = palette, direction = direction))
|
||||
}
|
||||
|
||||
if (type %in% c("sequential", "divergent")) {
|
||||
return(palette_gen_sequential(
|
||||
palette = palette,
|
||||
direction = direction,
|
||||
...
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#' @rdname palette_gen
|
||||
#'
|
||||
#' @export
|
||||
palette_gen_categorical <- function(palette = "cat_5_main", direction = 1) {
|
||||
#------ Checks
|
||||
|
||||
checkmate::assert_string(palette)
|
||||
checkmate::assert_number(direction, lower = -1, upper = 1)
|
||||
checkmate::assert_true(abs(direction) == 1)
|
||||
|
||||
pal <- palette(palette)
|
||||
|
||||
f <- function(n) {
|
||||
if (is.null(n)) {
|
||||
n <- length(pal)
|
||||
}
|
||||
|
||||
if (n > length(pal)) {
|
||||
rlang::warn("Not enough colors in this palette!")
|
||||
}
|
||||
|
||||
pal <- if (direction == 1) pal else rev(pal)
|
||||
|
||||
pal <- pal[1:n]
|
||||
|
||||
return(pal)
|
||||
}
|
||||
|
||||
return(f)
|
||||
}
|
||||
|
||||
#' @rdname palette_gen
|
||||
#'
|
||||
#' @export
|
||||
palette_gen_sequential <- function(palette = "cat_5_main", direction = 1, ...) {
|
||||
#------ Checks
|
||||
|
||||
checkmate::assert_string(palette)
|
||||
checkmate::assert_number(direction, lower = -1, upper = 1)
|
||||
checkmate::assert_true(abs(direction) == 1)
|
||||
|
||||
pal <- palette(palette)
|
||||
|
||||
pal <- if (direction == 1) pal else rev(pal)
|
||||
|
||||
grDevices::colorRampPalette(pal, ...)
|
||||
}
|
||||
243
R/point.R
243
R/point.R
|
|
@ -1,64 +1,211 @@
|
|||
#' @title Simple point chart
|
||||
#' @title Simple scatterplot
|
||||
#'
|
||||
#' @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 palette Palette name from 'pal_reach()'.
|
||||
#' @param reverse Boolean indicating whether the palette should be reversed.
|
||||
#' @param family The font family for all plot's texts. Default to "Leelawadee".
|
||||
#' @param alpha Transparency.
|
||||
#' @param size Dot size. Default to 1.5.
|
||||
#' @param x A quoted numeric column.
|
||||
#' @param y A quoted numeric column.
|
||||
#' @param group Some quoted grouping categorical column, e.g. administrative areas or population groups.
|
||||
#' @param facet Some quoted grouping categorical column.
|
||||
#' @param facet_scales Character. Either "free" (default) or "fixed" for facet scales.
|
||||
#' @param x_rm_na Remove NAs in x?
|
||||
#' @param y_rm_na Remove NAs in y?
|
||||
#' @param group_rm_na Remove NAs in group?
|
||||
#' @param facet_rm_na Remove NAs in facet?
|
||||
#' @param add_color Add a color to points (if no grouping).
|
||||
#' @param add_color_guide Should a legend be added?
|
||||
#' @param flip TRUE or FALSE.
|
||||
#' @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 Caption title string. Default to NULL.
|
||||
#' @param text_size The size of all text other than the title, subtitle and caption. Defaults to 10.
|
||||
#' @param title_size The size of the title text. Defaults to 14.
|
||||
#' @param legend_position Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".
|
||||
#' @param ... Other arguments to be passed to "ggblanket::gg_col"
|
||||
#'
|
||||
#' @description `ggblanket` as internals for deciding whether the bar chart is horizontally readable.
|
||||
#'
|
||||
#' @return A bar chart
|
||||
#' @param caption Plot caption. Default to NULL.
|
||||
#' @param theme_fun Whatever theme. Default to theme_point(). NULL if no theming needed.
|
||||
#' @param scale_fill_fun Scale fill function. Default to scale_fill_visualizer_discrete().
|
||||
#' @param scale_color_fun Scale color function. Default to scale_color_visualizer_discrete().
|
||||
#'
|
||||
#' @export
|
||||
point_reach <- function(df, x, y, group = NULL, palette = "main", reverse = FALSE, family = "Leelawadee", alpha = 1, size = 1.5, x_title = NULL, y_title = NULL, group_title = NULL, title = NULL, subtitle = NULL, caption = NULL, text_size = 10, title_size = 14, legend_position = "right", ...){
|
||||
point <- function(
|
||||
df,
|
||||
x,
|
||||
y,
|
||||
group = "",
|
||||
facet = "",
|
||||
facet_scales = "free",
|
||||
x_rm_na = TRUE,
|
||||
y_rm_na = TRUE,
|
||||
group_rm_na = TRUE,
|
||||
facet_rm_na = TRUE,
|
||||
add_color = color("cat_5_main_1"),
|
||||
add_color_guide = TRUE,
|
||||
flip = TRUE,
|
||||
alpha = 1,
|
||||
size = 2,
|
||||
x_title = NULL,
|
||||
y_title = NULL,
|
||||
group_title = NULL,
|
||||
title = NULL,
|
||||
subtitle = NULL,
|
||||
caption = NULL,
|
||||
theme_fun = theme_point(),
|
||||
scale_fill_fun = scale_fill_visualizer_discrete(),
|
||||
scale_color_fun = scale_color_visualizer_discrete()) {
|
||||
#------ Checks
|
||||
|
||||
pal <- pal_reach(palette)
|
||||
# df is a data frame
|
||||
checkmate::assert_data_frame(df)
|
||||
|
||||
if(is.null(pal)) rlang::warn(
|
||||
c(paste0("There is no palette '", palette, "' for initiative 'reach'. Fallback to ggblanket's default color palette."),
|
||||
"i" = paste0("Use `pal_reach(show_palettes = T)` to see the list of availabale palettes.")
|
||||
# x and y and group are character
|
||||
checkmate::assert_character(x, len = 1)
|
||||
checkmate::assert_character(y, len = 1)
|
||||
checkmate::assert_character(group, len = 1)
|
||||
|
||||
# x and y are columns in df
|
||||
checkmate::assert_choice(x, colnames(df))
|
||||
checkmate::assert_choice(y, colnames(df))
|
||||
if (group != "") {
|
||||
checkmate::assert_choice(group, colnames(df))
|
||||
}
|
||||
|
||||
# x_rm_na, y_rm_na and group_rm_na are logical scalar
|
||||
checkmate::assert_logical(x_rm_na, len = 1)
|
||||
checkmate::assert_logical(y_rm_na, len = 1)
|
||||
checkmate::assert_logical(group_rm_na, len = 1)
|
||||
checkmate::assert_logical(facet_rm_na, len = 1)
|
||||
|
||||
# facet_scales is a character scalar in c("free", "fixed")
|
||||
checkmate::assert_choice(facet_scales, c("free", "fixed"))
|
||||
|
||||
# flip is a logical scalar
|
||||
checkmate::assert_logical(flip, len = 1)
|
||||
|
||||
# alpha is a numeric scalar between 0 and 1
|
||||
checkmate::assert_numeric(alpha, lower = 0, upper = 1, len = 1)
|
||||
|
||||
# size is a numeric scalar
|
||||
checkmate::assert_numeric(size, len = 1)
|
||||
|
||||
# x and y are numeric
|
||||
if (!any(c("numeric", "integer") %in% class(df[[x]]))) {
|
||||
rlang::abort(paste0(x, " must be numeric."))
|
||||
}
|
||||
if (!any(c("numeric", "integer") %in% class(df[[y]]))) {
|
||||
rlang::abort(paste0(y, " must be numeric."))
|
||||
}
|
||||
|
||||
#----- Data wrangling
|
||||
|
||||
# facets over group
|
||||
if (group != "" && facet != "" && group == facet) {
|
||||
rlang::warn("'group' and 'facet' are the same identical.")
|
||||
}
|
||||
|
||||
# remove NAs using base R
|
||||
if (x_rm_na) {
|
||||
df <- df[!(is.na(df[[x]])), ]
|
||||
}
|
||||
if (y_rm_na) {
|
||||
df <- df[!(is.na(df[[y]])), ]
|
||||
}
|
||||
if (group != "" && group_rm_na) {
|
||||
df <- df[!(is.na(df[[group]])), ]
|
||||
}
|
||||
if (facet != "" && facet_rm_na) {
|
||||
df <- df[!(is.na(df[[facet]])), ]
|
||||
}
|
||||
|
||||
# prepare aes
|
||||
if (group != "") {
|
||||
g <- ggplot2::ggplot(
|
||||
df,
|
||||
mapping = ggplot2::aes(
|
||||
x = !!rlang::sym(x),
|
||||
y = !!rlang::sym(y),
|
||||
fill = !!rlang::sym(group),
|
||||
color = !!rlang::sym(group)
|
||||
)
|
||||
)
|
||||
)
|
||||
} else {
|
||||
g <- ggplot2::ggplot(
|
||||
df,
|
||||
mapping = ggplot2::aes(
|
||||
x = !!rlang::sym(x),
|
||||
y = !!rlang::sym(y)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
pl <- df |>
|
||||
ggblanket::gg_point(x = {{ x }},
|
||||
y = {{ y }},
|
||||
col = {{ group }},
|
||||
x_title = x_title,
|
||||
y_title = y_title,
|
||||
col_title = group_title,
|
||||
alpha = alpha,
|
||||
size = size,
|
||||
title = title,
|
||||
subtitle = subtitle,
|
||||
caption = caption,
|
||||
col_legend_place = legend_position,
|
||||
theme = theme_reach(
|
||||
palette = palette,
|
||||
reverse = reverse,
|
||||
family = family,
|
||||
text_size = text_size,
|
||||
title_size = title_size,
|
||||
plot_background_pal = "#FFFFFF",
|
||||
panel_background_pal = "#FFFFFF"
|
||||
),
|
||||
...
|
||||
# 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
|
||||
)
|
||||
|
||||
return(pl)
|
||||
# facets
|
||||
# facets
|
||||
if (facet != "") {
|
||||
if (flip) {
|
||||
g <- g +
|
||||
ggplot2::facet_grid(
|
||||
rows = ggplot2::vars(!!rlang::sym(facet)),
|
||||
scales = facet_scales,
|
||||
space = if (facet_scales == "free") "free_y" else "fixed"
|
||||
)
|
||||
} else {
|
||||
g <- g +
|
||||
ggplot2::facet_grid(
|
||||
cols = ggplot2::vars(!!rlang::sym(facet)),
|
||||
scales = facet_scales,
|
||||
space = if (facet_scales == "free") "free_x" else "fixed"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
# Should the graph use position_fill?
|
||||
if (group != "") {
|
||||
g <- g +
|
||||
ggplot2::geom_point(
|
||||
alpha = alpha,
|
||||
size = size
|
||||
)
|
||||
} else {
|
||||
g <- g +
|
||||
ggplot2::geom_point(
|
||||
alpha = alpha,
|
||||
size = size,
|
||||
color = add_color
|
||||
)
|
||||
}
|
||||
|
||||
if (flip) {
|
||||
g <- g + ggplot2::coord_flip()
|
||||
}
|
||||
|
||||
# Remove guides for legend if !add_color_guide
|
||||
if (!add_color_guide) {
|
||||
g <- g + ggplot2::guides(fill = "none", color = "none")
|
||||
}
|
||||
|
||||
# Add theme
|
||||
if (!is.null(theme_fun)) {
|
||||
g <- g + theme_fun
|
||||
}
|
||||
|
||||
# Add scale fun
|
||||
if (!is.null(scale_fill_fun)) {
|
||||
g <- g + scale_fill_fun
|
||||
}
|
||||
|
||||
if (!is.null(scale_color_fun)) {
|
||||
g <- g + scale_color_fun
|
||||
}
|
||||
|
||||
return(g)
|
||||
}
|
||||
|
|
|
|||
108
R/reorder_by.R
Normal file
108
R/reorder_by.R
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
#' Reorder a Data Frame
|
||||
#'
|
||||
#' @param df A data frame to be reordered.
|
||||
#' @param x A character scalar specifying the column to be reordered.
|
||||
#' @param y A character scalar specifying the column to order by if ordering by values.
|
||||
#' @param group A character scalar specifying the grouping column (optional).
|
||||
#' @param order A character scalar specifying the order type (one of "none", "y", "grouped"). See details.
|
||||
#' @param dir_order A logical scalar specifying whether to flip the order.
|
||||
#'
|
||||
#' @details Ordering takes the following possible values:
|
||||
#'
|
||||
#' * "none": No reordering.
|
||||
#' * "y": Order by values of y.
|
||||
#' * "grouped_y": Order by values of y and group.
|
||||
#' * "x": Order alphabetically by x.
|
||||
#' * "grouped_x": Order alphabetically by x and group.
|
||||
#'
|
||||
#'
|
||||
#' @return The reordered data frame.
|
||||
#'
|
||||
#' @examples
|
||||
#' # Example usage
|
||||
#' df <- data.frame(col1 = c("b", "a", "c"), col2 = c(10, 25, 3))
|
||||
#' reorder_by(df, "col1", "col2")
|
||||
#'
|
||||
#' @export
|
||||
reorder_by <- function(df, x, y, group = "", order = "y", dir_order = 1) {
|
||||
#------ Checks
|
||||
|
||||
# df is a data frame
|
||||
checkmate::assert_data_frame(df)
|
||||
|
||||
# x and y are character scalar and in df
|
||||
checkmate::assert_character(x, len = 1)
|
||||
checkmate::assert_character(y, len = 1)
|
||||
checkmate::assert_subset(x, colnames(df))
|
||||
checkmate::assert_subset(y, colnames(df))
|
||||
|
||||
# group is character scalar and in df if not empty
|
||||
checkmate::assert_character(group, len = 1)
|
||||
if (group != "") {
|
||||
checkmate::assert_subset(group, colnames(df))
|
||||
}
|
||||
|
||||
# order is a character scalar in c("none", "y", "grouped")
|
||||
checkmate::assert_choice(order, c("none", "y", "grouped_y", "x", "grouped_x"))
|
||||
|
||||
# dir_order is 1 or -1 (numeric scalar)
|
||||
checkmate::assert_subset(dir_order, c(1, -1))
|
||||
|
||||
# Convert dir_order to decreasing logical flag
|
||||
dir_order_lgl <- (dir_order == -1)
|
||||
|
||||
#------ Reorder
|
||||
|
||||
# droplevels first
|
||||
if (is.factor(df[[x]])) {
|
||||
df[[x]] <- droplevels(df[[x]])
|
||||
}
|
||||
|
||||
# reording options
|
||||
if (order == "y") {
|
||||
# Order by values of y
|
||||
df <- df[order(df[[y]], decreasing = dir_order_lgl), ]
|
||||
df[[x]] <- forcats::fct_inorder(df[[x]])
|
||||
} else if (order == "grouped_y" && group != "") {
|
||||
# Order by group first, then by values of y
|
||||
df <- df[
|
||||
order(
|
||||
df[[group]],
|
||||
df[[y]],
|
||||
decreasing = c(FALSE, dir_order_lgl),
|
||||
method = "radix"
|
||||
),
|
||||
]
|
||||
df[[x]] <- forcats::fct_inorder(df[[x]])
|
||||
} else if (order == "grouped_y" && group == "") {
|
||||
# Fallback to ordering by y if group is empty
|
||||
rlang::warn("Group is empty. Ordering by y only.")
|
||||
df <- df[order(df[[y]], decreasing = dir_order_lgl), ]
|
||||
df[[x]] <- forcats::fct_inorder(df[[x]])
|
||||
} else if (order == "x") {
|
||||
# Order alphabetically by x
|
||||
df <- df[order(df[[x]], decreasing = dir_order_lgl), ]
|
||||
df[[x]] <- forcats::fct_inorder(df[[x]])
|
||||
} else if (order == "grouped_x" && group != "") {
|
||||
# Order by group first, then alphabetically by x
|
||||
df <- df[
|
||||
order(
|
||||
df[[group]],
|
||||
df[[x]],
|
||||
decreasing = c(FALSE, dir_order_lgl),
|
||||
method = "radix"
|
||||
),
|
||||
]
|
||||
df[[x]] <- forcats::fct_inorder(df[[x]])
|
||||
} else if (order == "grouped_x" && group == "") {
|
||||
# Fallback to ordering by x if group is empty
|
||||
rlang::warn("Group is empty. Ordering by x only.")
|
||||
df <- df[order(df[[x]], decreasing = dir_order_lgl), ]
|
||||
df[[x]] <- forcats::fct_inorder(df[[x]])
|
||||
}
|
||||
|
||||
# Reset row names
|
||||
rownames(df) <- NULL
|
||||
|
||||
return(df)
|
||||
}
|
||||
225
R/scale.R
225
R/scale.R
|
|
@ -1,118 +1,157 @@
|
|||
#' Color scale constructor for REACH or AGORA colors
|
||||
#' Scale constructors for fill and colors
|
||||
#'
|
||||
#' This function is based on [palette()]. If palette is NULL, the used palette will be magma from gpplot2's viridis scale constructors.
|
||||
#'
|
||||
#' @inheritParams palette_gen
|
||||
#'
|
||||
#' @param initiative Either "reach" or "agora.
|
||||
#' @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 color scale for ggplot
|
||||
#' @param title_position Position of the title. See [ggplot2::guide_legend()]'s title.position argument.
|
||||
#' @param ... Additional arguments passed to [ggplot2::discrete_scale()] if discrete or [ggplot2::scale_fill_gradient()] if continuous.
|
||||
#'
|
||||
#' @export
|
||||
scale_color <- function(initiative = "reach", palette = "main", discrete = TRUE, reverse = FALSE, reverse_guide = TRUE, ...) {
|
||||
|
||||
if (initiative == "reach") {
|
||||
pal <- pal_reach(
|
||||
palette = palette,
|
||||
reverse = reverse,
|
||||
color_ramp_palette = TRUE,
|
||||
show_palettes = FALSE
|
||||
)
|
||||
} else if (initiative == "agora") {
|
||||
pal <- pal_agora(
|
||||
palette = palette,
|
||||
reverse = reverse,
|
||||
color_ramp_palette = TRUE,
|
||||
show_palettes = FALSE
|
||||
)
|
||||
} else {
|
||||
rlang::abort(c("Wrong initiative parameter input", "*" = paste0(initiative, "is not an option"), "i" = "Parameter 'initiative' should be one of 'reach' or 'agora'"))
|
||||
}
|
||||
|
||||
if (discrete) {
|
||||
scale_color_visualizer_discrete <- function(
|
||||
palette = "cat_5_main",
|
||||
direction = 1,
|
||||
reverse_guide = TRUE,
|
||||
title_position = NULL,
|
||||
...) {
|
||||
if (!(is.null(palette))) {
|
||||
ggplot2::discrete_scale(
|
||||
"colour",
|
||||
paste0(initiative, "_", palette),
|
||||
palette = pal,
|
||||
"color",
|
||||
palette = palette_gen(palette, "categorical", direction),
|
||||
guide = ggplot2::guide_legend(
|
||||
title.position = "top",
|
||||
title.position = title_position,
|
||||
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",
|
||||
# ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide
|
||||
),
|
||||
...)
|
||||
...
|
||||
)
|
||||
} else {
|
||||
ggplot2::scale_colour_viridis_d(
|
||||
direction = direction,
|
||||
guide = ggplot2::guide_legend(
|
||||
title.position = title_position,
|
||||
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.
|
||||
#' @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.
|
||||
#' @rdname scale_color_visualizer_discrete
|
||||
#'
|
||||
#' @export
|
||||
scale_fill <- function(initiative = "reach", palette = "main", discrete = TRUE, reverse = FALSE, reverse_guide = TRUE, ...) {
|
||||
|
||||
if (initiative == "reach") {
|
||||
pal <- pal_reach(
|
||||
palette = palette,
|
||||
reverse = reverse,
|
||||
color_ramp_palette = TRUE,
|
||||
show_palettes = FALSE
|
||||
)
|
||||
} else if (initiative == "agora") {
|
||||
pal <- pal_agora(
|
||||
palette = palette,
|
||||
reverse = reverse,
|
||||
color_ramp_palette = TRUE,
|
||||
show_palettes = FALSE
|
||||
)
|
||||
} else {
|
||||
rlang::abort(c("Wrong initiative parameter input", "*" = paste0(initiative, "is not an option"), "i" = "Parameter 'initiative' should be one of 'reach' or 'agora'"))
|
||||
}
|
||||
|
||||
if (discrete) {
|
||||
scale_fill_visualizer_discrete <- function(
|
||||
palette = "cat_5_main",
|
||||
direction = 1,
|
||||
reverse_guide = TRUE,
|
||||
title_position = NULL,
|
||||
...) {
|
||||
if (!(is.null(palette))) {
|
||||
ggplot2::discrete_scale(
|
||||
"fill",
|
||||
paste0(initiative, "_", palette),
|
||||
palette = pal,
|
||||
palette = palette_gen(palette, "categorical", direction),
|
||||
guide = ggplot2::guide_legend(
|
||||
title.position = "top",
|
||||
title.position = title_position,
|
||||
draw.ulim = TRUE,
|
||||
draw.llim = TRUE,
|
||||
ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide),
|
||||
...)
|
||||
# ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide
|
||||
),
|
||||
...
|
||||
)
|
||||
} else {
|
||||
ggplot2::scale_fill_gradientn(
|
||||
colours = pal(256),
|
||||
guide = ggplot2::guide_colorbar(
|
||||
title.position = "top",
|
||||
ggplot2::scale_fill_viridis_d(
|
||||
direction = direction,
|
||||
guide = ggplot2::guide_legend(
|
||||
title.position = title_position,
|
||||
draw.ulim = TRUE,
|
||||
draw.llim = TRUE,
|
||||
ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide),
|
||||
...)
|
||||
# ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide
|
||||
),
|
||||
...
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#' @rdname scale_color_visualizer_discrete
|
||||
#'
|
||||
#' @export
|
||||
scale_fill_visualizer_continuous <- function(
|
||||
palette = "seq_5_main",
|
||||
direction = 1,
|
||||
reverse_guide = TRUE,
|
||||
title_position = NULL,
|
||||
...) {
|
||||
if (!(is.null(palette))) {
|
||||
pal <- palette_gen(palette, "continuous", direction)
|
||||
|
||||
ggplot2::scale_fill_gradientn(
|
||||
colors = pal(256),
|
||||
guide = ggplot2::guide_colorbar(
|
||||
title.position = title_position,
|
||||
draw.ulim = TRUE,
|
||||
draw.llim = TRUE,
|
||||
# ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide
|
||||
),
|
||||
...
|
||||
)
|
||||
} else {
|
||||
ggplot2::scale_fill_viridis_c(
|
||||
option = "magma",
|
||||
guide = ggplot2::guide_colorbar(
|
||||
title.position = title_position,
|
||||
draw.ulim = TRUE,
|
||||
draw.llim = TRUE,
|
||||
# ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide
|
||||
),
|
||||
...
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#' @rdname scale_color_visualizer_discrete
|
||||
#'
|
||||
#' @export
|
||||
scale_color_visualizer_continuous <- function(
|
||||
palette = "seq_5_main",
|
||||
direction = 1,
|
||||
reverse_guide = TRUE,
|
||||
title_position = NULL,
|
||||
...) {
|
||||
if (!(is.null(palette))) {
|
||||
pal <- palette_gen(palette, "continuous", direction)
|
||||
|
||||
ggplot2::scale_fill_gradientn(
|
||||
colors = pal(256),
|
||||
guide = ggplot2::guide_colorbar(
|
||||
title.position = title_position,
|
||||
draw.ulim = TRUE,
|
||||
draw.llim = TRUE,
|
||||
# ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide
|
||||
),
|
||||
...
|
||||
)
|
||||
} else {
|
||||
ggplot2::scale_colour_viridis_c(
|
||||
option = "magma",
|
||||
guide = ggplot2::guide_colorbar(
|
||||
title.position = title_position,
|
||||
draw.ulim = TRUE,
|
||||
draw.llim = TRUE,
|
||||
# ticks.colour = "#F1F3F5",
|
||||
reverse = reverse_guide
|
||||
),
|
||||
...
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
257
R/test.R
257
R/test.R
|
|
@ -1,257 +0,0 @@
|
|||
library(ggplot2)
|
||||
library(visualizeR)
|
||||
# install.packages('ggsn')
|
||||
library(ggsn)
|
||||
# install.packages("ggspatial")
|
||||
library(ggspatial)
|
||||
# install.packages("ggrepel")
|
||||
library(ggrepel)
|
||||
|
||||
remotes::install_github("coolbutuseless/ggpattern")
|
||||
library(ggpattern)
|
||||
|
||||
# library(remotes)
|
||||
# remotes::install_version("Rttf2pt1", version = "1.3.8")
|
||||
# library(Rttf2pt1)
|
||||
# extrafont::font_import()
|
||||
extrafont::loadfonts()
|
||||
|
||||
library(classInt)
|
||||
classes <- classIntervals(indicator_admin1[["opn_dfc"]], n = 5, style = "pretty") #can use "jenks" but is very slow
|
||||
bbox <- buffer_bbox(sf::st_bbox(indicator_admin1), 0.1)
|
||||
prop_x = 0.95
|
||||
prop_y = 0.95
|
||||
bbox_arrow <- c(x = bbox[["xmin"]] + prop_x * (bbox[["xmax"]] - bbox[["xmin"]]), y = bbox[["ymin"]] + prop_y * (bbox[["ymax"]] - bbox[["ymin"]]))
|
||||
|
||||
indicator_admin1 <- indicator_admin1 |>
|
||||
dplyr::mutate(opn_dfc_class = cut(opn_dfc, classes$brks, include.lowest = TRUE))
|
||||
# |>
|
||||
# dplyr::mutate(opn_dfc_class = stringr::str_replace_na(opn_dfc_class, "Missing data"))
|
||||
|
||||
legend_labels <- c(levels(indicator_admin1$opn_dfc_class), "Missing data")
|
||||
|
||||
ggplot() +
|
||||
# annotation_map_tile(type = "stamenwatercolor") +
|
||||
geom_sf(data = indicator_admin1, aes(fill = opn_dfc_class), color = "transparent") +
|
||||
scale_fill(palette = "red_5", discrete = TRUE, reverse_guide = FALSE, name = "Proportion (%)", labels = legend_labels, drop = FALSE) +
|
||||
scalebar(st.size = 3, border.size = 0.5, x.min = bbox[["xmin"]], y.min = bbox[["ymin"]], x.max = bbox[["xmax"]], y.max = bbox[["ymax"]], dist = 50, dist_unit = "km", transform = TRUE) +
|
||||
north(symbol = 12, anchor = bbox_arrow, x.min = bbox[["xmin"]], y.min = bbox[["ymin"]], x.max = bbox[["xmax"]], y.max = bbox[["ymax"]]) +
|
||||
theme_void() +
|
||||
theme(
|
||||
# legend.justification defines the edge of the legend that the legend.position coordinates refer to
|
||||
legend.justification = c(0, 1),
|
||||
# Set the legend flush with the left side of the plot, and just slightly below the top of the plot
|
||||
legend.position = c(0, .95),
|
||||
# Set fontfamily
|
||||
text = element_text(family = "Leelawadee")
|
||||
)
|
||||
|
||||
|
||||
|
||||
centroid_admin1 <- visualizeR::centroid_admin1 |>
|
||||
# sf::st_set_crs(4326) |>
|
||||
sf::st_coordinates() |>
|
||||
dplyr::bind_cols(centroid_admin1) |>
|
||||
sf::st_as_sf(remove = FALSE, crs = sf::st_crs(4326))
|
||||
|
||||
|
||||
add_text_labels <- function(map = NULL,
|
||||
point,
|
||||
text,
|
||||
size = 0.5,
|
||||
fontface = "bold",
|
||||
fontfamily = "Leelawadee",
|
||||
halo_radius = 0.15,
|
||||
halo_color = "white",
|
||||
angle = 0,
|
||||
force = 0,
|
||||
force_pull = 0){
|
||||
|
||||
if(is.null(map)) map <- ggplot()
|
||||
|
||||
col_name <- rlang::as_name(rlang::enquo(text))
|
||||
|
||||
layer <- map +
|
||||
ggspatial::geom_spatial_text_repel(
|
||||
data = point,
|
||||
aes(x = X, y = Y, label = !!rlang::sym(col_name)),
|
||||
crs = sf::st_crs(point)$input,
|
||||
force = force,
|
||||
force_pull = force_pull,
|
||||
size = 3,
|
||||
angle = angle,
|
||||
fontface = fontface,
|
||||
family = fontfamily,
|
||||
bg.r = halo_radius,
|
||||
bg.color = halo_color)
|
||||
|
||||
|
||||
return(layer)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_admin_boundaries <- function(map = NULL, lines, colors, labels, lwds, legend_title = "", buffer = NULL, ...){
|
||||
|
||||
|
||||
if(is.null(map)) map <- ggplot()
|
||||
|
||||
#------ 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
|
||||
|
||||
for (i in 1:length(lines)) {
|
||||
lines[[i]] <- lines[[i]] |>
|
||||
dplyr::mutate(color = colors[[i]],
|
||||
label = labels[[i]],
|
||||
lwd = lwds[[i]])
|
||||
}
|
||||
|
||||
|
||||
layers <- map + ggplot2::geom_sf(data = lines[[1]], aes(color = .data[["label"]], linewidth = .data[["label"]]))
|
||||
|
||||
if (length(lines) > 1){
|
||||
|
||||
for(i in 2:length(lines)){
|
||||
|
||||
data <- lines[[i]]
|
||||
color <- labels[[i]]
|
||||
size <- labels[[i]]
|
||||
|
||||
layers <- layers + ggplot2::geom_sf(data = data, aes(color = .data[["label"]], linewidth = .data[["label"]]))
|
||||
|
||||
}
|
||||
}
|
||||
#
|
||||
layers <- layers +
|
||||
ggplot2::scale_color_manual(name = legend_title, values = setNames(colors, labels), breaks = labels) +
|
||||
ggplot2::scale_discrete_manual("linewidth", name = legend_title, values = setNames(lwds, labels), breaks = labels)
|
||||
|
||||
|
||||
return(layers)
|
||||
|
||||
|
||||
}
|
||||
|
||||
test <- add_indicator_layer(indicator_admin1, opn_dfc, n = 5, text_na = "Et ouais")
|
||||
test <- add_admin_boundaries(map = test,
|
||||
lines = list(line_admin1, border_admin0, frontier_admin0),
|
||||
colors = cols_reach("main_lt_grey", "main_grey", "black"),
|
||||
lwds = c(0.5, 1, 2),
|
||||
labels = c("Department", "Country", "Dominican Rep. frontier"),
|
||||
legend_title = "Administrative boundaries")
|
||||
test <- add_text_labels(map = test, centroid_admin1, ADM1_FR_UPPER)
|
||||
test
|
||||
|
||||
|
||||
# map
|
||||
ggplot2::ggsave(test,
|
||||
"R/test.pdf",
|
||||
height = 4.5,
|
||||
width = 6,
|
||||
device = cairo_pdf
|
||||
)
|
||||
|
||||
test <- add_text_labels(map = test, centroid_admin1, ADM1_FR_UPPER)
|
||||
|
||||
ggplot2::ggsave("test.svg", test, device = "svg", width = 6.5, height = 4)
|
||||
|
||||
|
||||
|
||||
test
|
||||
|
||||
test <- add_indicator_layer(indicator_admin1, opn_dfc, n = 5)
|
||||
add_text_labels(map = NULL, centroid_admin1, ADM1_FR_UPPER)
|
||||
add_admin_boundaries(map = NULL,
|
||||
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")
|
||||
|
||||
|
||||
library(patchwork)
|
||||
test+test2
|
||||
|
||||
|
||||
# # Final first draft -------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
add_indicator_layer <- function(poly, col, n = 5, palette = "red_5", style = "pretty", discrete = TRUE, legend_title = "Proportion (%)", drop = FALSE, buffer = NULL, fontfamily = "Segoe UI", text_NA = "Missing data", legend_position = c(0, 0.95)){
|
||||
|
||||
#------ 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 }
|
||||
|
||||
classes <- classInt::classIntervals(poly[[col_name]], n = n, style = style)
|
||||
col_class_name <- paste0(col_name, "_class")
|
||||
|
||||
poly <- poly |>
|
||||
dplyr::mutate("{col_class_name}" := cut({{ col }}, classes$brks, include.lowest = TRUE))
|
||||
|
||||
legend_labels <- c(levels(poly[[col_class_name]]), text_NA)
|
||||
|
||||
#------ Make map layer
|
||||
|
||||
layer <- ggplot() +
|
||||
geom_sf(data = poly, aes(fill = !!rlang::sym(col_class_name)), color = "transparent") +
|
||||
scale_fill(palette = palette, discrete = discrete, reverse_guide = FALSE, name = legend_title, labels = legend_labels, drop = drop) +
|
||||
theme_void() +
|
||||
theme(
|
||||
# legend.justification defines the edge of the legend that the legend.position coordinates refer to
|
||||
legend.justification = c(0, 1),
|
||||
# Set the legend flush with the left side of the plot, and just slightly below the top of the plot
|
||||
legend.position = legend_position,
|
||||
# Set fontfamily
|
||||
text = element_text(family = fontfamily)
|
||||
) +
|
||||
ggplot2::guides(fill = ggplot2::guide_legend(override.aes = list(color = cols_reach("main_lt_grey"))))
|
||||
|
||||
return(layer)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_labs <- function(map = NULL, title = NULL, subtitle = NULL){
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------ example
|
||||
tt <- add_indicator_layer(indicator_admin1, opn_dfc, n = 5)
|
||||
|
||||
97
R/theme_bar.R
Normal file
97
R/theme_bar.R
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
#' Custom Theme for Bar Charts
|
||||
#'
|
||||
#' @return A custom theme object.
|
||||
#'
|
||||
#'
|
||||
#' @rdname theme_default
|
||||
#'
|
||||
#' @inheritParams bar
|
||||
#'
|
||||
#' @export
|
||||
theme_bar <- function(
|
||||
flip = TRUE,
|
||||
add_text = FALSE,
|
||||
axis_text_x_angle = 0,
|
||||
axis_text_x_vjust = 0.5,
|
||||
axis_text_x_hjust = 0.5) {
|
||||
# If add_text is TRUE, flip is FALSE
|
||||
if (!flip && !add_text) {
|
||||
par_axis_text_font_face <- "plain"
|
||||
par_axis_x <- TRUE
|
||||
par_axis_y <- TRUE
|
||||
par_axis_line_y <- FALSE
|
||||
par_axis_ticks_y <- TRUE
|
||||
par_axis_text_y <- TRUE
|
||||
par_axis_line_x <- TRUE
|
||||
par_axis_ticks_x <- TRUE
|
||||
par_axis_text_x <- TRUE
|
||||
par_grid_major_y <- TRUE
|
||||
par_grid_major_x <- FALSE
|
||||
par_grid_minor_y <- TRUE
|
||||
par_grid_minor_x <- FALSE
|
||||
} else if (flip && !add_text) {
|
||||
par_axis_text_font_face <- "plain"
|
||||
par_axis_x <- TRUE
|
||||
par_axis_y <- TRUE
|
||||
par_axis_line_y <- TRUE
|
||||
par_axis_ticks_y <- TRUE
|
||||
par_axis_text_y <- TRUE
|
||||
par_axis_line_x <- FALSE
|
||||
par_axis_ticks_x <- TRUE
|
||||
par_axis_text_x <- TRUE
|
||||
par_grid_major_y <- FALSE
|
||||
par_grid_major_x <- TRUE
|
||||
par_grid_minor_y <- FALSE
|
||||
par_grid_minor_x <- TRUE
|
||||
} else if (!flip && add_text) {
|
||||
par_axis_text_font_face <- "bold"
|
||||
par_axis_x <- TRUE
|
||||
par_axis_y <- TRUE
|
||||
par_axis_line_y <- FALSE
|
||||
par_axis_ticks_y <- FALSE
|
||||
par_axis_text_y <- FALSE
|
||||
par_axis_line_x <- FALSE
|
||||
par_axis_ticks_x <- TRUE
|
||||
par_axis_text_x <- TRUE
|
||||
par_grid_major_y <- FALSE
|
||||
par_grid_major_x <- FALSE
|
||||
par_grid_minor_y <- FALSE
|
||||
par_grid_minor_x <- FALSE
|
||||
} else if (flip && add_text) {
|
||||
par_axis_text_font_face <- "bold"
|
||||
par_axis_x <- TRUE
|
||||
par_axis_y <- TRUE
|
||||
par_axis_line_y <- FALSE
|
||||
par_axis_ticks_y <- TRUE
|
||||
par_axis_text_y <- TRUE
|
||||
par_axis_line_x <- FALSE
|
||||
par_axis_ticks_x <- FALSE
|
||||
par_axis_text_x <- FALSE
|
||||
par_grid_major_y <- FALSE
|
||||
par_grid_major_x <- FALSE
|
||||
par_grid_minor_y <- FALSE
|
||||
par_grid_minor_x <- FALSE
|
||||
}
|
||||
|
||||
# Theme
|
||||
t <- theme_default(
|
||||
axis_text_font_face = par_axis_text_font_face,
|
||||
axis_x = par_axis_x,
|
||||
axis_y = par_axis_y,
|
||||
grid_major_y = par_grid_major_y,
|
||||
grid_major_x = par_grid_major_x,
|
||||
grid_minor_y = par_grid_minor_y,
|
||||
grid_minor_x = par_grid_minor_x,
|
||||
axis_text_y = par_axis_text_y,
|
||||
axis_line_y = par_axis_line_y,
|
||||
axis_ticks_y = par_axis_ticks_y,
|
||||
axis_text_x = par_axis_text_x,
|
||||
axis_line_x = par_axis_line_x,
|
||||
axis_ticks_x = par_axis_ticks_x,
|
||||
axis_text_x_angle = axis_text_x_angle,
|
||||
axis_text_x_vjust = axis_text_x_vjust,
|
||||
axis_text_x_hjust = axis_text_x_hjust
|
||||
)
|
||||
|
||||
return(t)
|
||||
}
|
||||
399
R/theme_default.R
Normal file
399
R/theme_default.R
Normal file
|
|
@ -0,0 +1,399 @@
|
|||
#' ggplot2 theme wrapper with fonts and colors
|
||||
#'
|
||||
#' @param title_size The size of the title. Defaults to 12.
|
||||
#' @param title_color Title color.
|
||||
#' @param title_font_face Title font face. Default to "bold". Font face ("plain", "italic", "bold", "bold.italic").
|
||||
#' @param title_hjust Title horizontal justification. Default to NULL. Use 0.5 to center the title.
|
||||
#' @param title_font_family Title font family. Default to "Carlito".
|
||||
#' @param title_position_to_plot TRUE or FALSE. Positioning to plot or to panel?
|
||||
#' @param subtitle_font_family Subtitle font family. Default to "Carlito".
|
||||
#' @param subtitle_size The size of the subtitle. Defaults to 10.
|
||||
#' @param subtitle_color Subtitle color.
|
||||
#' @param subtitle_font_face Subtitle font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||
#' @param subtitle_hjust Subtitle horizontal justification. Default to NULL. Use 0.5 to center the subtitle.
|
||||
#' @param text_font_family Text font family. Default to "Carlito".
|
||||
#' @param text_size The size of all text other than the title, subtitle and caption. Defaults to 10.
|
||||
#' @param text_color Text color.
|
||||
#' @param text_font_face Text font face. Default to "bold". Font face ("plain", "italic", "bold", "bold.italic").
|
||||
#' @param panel_background_color The color for the panel background color. Default to white.
|
||||
#' @param panel_border Boolean. Plot a panel border? Default to FALSE.
|
||||
#' @param panel_border_color A color. Default to REACH main grey.
|
||||
#' @param legend_position Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".
|
||||
#' @param legend_direction Direction of the legend. Default to "vertical". Can take "vertical" or "horizontal".
|
||||
#' @param legend_justification In addition to legend_direction, place the legend. Can take "left", "bottom", "center", "right", "top".
|
||||
#' @param legend_title_size Legend title size.
|
||||
#' @param legend_title_color Legend title color.
|
||||
#' @param legend_title_font_face Legend title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||
#' @param legend_title_font_family Legend title font family. Default to "Carlito".
|
||||
#' @param legend_text_size Legend text size.
|
||||
#' @param legend_text_color Legend text color.
|
||||
#' @param legend_text_font_face Legend text font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||
#' @param legend_text_font_family Legend text font family. Default to "Carlito".
|
||||
#'
|
||||
#' @param legend_reverse Reverse the color in the guide? Default to TRUE.
|
||||
#' @param facet_size Facet font size.
|
||||
#' @param facet_color Facet font color.
|
||||
#' @param facet_font_face Facet font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||
#' @param facet_font_family Facet font family. Default to "Carlito".
|
||||
#' @param facet_bg_color Facet background color.
|
||||
#' @param axis_x Boolean. Do you need x-axis?
|
||||
#' @param axis_y Boolean. Do you need y-axis?
|
||||
#' @param axis_text_font_family Axis text font family. Default to "Carlito".
|
||||
#' @param axis_text_size Axis text size.
|
||||
#' @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").
|
||||
#' @param axis_text_x Boolean. Do you need the text for the x-axis?
|
||||
#' @param axis_line_x Boolean. Do you need the line for the x-axis?
|
||||
#' @param axis_ticks_x Boolean. Do you need the line for the x-axis?
|
||||
#' @param axis_text_x_angle Angle for the x-axis text.
|
||||
#' @param axis_text_x_vjust Vertical adjustment for the x-axis text.
|
||||
#' @param axis_text_x_hjust Vertical adjustment for the x-axis text.
|
||||
#' @param axis_text_y Boolean. Do you need the text for the y-axis?
|
||||
#' @param axis_line_y Boolean. Do you need the line for the y-axis?
|
||||
#' @param axis_ticks_y Boolean. Do you need the line for the y-axis?
|
||||
#' @param axis_title_size Axis title size.
|
||||
#' @param axis_title_color Axis title color.
|
||||
#' @param axis_title_font_face Axis title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||
#' @param grid_major_x Boolean. Do you need major grid lines for x-axis?
|
||||
#' @param grid_major_y Boolean. Do you need major grid lines for y-axis?
|
||||
#' @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.
|
||||
#' @param grid_minor_y_size Minor Y line size.
|
||||
#' @param grid_minor_color Minor grid lines color.
|
||||
#' @param caption_font_family Caption font family. Default to "Carlito".
|
||||
#' @param caption_font_face Caption font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").
|
||||
#' @param caption_position_to_plot TRUE or FALSE. Positioning to plot or to panel?
|
||||
#' @param caption_size The size of the caption. Defaults to 10.
|
||||
#' @param caption_color Caption color.
|
||||
#' @param ... Additional arguments passed to [ggplot2::theme()].
|
||||
#'
|
||||
#'
|
||||
#' @description Give some reach colors and fonts to a ggplot.
|
||||
#'
|
||||
#' @export
|
||||
theme_default <- function(
|
||||
title_font_family = "Carlito",
|
||||
title_size = 20,
|
||||
title_color = color("dark_grey"),
|
||||
title_font_face = "bold",
|
||||
title_hjust = NULL,
|
||||
title_position_to_plot = TRUE,
|
||||
subtitle_font_family = "Carlito",
|
||||
subtitle_size = 16,
|
||||
subtitle_color = color("dark_grey"),
|
||||
subtitle_font_face = "plain",
|
||||
subtitle_hjust = NULL,
|
||||
text_font_family = "Carlito",
|
||||
text_size = 14,
|
||||
text_color = color("dark_grey"),
|
||||
text_font_face = "plain",
|
||||
panel_background_color = "#FFFFFF",
|
||||
panel_border = FALSE,
|
||||
panel_border_color = color("dark_grey"),
|
||||
legend_position = "top",
|
||||
legend_direction = "horizontal",
|
||||
legend_justification = "center",
|
||||
legend_reverse = TRUE,
|
||||
legend_title_size = 14,
|
||||
legend_title_color = color("dark_grey"),
|
||||
legend_title_font_face = "plain",
|
||||
legend_title_font_family = "Carlito",
|
||||
legend_text_size = 14,
|
||||
legend_text_color = color("dark_grey"),
|
||||
legend_text_font_face = "plain",
|
||||
legend_text_font_family = "Carlito",
|
||||
facet_size = 15,
|
||||
facet_color = color("dark_grey"),
|
||||
facet_font_face = "bold",
|
||||
facet_font_family = "Carlito",
|
||||
facet_bg_color = color("lighter_grey"),
|
||||
axis_x = TRUE,
|
||||
axis_y = TRUE,
|
||||
axis_text_x = TRUE,
|
||||
axis_line_x = FALSE,
|
||||
axis_ticks_x = FALSE,
|
||||
axis_text_y = TRUE,
|
||||
axis_line_y = TRUE,
|
||||
axis_ticks_y = TRUE,
|
||||
axis_text_font_family = "Carlito",
|
||||
axis_text_size = 14,
|
||||
axis_text_color = color("dark_grey"),
|
||||
axis_text_font_face = "plain",
|
||||
axis_title_size = 15,
|
||||
axis_title_color = color("dark_grey"),
|
||||
axis_title_font_face = "plain",
|
||||
axis_text_x_angle = 0,
|
||||
axis_text_x_vjust = 0.5,
|
||||
axis_text_x_hjust = 0.5,
|
||||
grid_major_x = TRUE,
|
||||
grid_major_y = FALSE,
|
||||
grid_major_color = color("dark_grey"),
|
||||
grid_major_x_size = 0.1,
|
||||
grid_major_y_size = 0.1,
|
||||
grid_minor_x = TRUE,
|
||||
grid_minor_y = FALSE,
|
||||
grid_minor_color = color("dark_grey"),
|
||||
grid_minor_x_size = 0.05,
|
||||
grid_minor_y_size = 0.05,
|
||||
caption_font_family = "Carlito",
|
||||
caption_font_face = "plain",
|
||||
caption_position_to_plot = TRUE,
|
||||
caption_size = 12,
|
||||
caption_color = color("dark_grey"),
|
||||
...) {
|
||||
# Basic simple theme
|
||||
theme <- ggplot2::theme_minimal()
|
||||
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
# # Text - design
|
||||
text = ggplot2::element_text(
|
||||
family = text_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,
|
||||
# Text sizes
|
||||
axis.text = ggplot2::element_text(
|
||||
size = axis_text_size,
|
||||
family = axis_text_font_family,
|
||||
face = axis_text_font_face,
|
||||
color = axis_text_color
|
||||
),
|
||||
axis.title = ggplot2::element_text(
|
||||
size = axis_title_size,
|
||||
family = axis_text_font_family,
|
||||
face = axis_title_font_face,
|
||||
color = axis_title_color
|
||||
),
|
||||
# # Wrap title
|
||||
plot.title = ggtext::element_textbox_simple(
|
||||
hjust = title_hjust,
|
||||
family = title_font_family,
|
||||
color = title_color,
|
||||
size = title_size,
|
||||
face = title_font_face,
|
||||
width = grid::unit(0.9, "npc"),
|
||||
margin = ggplot2::margin(b = 10)
|
||||
),
|
||||
plot.subtitle = ggtext::element_textbox_simple(
|
||||
hjust = title_hjust,
|
||||
family = subtitle_font_family,
|
||||
color = subtitle_color,
|
||||
size = subtitle_size,
|
||||
face = subtitle_font_face,
|
||||
margin = ggplot2::margin(t = 5, b = 10)
|
||||
),
|
||||
plot.caption = ggtext::element_textbox_simple(
|
||||
size = caption_size,
|
||||
face = caption_font_face,
|
||||
family = caption_font_family,
|
||||
color = caption_color,
|
||||
margin = ggplot2::margin(t = 10)
|
||||
),
|
||||
legend.title = ggplot2::element_text(
|
||||
size = legend_title_size,
|
||||
face = legend_title_font_face,
|
||||
family = legend_title_font_family,
|
||||
color = legend_title_color
|
||||
),
|
||||
legend.text = ggplot2::element_text(
|
||||
size = legend_text_size,
|
||||
face = legend_text_font_face,
|
||||
family = legend_text_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 <- theme +
|
||||
ggplot2::theme(
|
||||
plot.title.position = "plot"
|
||||
)
|
||||
}
|
||||
|
||||
if (caption_position_to_plot) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
plot.caption.position = "plot"
|
||||
)
|
||||
}
|
||||
# Position of caption
|
||||
|
||||
# Axis lines ?
|
||||
if (axis_x & axis_y) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.line = ggplot2::element_line(color = text_color)
|
||||
)
|
||||
}
|
||||
|
||||
if (!axis_x) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.line.x = ggplot2::element_blank(),
|
||||
axis.ticks.x = ggplot2::element_blank(),
|
||||
axis.text.x = ggplot2::element_blank()
|
||||
)
|
||||
}
|
||||
|
||||
if (!axis_y) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.line.y = ggplot2::element_blank(),
|
||||
axis.ticks.y = ggplot2::element_blank(),
|
||||
axis.text.y = ggplot2::element_blank()
|
||||
)
|
||||
}
|
||||
|
||||
if (!axis_line_x) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.line.x = ggplot2::element_blank()
|
||||
)
|
||||
}
|
||||
|
||||
if (!axis_ticks_x) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.ticks.x = ggplot2::element_blank()
|
||||
)
|
||||
}
|
||||
|
||||
if (!axis_text_x) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.text.x = ggplot2::element_blank()
|
||||
)
|
||||
}
|
||||
|
||||
if (!axis_line_y) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.line.y = ggplot2::element_blank()
|
||||
)
|
||||
}
|
||||
|
||||
if (!axis_ticks_y) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.ticks.y = ggplot2::element_blank()
|
||||
)
|
||||
}
|
||||
|
||||
if (!axis_text_y) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
axis.text.y = ggplot2::element_blank()
|
||||
)
|
||||
}
|
||||
|
||||
# X - major grid lines
|
||||
if (!grid_major_x) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
panel.grid.major.x = ggplot2::element_blank()
|
||||
)
|
||||
} else {
|
||||
theme <- theme +
|
||||
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 <- theme +
|
||||
ggplot2::theme(
|
||||
panel.grid.major.y = ggplot2::element_blank()
|
||||
)
|
||||
} else {
|
||||
theme <- theme +
|
||||
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 <- theme +
|
||||
ggplot2::theme(
|
||||
panel.grid.minor.x = ggplot2::element_blank()
|
||||
)
|
||||
} else {
|
||||
theme <- theme +
|
||||
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 <- theme +
|
||||
ggplot2::theme(
|
||||
panel.grid.minor.y = ggplot2::element_blank()
|
||||
)
|
||||
} else {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
panel.grid.minor.y = ggplot2::element_line(
|
||||
color = grid_minor_color,
|
||||
linewidth = grid_minor_y_size
|
||||
)
|
||||
)
|
||||
}
|
||||
if (!panel_border) {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
panel.border = ggplot2::element_blank()
|
||||
)
|
||||
} else {
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
panel.border = ggplot2::element_rect(color = panel_background_color)
|
||||
)
|
||||
}
|
||||
|
||||
# Add facet title text size
|
||||
theme <- theme +
|
||||
ggplot2::theme(
|
||||
strip.text = ggplot2::element_text(
|
||||
size = facet_size,
|
||||
family = facet_font_family,
|
||||
face = facet_font_face,
|
||||
color = facet_color
|
||||
),
|
||||
strip.background = ggplot2::element_rect(
|
||||
fill = facet_bg_color,
|
||||
linewidth = 0
|
||||
)
|
||||
)
|
||||
|
||||
# Other parameters
|
||||
theme <- theme + ggplot2::theme(...)
|
||||
|
||||
return(theme)
|
||||
}
|
||||
10
R/theme_dumbbell.R
Normal file
10
R/theme_dumbbell.R
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#' @title Dumbbell Theme
|
||||
|
||||
#' @description Theme for dumbbell charts based on theme_default.
|
||||
#'
|
||||
#' @rdname theme_default
|
||||
#'
|
||||
#' @export
|
||||
theme_dumbbell <- function() {
|
||||
theme_default()
|
||||
}
|
||||
82
R/theme_lollipop.R
Normal file
82
R/theme_lollipop.R
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
#' Custom Theme for Lollipop Charts
|
||||
#'
|
||||
#' @description
|
||||
#' A custom theme specifically designed for lollipop charts with appropriate grid lines and axis styling
|
||||
#' based on whether the chart is flipped (horizontal) or not.
|
||||
#'
|
||||
#' @param flip Logical indicating whether the lollipop chart is flipped (horizontal). Default is TRUE.
|
||||
#' @param axis_text_x_angle Angle for x-axis text labels. Default is 0.
|
||||
#' @param axis_text_x_vjust Vertical justification for x-axis text labels. Default is 0.5.
|
||||
#' @param axis_text_x_hjust Horizontal justification for x-axis text labels. Default is 0.5.
|
||||
#'
|
||||
#' @return A ggplot2 theme object
|
||||
#'
|
||||
#' @rdname theme_default
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
#' library(ggplot2)
|
||||
#' df <- data.frame(x = letters[1:5], y = c(10, 5, 7, 12, 8))
|
||||
#' ggplot(df, aes(x, y)) +
|
||||
#' geom_point() +
|
||||
#' theme_lollipop()
|
||||
#' }
|
||||
theme_lollipop <- function(
|
||||
flip = TRUE,
|
||||
axis_text_x_angle = 0,
|
||||
axis_text_x_vjust = 0.5,
|
||||
axis_text_x_hjust = 0.5) {
|
||||
# Set parameters based on flip
|
||||
if (!flip) {
|
||||
par_axis_text_font_face <- "plain"
|
||||
par_axis_x <- TRUE
|
||||
par_axis_y <- TRUE
|
||||
par_axis_line_y <- FALSE
|
||||
par_axis_ticks_y <- TRUE
|
||||
par_axis_text_y <- TRUE
|
||||
par_axis_line_x <- TRUE
|
||||
par_axis_ticks_x <- TRUE
|
||||
par_axis_text_x <- TRUE
|
||||
par_grid_major_y <- TRUE
|
||||
par_grid_major_x <- FALSE
|
||||
par_grid_minor_y <- TRUE
|
||||
par_grid_minor_x <- FALSE
|
||||
} else if (flip) {
|
||||
par_axis_text_font_face <- "plain"
|
||||
par_axis_x <- TRUE
|
||||
par_axis_y <- TRUE
|
||||
par_axis_line_y <- TRUE
|
||||
par_axis_ticks_y <- TRUE
|
||||
par_axis_text_y <- TRUE
|
||||
par_axis_line_x <- FALSE
|
||||
par_axis_ticks_x <- TRUE
|
||||
par_axis_text_x <- TRUE
|
||||
par_grid_major_y <- FALSE
|
||||
par_grid_major_x <- TRUE
|
||||
par_grid_minor_y <- FALSE
|
||||
par_grid_minor_x <- TRUE
|
||||
}
|
||||
|
||||
# Theme
|
||||
t <- theme_default(
|
||||
axis_text_font_face = par_axis_text_font_face,
|
||||
axis_x = par_axis_x,
|
||||
axis_y = par_axis_y,
|
||||
grid_major_y = par_grid_major_y,
|
||||
grid_major_x = par_grid_major_x,
|
||||
grid_minor_y = par_grid_minor_y,
|
||||
grid_minor_x = par_grid_minor_x,
|
||||
axis_text_y = par_axis_text_y,
|
||||
axis_line_y = par_axis_line_y,
|
||||
axis_ticks_y = par_axis_ticks_y,
|
||||
axis_text_x = par_axis_text_x,
|
||||
axis_line_x = par_axis_line_x,
|
||||
axis_ticks_x = par_axis_ticks_x,
|
||||
axis_text_x_angle = axis_text_x_angle,
|
||||
axis_text_x_vjust = axis_text_x_vjust,
|
||||
axis_text_x_hjust = axis_text_x_hjust
|
||||
)
|
||||
|
||||
return(t)
|
||||
}
|
||||
31
R/theme_point.R
Normal file
31
R/theme_point.R
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#' Custom Theme for Point Charts
|
||||
#'
|
||||
#' @param flip Logical. Whether the plot is flipped (horizontal).
|
||||
#' @param axis_text_x_angle Angle for x-axis text.
|
||||
#' @param axis_text_x_vjust Vertical justification for x-axis text.
|
||||
#' @param axis_text_x_hjust Horizontal justification for x-axis text.
|
||||
#'
|
||||
#' @rdname theme_default
|
||||
#'
|
||||
#' @return A custom theme object.
|
||||
#'
|
||||
#' @export
|
||||
theme_point <- function() {
|
||||
t <- theme_default(
|
||||
axis_text_font_face = "plain",
|
||||
axis_x = TRUE,
|
||||
axis_y = TRUE,
|
||||
grid_major_y = TRUE,
|
||||
grid_major_x = TRUE,
|
||||
grid_minor_y = FALSE,
|
||||
grid_minor_x = FALSE,
|
||||
axis_text_x = TRUE,
|
||||
axis_line_x = TRUE,
|
||||
axis_ticks_x = TRUE,
|
||||
axis_text_x_angle = 0,
|
||||
axis_text_x_vjust = 0.5,
|
||||
axis_text_x_hjust = 0
|
||||
)
|
||||
|
||||
return(t)
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
#' @title ggplot2 theme with REACH color palettes
|
||||
#'
|
||||
#' @param palette Palette name from 'pal_reach()'.
|
||||
#' @param discrete Boolean indicating whether color aesthetic is discrete or not.
|
||||
#' @param reverse Boolean indicating whether the palette should be reversed.
|
||||
#' @param family The font family for all plot's texts. Default to "Leelawadee".
|
||||
#' @param text_size The size of all text other than the title, subtitle and caption. Defaults to 10.
|
||||
#' @param title_size The size of the title text_family. Defaults to 14.
|
||||
#' @param plot_background_pal The color for the plot background color. Default to white.
|
||||
#' @param panel_background_pal The color for the panel background color. Default to white.
|
||||
#' @param legend_position Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".
|
||||
#' @param legend_direction Direction of the legend. Default to "vertical". Can take "vertical" or "horizontal".
|
||||
#' @param legend_reverse Reverse the color in the guide? Default to TRUE.
|
||||
#' @param ... Additional arguments passed to `ggblanket::gg_theme()`.
|
||||
#'
|
||||
#'
|
||||
#' @description Give some reach colors and fonts to a ggplot.
|
||||
#'
|
||||
#' @return The base REACH theme
|
||||
#'
|
||||
#' @export
|
||||
theme_reach <- function(
|
||||
palette = "main",
|
||||
discrete = TRUE,
|
||||
reverse = FALSE,
|
||||
family = "Leelawadee",
|
||||
text_size = 10,
|
||||
title_size = 14,
|
||||
plot_background_pal = "#FFFFFF",
|
||||
panel_background_pal = "#FFFFFF",
|
||||
legend_position = "right",
|
||||
legend_direction = "vertical",
|
||||
legend_reverse = TRUE,
|
||||
...
|
||||
) {
|
||||
|
||||
# Basic simple theme
|
||||
theme_reach <- ggblanket::gg_theme(
|
||||
text_family = family,
|
||||
text_size = text_size,
|
||||
title_size = title_size,
|
||||
plot_background_pal = plot_background_pal,
|
||||
panel_background_pal = panel_background_pal)
|
||||
|
||||
|
||||
# Default legend to right position
|
||||
theme_reach <- theme_reach +
|
||||
ggplot2::theme(legend.position = legend_position)
|
||||
|
||||
# Defaut legend to vertical direction
|
||||
theme_reach <- theme_reach +
|
||||
ggplot2::theme(legend.direction = legend_direction)
|
||||
|
||||
# Add reach color palettes by default
|
||||
# (reversed guide is defaulted to TRUE for natural reading)
|
||||
theme_reach <- list(
|
||||
theme_reach,
|
||||
scale_color(palette = palette, discrete = discrete, reverse = reverse, reverse_guide = legend_reverse),
|
||||
scale_fill(palette = palette, discrete = discrete, reverse = reverse, reverse_guide = legend_reverse)
|
||||
)
|
||||
|
||||
|
||||
return(theme_reach)
|
||||
|
||||
}
|
||||
6
R/visualizeR-package.R
Normal file
6
R/visualizeR-package.R
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#' @keywords internal
|
||||
"_PACKAGE"
|
||||
|
||||
## usethis namespace: start
|
||||
## usethis namespace: end
|
||||
NULL
|
||||
292
README.Rmd
292
README.Rmd
|
|
@ -11,23 +11,29 @@ knitr::opts_chunk$set(
|
|||
fig.path = "man/figures/README-",
|
||||
out.width = "100%",
|
||||
warning = FALSE,
|
||||
message = FALSE
|
||||
message = FALSE,
|
||||
dpi = 300,
|
||||
dev.args = list(type = "cairo")
|
||||
)
|
||||
|
||||
desc = read.dcf('DESCRIPTION')
|
||||
desc = setNames(as.list(desc), colnames(desc))
|
||||
desc <- read.dcf("DESCRIPTION")
|
||||
desc <- setNames(as.list(desc), colnames(desc))
|
||||
```
|
||||
|
||||
# `r desc$Package` <img src="man/figures/logo.png" align="right" alt="" width="120"/>
|
||||
# `r desc$Package` <img src="man/figures/logo.png" align="right" width="120"/>
|
||||
|
||||
<!-- badges: start -->
|
||||
[](https://github.com/gnoblet/visualizeR/actions/workflows/R-CMD-check.yml)
|
||||
[](https://app.codecov.io/gh/gnoblet/visualizeR?branch=main)
|
||||
<!-- badges: end -->
|
||||
|
||||
> `r desc$Title`
|
||||
|
||||
`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).
|
||||
`visualizeR` proposes some utils to sane colors, ready-to-go color palettes, and a few visualization functions. The package is thoroughly tested with comprehensive code coverage.
|
||||
|
||||
## Installation
|
||||
|
||||
You can install the last version of visualizeR from
|
||||
[GitHub](https://github.com/) with:
|
||||
You can install the last version of visualizeR from [GitHub](https://github.com/) with:
|
||||
|
||||
```{r, eval = FALSE}
|
||||
# install.packages("devtools")
|
||||
|
|
@ -38,110 +44,246 @@ devtools::install_github("gnoblet/visualizeR", build_vignettes = TRUE)
|
|||
|
||||
Roadmap is as follows:
|
||||
|
||||
- [X] Add IMPACT's colors
|
||||
- [X] Add all color palettes from the internal documentation
|
||||
- [ ] There remains to be added more-than-7-color palettes and black color palettes
|
||||
- [ ] Add new types of visualization (e.g. dumbbell plot)
|
||||
- [ ] Use examples
|
||||
- [ ] Add some ease-map functions
|
||||
- [ ] Add some interactive functions (maps and graphs)
|
||||
- [ ] Full revamp of core functions (colors, pattern, incl. adding test and pre-commit structures)
|
||||
- [x] Add test coverage reporting via codecov
|
||||
- [ ] Maintain >80% test coverage across all functions
|
||||
- [ ] Add other types of plots:
|
||||
- [ ] Dumbell
|
||||
- [ ] Waffle
|
||||
- [ ] Donut
|
||||
- [ ] Alluvial
|
||||
- [ ] Option for tag with css code + for titles/subtitles/captions
|
||||
|
||||
## Request
|
||||
|
||||
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).
|
||||
Please, do not hesitate to pull request any new viz or colors or color palettes, or to email request any change ([gnoblet\@zaclys.net](mailto:gnoblet@zaclys.net){.email}).
|
||||
|
||||
## Colors
|
||||
## Code Coverage
|
||||
|
||||
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.
|
||||
`visualizeR` uses [codecov](https://codecov.io/) for test coverage reporting. You can see the current coverage status by clicking on the codecov badge at the top of this README. We aim to maintain high test coverage to ensure code reliability and stability.
|
||||
|
||||
## Colors
|
||||
|
||||
Functions to access colors and palettes are `color()` or `palette()`. Feel free to pull request new colors.
|
||||
|
||||
```{r example-colors, eval = TRUE}
|
||||
library(visualizeR)
|
||||
|
||||
# Get all saved REACH colors, named
|
||||
cols_reach(unnamed = F)[1:10]
|
||||
# Get all saved colors, named
|
||||
color(unname = F)[1:10]
|
||||
|
||||
# Extract a color palette as hexadecimal codes and reversed
|
||||
pal_reach(palette = "main", reversed = TRUE, color_ramp_palette = FALSE)
|
||||
palette(palette = "cat_5_main", reversed = TRUE, color_ramp_palette = FALSE)
|
||||
|
||||
# Get all color palettes names
|
||||
pal_reach(show_palettes = T)
|
||||
palette(show_palettes = TRUE)
|
||||
```
|
||||
|
||||
## Charts
|
||||
|
||||
### Example 1: Bar chart, already REACH themed
|
||||
### Example 1: Bar chart
|
||||
|
||||
```{r example-bar-chart, eval = TRUE}
|
||||
library(visualizeR)
|
||||
```{r example-bar-chart, out.width = '65%', eval = TRUE}
|
||||
library(palmerpenguins)
|
||||
library(dplyr)
|
||||
|
||||
df <- penguins |>
|
||||
group_by(island, species) |>
|
||||
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)) |>
|
||||
mean_fl = mean(flipper_length_mm, na.rm = T)
|
||||
) |>
|
||||
ungroup()
|
||||
|
||||
# Simple bar chart by group
|
||||
bar_reach(df, mean_bl, island, species, percent = FALSE, x_title = "Mean of bill length")
|
||||
df_island <- penguins |>
|
||||
group_by(island) |>
|
||||
summarize(
|
||||
mean_bl = mean(bill_length_mm, na.rm = T),
|
||||
mean_fl = mean(flipper_length_mm, na.rm = T)
|
||||
) |>
|
||||
ungroup()
|
||||
|
||||
# Using another color palette
|
||||
bar_reach(df, mean_bl, island, species, percent = FALSE, palette = "artichoke_3", legend_rev = TRUE)
|
||||
# Simple bar chart by group with some alpha transparency
|
||||
bar(df, "island", "mean_bl", "species", x_title = "Mean of bill length", title = "Mean of bill length by island and species")
|
||||
|
||||
# Flipped / Horizontal
|
||||
hbar(df, "island", "mean_bl", "species", x_title = "Mean of bill length", title = "Mean of bill length by island and species")
|
||||
|
||||
# Facetted
|
||||
bar(df, "island", "mean_bl", facet = "species", x_title = "Mean of bill length", title = "Mean of bill length by island and species", add_color_guide = FALSE)
|
||||
|
||||
# Flipped, with text, smaller width, and caption
|
||||
hbar(df = df_island, x = "island", y = "mean_bl", title = "Mean of bill length by island", add_text = T, width = 0.6, add_text_suffix = "mm", add_text_expand_limit = 1.3, add_color_guide = FALSE, caption = "Data: palmerpenguins package.")
|
||||
```
|
||||
|
||||
### Example 2: Point chart, already REACH themed
|
||||
### Example 2: Scatterplot
|
||||
|
||||
At this stage, `point_reach()` only supports categorical grouping colors with the `group` arg.
|
||||
```{r example-point-chart, out.width = '65%', eval = TRUE}
|
||||
# Simple scatterplot
|
||||
point(penguins, "bill_length_mm", "flipper_length_mm")
|
||||
|
||||
```{r example-point-chart, eval = TRUE}
|
||||
# Scatterplot with grouping colors, greater dot size, some transparency
|
||||
point(penguins, "bill_length_mm", "flipper_length_mm", "island", group_title = "Island", alpha = 0.6, size = 3, title = "Bill vs. flipper length", , add_color_guide = FALSE)
|
||||
|
||||
# Simple point chart
|
||||
point_reach(penguins, bill_length_mm, flipper_length_mm)
|
||||
|
||||
# Point chart with grouping colors, greater dot size, some transparency, reversed color palette
|
||||
point_reach(penguins, bill_length_mm, flipper_length_mm, island, alpha = 0.6, size = 3, reverse = TRUE)
|
||||
|
||||
# Using another color palettes
|
||||
point_reach(penguins, bill_length_mm, flipper_length_mm, island, palette = "artichoke_3")
|
||||
# Facetted scatterplot by island
|
||||
point(penguins, "bill_length_mm", "flipper_length_mm", "species", "island", "fixed", group_title = "Species", title = "Bill vs. flipper length by species and island", add_color_guide = FALSE)
|
||||
```
|
||||
|
||||
## Maps
|
||||
### Example 3: Dumbbell plot
|
||||
|
||||
```{r example-map}
|
||||
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.
|
||||
|
||||
# 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 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))
|
||||
|
||||
|
||||
|
||||
|
||||
# dumbbell(
|
||||
# df,
|
||||
# 'stat',
|
||||
# 'setting',
|
||||
# 'admin1',
|
||||
# title = '% of HHs that reported open defecation as sanitation facility',
|
||||
# group_y_title = 'Admin 1',
|
||||
# group_x_title = 'Setting'
|
||||
# )
|
||||
```
|
||||
|
||||
```{r map-save, eval = TRUE, include = FALSE, echo = TRUE}
|
||||
tmap::tmap_save(map,
|
||||
"man/figures/README-example-map.png",
|
||||
height = 4.5,
|
||||
width = 6
|
||||
)
|
||||
### Example 4: donut chart
|
||||
|
||||
```{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 = color('dark_grey'),
|
||||
# add_text_treshold_display = 5,
|
||||
# x_title = 'Displacement status',
|
||||
# title = '% of HHs by displacement status'
|
||||
# )
|
||||
```
|
||||
|
||||

|
||||
### 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
|
||||
|
||||
```{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"
|
||||
# )
|
||||
```
|
||||
|
||||
### Example 7: Lollipop chart
|
||||
|
||||
```{r example-lollipop-chart, out.width = "65%", warning = FALSE, eval = TRUE}
|
||||
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))
|
||||
|
||||
# Simple vertical lollipop chart
|
||||
lollipop(
|
||||
df = df,
|
||||
x = "admin1",
|
||||
y = "stat",
|
||||
flip = FALSE,
|
||||
dot_size = 3,
|
||||
y_title = "% of HHs",
|
||||
x_title = "Admin 1",
|
||||
title = "% of HHs that received humanitarian assistance"
|
||||
)
|
||||
|
||||
# Horizontal lollipop chart with custom colors
|
||||
hlollipop(
|
||||
df = df,
|
||||
x = "admin1",
|
||||
y = "stat",
|
||||
dot_size = 4,
|
||||
line_size = 1,
|
||||
add_color = color("cat_5_main_2"),
|
||||
line_color = color("cat_5_main_4"),
|
||||
y_title = "% of HHs",
|
||||
x_title = "Admin 1",
|
||||
title = "% of HHs that received humanitarian assistance"
|
||||
)
|
||||
|
||||
# Create data for grouped lollipop - using set.seed for reproducibility
|
||||
set.seed(123)
|
||||
df_grouped <- tibble::tibble(
|
||||
admin1 = rep(c("A", "B", "C", "D", "E", "F"), 2),
|
||||
group = rep(c("Group A", "Group B"), each = 6),
|
||||
stat = c(rnorm(6, mean = 40, sd = 10), rnorm(6, mean = 60, sd = 10))
|
||||
) |>
|
||||
dplyr::mutate(stat = round(stat, 0))
|
||||
|
||||
# Grouped lollipop chart with proper side-by-side positioning
|
||||
lollipop(
|
||||
df = df_grouped,
|
||||
x = "admin1",
|
||||
y = "stat",
|
||||
group = "group",
|
||||
order = "grouped_y",
|
||||
dot_size = 3.5,
|
||||
line_size = 0.8,
|
||||
y_title = "Value",
|
||||
x_title = "Category",
|
||||
title = "True side-by-side grouped lollipop chart"
|
||||
)
|
||||
|
||||
# Horizontal grouped lollipop chart
|
||||
hlollipop(
|
||||
df = df_grouped,
|
||||
x = "admin1",
|
||||
y = "stat",
|
||||
group = "group",
|
||||
dot_size = 3.5,
|
||||
line_size = 0.8,
|
||||
y_title = "Category",
|
||||
x_title = "Value",
|
||||
title = "Horizontal side-by-side grouped lollipop chart"
|
||||
)
|
||||
```
|
||||
|
|
|
|||
356
README.md
356
README.md
|
|
@ -1,13 +1,20 @@
|
|||
|
||||
<!-- README.md is generated from README.Rmd. Please edit that file -->
|
||||
|
||||
# visualizeR <img src="man/figures/logo.png" align="right" alt="" width="120"/>
|
||||
# visualizeR <img src="man/figures/logo.png" align="right" width="120"/>
|
||||
|
||||
<!-- badges: start -->
|
||||
|
||||
[](https://github.com/gnoblet/visualizeR/actions/workflows/R-CMD-check.yml)
|
||||
[](https://app.codecov.io/gh/gnoblet/visualizeR?branch=main)
|
||||
<!-- badges: end -->
|
||||
|
||||
> What a color! What a viz!
|
||||
|
||||
`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).
|
||||
`visualizeR` proposes some utils to sane colors, ready-to-go color
|
||||
palettes, and a few visualization functions. The package is thoroughly
|
||||
tested with comprehensive code coverage.
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
@ -23,144 +30,313 @@ devtools::install_github("gnoblet/visualizeR", build_vignettes = TRUE)
|
|||
|
||||
Roadmap is as follows:
|
||||
|
||||
- [x] Add IMPACT’s colors
|
||||
- [x] Add all color palettes from the internal documentation
|
||||
- [ ] There remains to be added more-than-7-color palettes and black
|
||||
color palettes
|
||||
- [ ] Add new types of visualization (e.g. dumbbell plot)
|
||||
- [ ] Use examples
|
||||
- [ ] Add some ease-map functions
|
||||
- [ ] Add some interactive functions (maps and graphs)
|
||||
- [ ] Full revamp of core functions (colors, pattern, incl. adding test
|
||||
and pre-commit structures)
|
||||
- [x] Add test coverage reporting via codecov
|
||||
- [ ] Maintain \>80% test coverage across all functions
|
||||
- [ ] Add other types of plots:
|
||||
- [ ] Dumbell
|
||||
- [ ] Waffle
|
||||
- [ ] Donut
|
||||
- [ ] Alluvial
|
||||
- [ ] Option for tag with css code + for titles/subtitles/captions
|
||||
|
||||
## Request
|
||||
|
||||
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>).
|
||||
palettes, or to email request any change (<gnoblet@zaclys.net>).
|
||||
|
||||
## Code Coverage
|
||||
|
||||
`visualizeR` uses [codecov](https://codecov.io/) for test coverage
|
||||
reporting. You can see the current coverage status by clicking on the
|
||||
codecov badge at the top of this README. We aim to maintain high test
|
||||
coverage to ensure code reliability and stability.
|
||||
|
||||
## 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.
|
||||
Functions to access colors and palettes are `color()` or `palette()`.
|
||||
Feel free to pull request new colors.
|
||||
|
||||
``` r
|
||||
library(visualizeR)
|
||||
|
||||
# Get all saved REACH colors, named
|
||||
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"
|
||||
# Get all saved colors, named
|
||||
color(unname = F)[1:10]
|
||||
#> white lighter_grey light_grey dark_grey light_blue_grey
|
||||
#> "#FFFFFF" "#F5F5F5" "#E3E3E3" "#464647" "#B3C6D1"
|
||||
#> grey black cat_2_yellow_1 cat_2_yellow_2 cat_2_light_1
|
||||
#> "#71716F" "#000000" "#ffc20a" "#0c7bdc" "#fefe62"
|
||||
|
||||
# Extract a color palette as hexadecimal codes and reversed
|
||||
pal_reach(palette = "main", reversed = TRUE, color_ramp_palette = FALSE)
|
||||
#> [1] "#58585A" "#EE5859" "#C7C8CA" "#D2CBB8"
|
||||
palette(palette = "cat_5_main", reversed = TRUE, color_ramp_palette = FALSE)
|
||||
#> [1] "#083d77" "#4ecdc4" "#f4c095" "#b47eb3" "#ffd5ff"
|
||||
|
||||
# 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"
|
||||
palette(show_palettes = TRUE)
|
||||
#> [1] "cat_2_yellow" "cat_2_light"
|
||||
#> [3] "cat_2_green" "cat_2_blue"
|
||||
#> [5] "cat_5_main" "cat_5_ibm"
|
||||
#> [7] "cat_3_aquamarine" "cat_3_tol_high_contrast"
|
||||
#> [9] "cat_8_tol_adapted" "cat_3_custom_1"
|
||||
#> [11] "cat_4_custom_1" "cat_5_custom_1"
|
||||
#> [13] "cat_6_custom_1" "div_5_orange_blue"
|
||||
#> [15] "div_5_green_purple"
|
||||
```
|
||||
|
||||
## Charts
|
||||
|
||||
### Example 1: Bar chart, already REACH themed
|
||||
### Example 1: Bar chart
|
||||
|
||||
``` r
|
||||
library(visualizeR)
|
||||
library(palmerpenguins)
|
||||
library(dplyr)
|
||||
|
||||
df <- penguins |>
|
||||
group_by(island, species) |>
|
||||
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)) |>
|
||||
mean_fl = mean(flipper_length_mm, na.rm = T)
|
||||
) |>
|
||||
ungroup()
|
||||
|
||||
# Simple bar chart by group
|
||||
bar_reach(df, mean_bl, island, species, percent = FALSE, x_title = "Mean of bill length")
|
||||
df_island <- penguins |>
|
||||
group_by(island) |>
|
||||
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", x_title = "Mean of bill length", title = "Mean of bill length by island and species")
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-bar-chart-1.png" width="100%" />
|
||||
<img src="man/figures/README-example-bar-chart-1.png" width="65%" />
|
||||
|
||||
``` r
|
||||
|
||||
# Using another color palette
|
||||
bar_reach(df, mean_bl, island, species, percent = FALSE, palette = "artichoke_3", legend_rev = TRUE)
|
||||
# Flipped / Horizontal
|
||||
hbar(df, "island", "mean_bl", "species", x_title = "Mean of bill length", title = "Mean of bill length by island and species")
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-bar-chart-2.png" width="100%" />
|
||||
|
||||
### Example 2: Point chart, already REACH themed
|
||||
|
||||
At this stage, `point_reach()` only supports categorical grouping colors
|
||||
with the `group` arg.
|
||||
<img src="man/figures/README-example-bar-chart-2.png" width="65%" />
|
||||
|
||||
``` r
|
||||
|
||||
# Simple point chart
|
||||
point_reach(penguins, bill_length_mm, flipper_length_mm)
|
||||
# Facetted
|
||||
bar(df, "island", "mean_bl", facet = "species", x_title = "Mean of bill length", title = "Mean of bill length by island and species", add_color_guide = FALSE)
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-point-chart-1.png" width="100%" />
|
||||
<img src="man/figures/README-example-bar-chart-3.png" width="65%" />
|
||||
|
||||
``` r
|
||||
|
||||
# Point chart with grouping colors, greater dot size, some transparency, reversed color palette
|
||||
point_reach(penguins, bill_length_mm, flipper_length_mm, island, alpha = 0.6, size = 3, reverse = TRUE)
|
||||
# Flipped, with text, smaller width, and caption
|
||||
hbar(df = df_island, x = "island", y = "mean_bl", title = "Mean of bill length by island", add_text = T, width = 0.6, add_text_suffix = "mm", add_text_expand_limit = 1.3, add_color_guide = FALSE, caption = "Data: palmerpenguins package.")
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-point-chart-2.png" width="100%" />
|
||||
<img src="man/figures/README-example-bar-chart-4.png" width="65%" />
|
||||
|
||||
### Example 2: Scatterplot
|
||||
|
||||
``` r
|
||||
# Simple scatterplot
|
||||
point(penguins, "bill_length_mm", "flipper_length_mm")
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-point-chart-1.png" width="65%" />
|
||||
|
||||
``` r
|
||||
|
||||
# Using another color palettes
|
||||
point_reach(penguins, bill_length_mm, flipper_length_mm, island, palette = "artichoke_3")
|
||||
# Scatterplot with grouping colors, greater dot size, some transparency
|
||||
point(penguins, "bill_length_mm", "flipper_length_mm", "island", group_title = "Island", alpha = 0.6, size = 3, title = "Bill vs. flipper length", , add_color_guide = FALSE)
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-point-chart-3.png" width="100%" />
|
||||
|
||||
## Maps
|
||||
<img src="man/figures/README-example-point-chart-2.png" width="65%" />
|
||||
|
||||
``` 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")
|
||||
# Facetted scatterplot by island
|
||||
point(penguins, "bill_length_mm", "flipper_length_mm", "species", "island", "fixed", group_title = "Species", title = "Bill vs. flipper length by species and island", add_color_guide = FALSE)
|
||||
```
|
||||
|
||||

|
||||
<img src="man/figures/README-example-point-chart-3.png" width="65%" />
|
||||
|
||||
### Example 3: Dumbbell plot
|
||||
|
||||
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))
|
||||
|
||||
|
||||
|
||||
|
||||
# dumbbell(
|
||||
# df,
|
||||
# 'stat',
|
||||
# 'setting',
|
||||
# 'admin1',
|
||||
# title = '% of HHs that reported open defecation as sanitation facility',
|
||||
# group_y_title = 'Admin 1',
|
||||
# group_x_title = 'Setting'
|
||||
# )
|
||||
```
|
||||
|
||||
### Example 4: donut chart
|
||||
|
||||
``` 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 = color('dark_grey'),
|
||||
# add_text_treshold_display = 5,
|
||||
# x_title = 'Displacement status',
|
||||
# title = '% of HHs by displacement status'
|
||||
# )
|
||||
```
|
||||
|
||||
### Example 5: Waffle chart
|
||||
|
||||
``` r
|
||||
#
|
||||
# waffle(df, status, percentage, x_title = 'A caption', title = 'A title', subtitle = 'A subtitle')
|
||||
```
|
||||
|
||||
### Example 6: Alluvial chart
|
||||
|
||||
``` 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"
|
||||
# )
|
||||
```
|
||||
|
||||
### 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))
|
||||
|
||||
# Simple vertical lollipop chart
|
||||
lollipop(
|
||||
df = df,
|
||||
x = "admin1",
|
||||
y = "stat",
|
||||
flip = FALSE,
|
||||
dot_size = 3,
|
||||
y_title = "% of HHs",
|
||||
x_title = "Admin 1",
|
||||
title = "% of HHs that received humanitarian assistance"
|
||||
)
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-lollipop-chart-1.png" width="65%" />
|
||||
|
||||
``` r
|
||||
|
||||
# Horizontal lollipop chart with custom colors
|
||||
hlollipop(
|
||||
df = df,
|
||||
x = "admin1",
|
||||
y = "stat",
|
||||
dot_size = 4,
|
||||
line_size = 1,
|
||||
add_color = color("cat_5_main_2"),
|
||||
line_color = color("cat_5_main_4"),
|
||||
y_title = "% of HHs",
|
||||
x_title = "Admin 1",
|
||||
title = "% of HHs that received humanitarian assistance"
|
||||
)
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-lollipop-chart-2.png" width="65%" />
|
||||
|
||||
``` r
|
||||
|
||||
# Create data for grouped lollipop - using set.seed for reproducibility
|
||||
set.seed(123)
|
||||
df_grouped <- tibble::tibble(
|
||||
admin1 = rep(c("A", "B", "C", "D", "E", "F"), 2),
|
||||
group = rep(c("Group A", "Group B"), each = 6),
|
||||
stat = c(rnorm(6, mean = 40, sd = 10), rnorm(6, mean = 60, sd = 10))
|
||||
) |>
|
||||
dplyr::mutate(stat = round(stat, 0))
|
||||
|
||||
# Grouped lollipop chart with proper side-by-side positioning
|
||||
lollipop(
|
||||
df = df_grouped,
|
||||
x = "admin1",
|
||||
y = "stat",
|
||||
group = "group",
|
||||
order = "grouped_y",
|
||||
dot_size = 3.5,
|
||||
line_size = 0.8,
|
||||
y_title = "Value",
|
||||
x_title = "Category",
|
||||
title = "True side-by-side grouped lollipop chart"
|
||||
)
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-lollipop-chart-3.png" width="65%" />
|
||||
|
||||
``` r
|
||||
|
||||
# Horizontal grouped lollipop chart
|
||||
hlollipop(
|
||||
df = df_grouped,
|
||||
x = "admin1",
|
||||
y = "stat",
|
||||
group = "group",
|
||||
dot_size = 3.5,
|
||||
line_size = 0.8,
|
||||
y_title = "Category",
|
||||
x_title = "Value",
|
||||
title = "Horizontal side-by-side grouped lollipop chart"
|
||||
)
|
||||
```
|
||||
|
||||
<img src="man/figures/README-example-lollipop-chart-4.png" width="65%" />
|
||||
|
|
|
|||
14
codecov.yml
Normal file
14
codecov.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
comment: false
|
||||
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 1%
|
||||
informational: true
|
||||
patch:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 1%
|
||||
informational: true
|
||||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
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]]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
GEOGCS["GCS_unknown",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
#------ 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)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -13,8 +13,8 @@
|
|||
<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">
|
||||
<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.3/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="https://gnoblet.github.io/visualizeR/deps/bootstrap-5.1.3/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 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.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="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">
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.3/bootstrap.min.css" rel="stylesheet"><script src="deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]--></head><body>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
@ -45,7 +45,6 @@
|
|||
</div>
|
||||
|
||||
<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>Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p>
|
||||
<div class="section level2">
|
||||
|
|
@ -64,7 +63,7 @@
|
|||
<div class="section level2">
|
||||
<h2 id="terms-and-conditions">TERMS AND CONDITIONS<a class="anchor" aria-label="anchor" href="#terms-and-conditions"></a></h2>
|
||||
<div class="section level3">
|
||||
<h3 id="id_0-definitions">0. Definitions<a class="anchor" aria-label="anchor" href="#id_0-definitions"></a></h3>
|
||||
<h3 id="0-definitions">0. Definitions<a class="anchor" aria-label="anchor" href="#0-definitions"></a></h3>
|
||||
<p>“This License” refers to version 3 of the GNU General Public License.</p>
|
||||
<p>“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.</p>
|
||||
<p>“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.</p>
|
||||
|
|
@ -75,7 +74,7 @@
|
|||
<p>An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that <strong>(1)</strong> displays an appropriate copyright notice, and <strong>(2)</strong> tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_1-source-code">1. Source Code<a class="anchor" aria-label="anchor" href="#id_1-source-code"></a></h3>
|
||||
<h3 id="1-source-code">1. Source Code<a class="anchor" aria-label="anchor" href="#1-source-code"></a></h3>
|
||||
<p>The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.</p>
|
||||
<p>A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.</p>
|
||||
<p>The “System Libraries” of an executable work include anything, other than the work as a whole, that <strong>(a)</strong> is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and <strong>(b)</strong> serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.</p>
|
||||
|
|
@ -84,23 +83,23 @@
|
|||
<p>The Corresponding Source for a work in source code form is that same work.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_2-basic-permissions">2. Basic Permissions<a class="anchor" aria-label="anchor" href="#id_2-basic-permissions"></a></h3>
|
||||
<h3 id="2-basic-permissions">2. Basic Permissions<a class="anchor" aria-label="anchor" href="#2-basic-permissions"></a></h3>
|
||||
<p>All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.</p>
|
||||
<p>You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.</p>
|
||||
<p>Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_3-protecting-users-legal-rights-from-anti-circumvention-law">3. Protecting Users’ Legal Rights From Anti-Circumvention Law<a class="anchor" aria-label="anchor" href="#id_3-protecting-users-legal-rights-from-anti-circumvention-law"></a></h3>
|
||||
<h3 id="3-protecting-users-legal-rights-from-anti-circumvention-law">3. Protecting Users’ Legal Rights From Anti-Circumvention Law<a class="anchor" aria-label="anchor" href="#3-protecting-users-legal-rights-from-anti-circumvention-law"></a></h3>
|
||||
<p>No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.</p>
|
||||
<p>When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_4-conveying-verbatim-copies">4. Conveying Verbatim Copies<a class="anchor" aria-label="anchor" href="#id_4-conveying-verbatim-copies"></a></h3>
|
||||
<h3 id="4-conveying-verbatim-copies">4. Conveying Verbatim Copies<a class="anchor" aria-label="anchor" href="#4-conveying-verbatim-copies"></a></h3>
|
||||
<p>You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.</p>
|
||||
<p>You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_5-conveying-modified-source-versions">5. Conveying Modified Source Versions<a class="anchor" aria-label="anchor" href="#id_5-conveying-modified-source-versions"></a></h3>
|
||||
<h3 id="5-conveying-modified-source-versions">5. Conveying Modified Source Versions<a class="anchor" aria-label="anchor" href="#5-conveying-modified-source-versions"></a></h3>
|
||||
<p>You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:</p>
|
||||
<ul><li>
|
||||
<strong>a)</strong> The work must carry prominent notices stating that you modified it, and giving a relevant date.</li>
|
||||
|
|
@ -113,7 +112,7 @@
|
|||
</ul><p>A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_6-conveying-non-source-forms">6. Conveying Non-Source Forms<a class="anchor" aria-label="anchor" href="#id_6-conveying-non-source-forms"></a></h3>
|
||||
<h3 id="6-conveying-non-source-forms">6. Conveying Non-Source Forms<a class="anchor" aria-label="anchor" href="#6-conveying-non-source-forms"></a></h3>
|
||||
<p>You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:</p>
|
||||
<ul><li>
|
||||
<strong>a)</strong> Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.</li>
|
||||
|
|
@ -133,7 +132,7 @@
|
|||
<p>Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_7-additional-terms">7. Additional Terms<a class="anchor" aria-label="anchor" href="#id_7-additional-terms"></a></h3>
|
||||
<h3 id="7-additional-terms">7. Additional Terms<a class="anchor" aria-label="anchor" href="#7-additional-terms"></a></h3>
|
||||
<p>“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.</p>
|
||||
<p>When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.</p>
|
||||
<p>Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:</p>
|
||||
|
|
@ -154,24 +153,24 @@
|
|||
<p>Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_8-termination">8. Termination<a class="anchor" aria-label="anchor" href="#id_8-termination"></a></h3>
|
||||
<h3 id="8-termination">8. Termination<a class="anchor" aria-label="anchor" href="#8-termination"></a></h3>
|
||||
<p>You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).</p>
|
||||
<p>However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated <strong>(a)</strong> provisionally, unless and until the copyright holder explicitly and finally terminates your license, and <strong>(b)</strong> permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.</p>
|
||||
<p>Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.</p>
|
||||
<p>Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_9-acceptance-not-required-for-having-copies">9. Acceptance Not Required for Having Copies<a class="anchor" aria-label="anchor" href="#id_9-acceptance-not-required-for-having-copies"></a></h3>
|
||||
<h3 id="9-acceptance-not-required-for-having-copies">9. Acceptance Not Required for Having Copies<a class="anchor" aria-label="anchor" href="#9-acceptance-not-required-for-having-copies"></a></h3>
|
||||
<p>You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_10-automatic-licensing-of-downstream-recipients">10. Automatic Licensing of Downstream Recipients<a class="anchor" aria-label="anchor" href="#id_10-automatic-licensing-of-downstream-recipients"></a></h3>
|
||||
<h3 id="10-automatic-licensing-of-downstream-recipients">10. Automatic Licensing of Downstream Recipients<a class="anchor" aria-label="anchor" href="#10-automatic-licensing-of-downstream-recipients"></a></h3>
|
||||
<p>Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.</p>
|
||||
<p>An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.</p>
|
||||
<p>You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_11-patents">11. Patents<a class="anchor" aria-label="anchor" href="#id_11-patents"></a></h3>
|
||||
<h3 id="11-patents">11. Patents<a class="anchor" aria-label="anchor" href="#11-patents"></a></h3>
|
||||
<p>A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.</p>
|
||||
<p>A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.</p>
|
||||
<p>Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.</p>
|
||||
|
|
@ -182,30 +181,30 @@
|
|||
<p>Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_12-no-surrender-of-others-freedom">12. No Surrender of Others’ Freedom<a class="anchor" aria-label="anchor" href="#id_12-no-surrender-of-others-freedom"></a></h3>
|
||||
<h3 id="12-no-surrender-of-others-freedom">12. No Surrender of Others’ Freedom<a class="anchor" aria-label="anchor" href="#12-no-surrender-of-others-freedom"></a></h3>
|
||||
<p>If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_13-use-with-the-gnu-affero-general-public-license">13. Use with the GNU Affero General Public License<a class="anchor" aria-label="anchor" href="#id_13-use-with-the-gnu-affero-general-public-license"></a></h3>
|
||||
<h3 id="13-use-with-the-gnu-affero-general-public-license">13. Use with the GNU Affero General Public License<a class="anchor" aria-label="anchor" href="#13-use-with-the-gnu-affero-general-public-license"></a></h3>
|
||||
<p>Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_14-revised-versions-of-this-license">14. Revised Versions of this License<a class="anchor" aria-label="anchor" href="#id_14-revised-versions-of-this-license"></a></h3>
|
||||
<h3 id="14-revised-versions-of-this-license">14. Revised Versions of this License<a class="anchor" aria-label="anchor" href="#14-revised-versions-of-this-license"></a></h3>
|
||||
<p>The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.</p>
|
||||
<p>Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.</p>
|
||||
<p>If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.</p>
|
||||
<p>Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_15-disclaimer-of-warranty">15. Disclaimer of Warranty<a class="anchor" aria-label="anchor" href="#id_15-disclaimer-of-warranty"></a></h3>
|
||||
<h3 id="15-disclaimer-of-warranty">15. Disclaimer of Warranty<a class="anchor" aria-label="anchor" href="#15-disclaimer-of-warranty"></a></h3>
|
||||
<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_16-limitation-of-liability">16. Limitation of Liability<a class="anchor" aria-label="anchor" href="#id_16-limitation-of-liability"></a></h3>
|
||||
<h3 id="16-limitation-of-liability">16. Limitation of Liability<a class="anchor" aria-label="anchor" href="#16-limitation-of-liability"></a></h3>
|
||||
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="id_17-interpretation-of-sections-15-and-16">17. Interpretation of Sections 15 and 16<a class="anchor" aria-label="anchor" href="#id_17-interpretation-of-sections-15-and-16"></a></h3>
|
||||
<h3 id="17-interpretation-of-sections-15-and-16">17. Interpretation of Sections 15 and 16<a class="anchor" aria-label="anchor" href="#17-interpretation-of-sections-15-and-16"></a></h3>
|
||||
<p>If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.</p>
|
||||
<p><em>END OF TERMS AND CONDITIONS</em></p>
|
||||
</div>
|
||||
|
|
@ -214,27 +213,27 @@
|
|||
<h2 id="how-to-apply-these-terms-to-your-new-programs">How to Apply These Terms to Your New Programs<a class="anchor" aria-label="anchor" href="#how-to-apply-these-terms-to-your-new-programs"></a></h2>
|
||||
<p>If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.</p>
|
||||
<p>To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="sc"><</span>one line to give the program<span class="st">'s name and a brief idea of what it does.></span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="st">Copyright (C) <year> <name of author></span></span>
|
||||
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="st">This program is free software: you can redistribute it and/or modify</span></span>
|
||||
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="st">it under the terms of the GNU General Public License as published by</span></span>
|
||||
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="st">the Free Software Foundation, either version 3 of the License, or</span></span>
|
||||
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="st">(at your option) any later version.</span></span>
|
||||
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="st">This program is distributed in the hope that it will be useful,</span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a><span class="st">but WITHOUT ANY WARRANTY; without even the implied warranty of</span></span>
|
||||
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a><span class="st">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></span>
|
||||
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="st">GNU General Public License for more details.</span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a><span class="st">You should have received a copy of the GNU General Public License</span></span>
|
||||
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a><span class="st">along with this program. If not, see <http://www.gnu.org/licenses/>.</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="op"><</span>one line to give the program<span class="st">'s name and a brief idea of what it does.></span></span>
|
||||
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="st">Copyright (C) <year> <name of author></span></span>
|
||||
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a></span>
|
||||
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="st">This program is free software: you can redistribute it and/or modify</span></span>
|
||||
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a><span class="st">it under the terms of the GNU General Public License as published by</span></span>
|
||||
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a><span class="st">the Free Software Foundation, either version 3 of the License, or</span></span>
|
||||
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a><span class="st">(at your option) any later version.</span></span>
|
||||
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a></span>
|
||||
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true"></a><span class="st">This program is distributed in the hope that it will be useful,</span></span>
|
||||
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true"></a><span class="st">but WITHOUT ANY WARRANTY; without even the implied warranty of</span></span>
|
||||
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true"></a><span class="st">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></span>
|
||||
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true"></a><span class="st">GNU General Public License for more details.</span></span>
|
||||
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true"></a></span>
|
||||
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true"></a><span class="st">You should have received a copy of the GNU General Public License</span></span>
|
||||
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true"></a><span class="st">along with this program. If not, see <http://www.gnu.org/licenses/>.</span></span></code></pre></div>
|
||||
<p>Also add information on how to contact you by electronic and paper mail.</p>
|
||||
<p>If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="sc"><</span>program<span class="sc">></span> <span class="fu">Copyright</span> (C) <span class="sc"><</span>year<span class="sc">></span> <span class="er"><</span>name of author<span class="sc">></span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>This program comes with ABSOLUTELY NO WARRANTY; <span class="cf">for</span> details type <span class="st">'show w'</span>.</span>
|
||||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>This is free software, and you are welcome to redistribute it</span>
|
||||
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a>under certain conditions; type <span class="st">'show c'</span> <span class="cf">for</span> details.</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="op"><</span>program<span class="op">></span><span class="st"> </span><span class="kw">Copyright</span> (C) <span class="op"><</span>year<span class="op">></span><span class="st"> </span><span class="er"><</span>name of author<span class="op">></span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a>This program comes with ABSOLUTELY NO WARRANTY; <span class="cf">for</span> details type <span class="st">'show w'</span>.</span>
|
||||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true"></a>This is free software, and you are welcome to redistribute it</span>
|
||||
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true"></a>under certain conditions; type <span class="st">'show c'</span> <span class="cf">for</span> details.</span></code></pre></div>
|
||||
<p>The hypothetical commands <code>show w</code> and <code>show c</code> should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.</p>
|
||||
<p>You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <<a href="http://www.gnu.org/licenses/" class="external-link uri">http://www.gnu.org/licenses/</a>>.</p>
|
||||
<p>The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <<a href="http://www.gnu.org/philosophy/why-not-lgpl.html" class="external-link uri">http://www.gnu.org/philosophy/why-not-lgpl.html</a>>.</p>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.3/bootstrap.min.css" rel="stylesheet"><script src="deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]--></head><body>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<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>Guillaume N (2022).
|
||||
<p>Guillaume N (2023).
|
||||
<em>visualizeR: What a color! What a viz!</em>.
|
||||
https://github.com/gnoblet/visualizeR,
|
||||
https://gnoblet.github.io/visualizeR/.
|
||||
|
|
@ -64,7 +64,7 @@ https://gnoblet.github.io/visualizeR/.
|
|||
<pre>@Manual{,
|
||||
title = {visualizeR: What a color! What a viz!},
|
||||
author = {Noblet Guillaume},
|
||||
year = {2022},
|
||||
year = {2023},
|
||||
note = {https://github.com/gnoblet/visualizeR,
|
||||
https://gnoblet.github.io/visualizeR/},
|
||||
}</pre>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
docs/deps/bootstrap-5.1.3/bootstrap.min.css
vendored
1
docs/deps/bootstrap-5.1.3/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
7
docs/deps/bootstrap-5.2.2/bootstrap.bundle.min.js
vendored
Normal file
7
docs/deps/bootstrap-5.2.2/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
docs/deps/bootstrap-5.2.2/bootstrap.bundle.min.js.map
Normal file
1
docs/deps/bootstrap-5.2.2/bootstrap.bundle.min.js.map
Normal file
File diff suppressed because one or more lines are too long
6
docs/deps/bootstrap-5.2.2/bootstrap.min.css
vendored
Normal file
6
docs/deps/bootstrap-5.2.2/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
<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.3/bootstrap.min.css" rel="stylesheet" />
|
||||
<script src="deps/bootstrap-5.1.3/bootstrap.bundle.min.js"></script>
|
||||
<link href="deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet" />
|
||||
<script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script>
|
||||
|
|
|
|||
220
docs/index.html
220
docs/index.html
|
|
@ -14,8 +14,8 @@
|
|||
<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.3/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="deps/bootstrap-5.1.3/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 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="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).">
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
@ -72,9 +72,7 @@
|
|||
<img src="logo.png" class="logo" alt=""><h1 id="visualizer-">visualizeR <a class="anchor" aria-label="anchor" href="#visualizer-"></a>
|
||||
</h1>
|
||||
</div>
|
||||
<blockquote>
|
||||
<p>What a color! What a viz!</p>
|
||||
</blockquote>
|
||||
<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>
|
||||
<div class="section level2">
|
||||
<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
|
||||
|
|
@ -88,21 +86,15 @@
|
|||
<h2 id="roadmap">Roadmap<a class="anchor" aria-label="anchor" href="#roadmap"></a>
|
||||
</h2>
|
||||
<p>Roadmap is as follows:</p>
|
||||
<ul class="task-list">
|
||||
<li>
|
||||
<input type="checkbox" disabled checked>Add IMPACT’s colors</li>
|
||||
<li>
|
||||
<input type="checkbox" disabled checked>Add all color palettes from the internal documentation</li>
|
||||
<li>
|
||||
<input type="checkbox" disabled>There remains to be added more-than-7-color palettes and black color palettes</li>
|
||||
<li>
|
||||
<input type="checkbox" disabled>Add new types of visualization (e.g. dumbbell plot)</li>
|
||||
<li>
|
||||
<input type="checkbox" disabled>Use examples</li>
|
||||
<li>
|
||||
<input type="checkbox" disabled>Add some ease-map functions</li>
|
||||
<li>
|
||||
<input type="checkbox" disabled>Add some interactive functions (maps and graphs)</li>
|
||||
<ul>
|
||||
<li>[X] Add IMPACT’s colors</li>
|
||||
<li>[X] Add all color palettes from the internal documentation</li>
|
||||
<li>[ ] There remains to be added more-than-7-color palettes and black color palettes</li>
|
||||
<li>[X] Add new types of visualization (e.g. dumbbell plot, lollipop plot, etc.)</li>
|
||||
<li>[X] Use examples</li>
|
||||
<li>[ ] Add some ease-map functions</li>
|
||||
<li>[ ] Add some interactive functions (maps and graphs)</li>
|
||||
<li>[ ] Consolidate and make errors transparent</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section level2">
|
||||
|
|
@ -158,40 +150,188 @@
|
|||
<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</span></span>
|
||||
<span><span class="fu"><a href="reference/bar_reach.html">bar_reach</a></span><span class="op">(</span><span class="va">df</span>, <span class="va">mean_bl</span>, <span class="va">island</span>, <span class="va">species</span>, percent <span class="op">=</span> <span class="cn">FALSE</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="100%"></p>
|
||||
<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>
|
||||
<span><span class="co"># Using another color palette</span></span>
|
||||
<span><span class="fu"><a href="reference/bar_reach.html">bar_reach</a></span><span class="op">(</span><span class="va">df</span>, <span class="va">mean_bl</span>, <span class="va">island</span>, <span class="va">species</span>, percent <span class="op">=</span> <span class="cn">FALSE</span>, palette <span class="op">=</span> <span class="st">"artichoke_3"</span>, legend_rev <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
|
||||
<p><img src="reference/figures/README-example-bar-chart-2.png" width="100%"></p>
|
||||
<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>
|
||||
<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><a href="reference/point_reach.html">point_reach()</a></code> only supports categorical grouping colors with the <code>group</code> arg.</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span></span>
|
||||
<span><span class="co"># Simple point chart</span></span>
|
||||
<span><span class="fu"><a href="reference/point_reach.html">point_reach</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="100%"></p>
|
||||
<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>
|
||||
<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_reach.html">point_reach</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>, reverse <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
|
||||
<p><img src="reference/figures/README-example-point-chart-2.png" width="100%"></p>
|
||||
<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>
|
||||
<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>
|
||||
<span><span class="co"># Using another color palettes</span></span>
|
||||
<span><span class="fu"><a href="reference/point_reach.html">point_reach</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>, palette <span class="op">=</span> <span class="st">"artichoke_3"</span><span class="op">)</span></span></code></pre></div>
|
||||
<p><img src="reference/figures/README-example-point-chart-3.png" width="100%"></p>
|
||||
<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>
|
||||
<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-once-not-twice">Example 4: donut chart, REACH themed (to used once, not twice)<a class="anchor" aria-label="anchor" href="#example-4-donut-chart-reach-themed-to-used-once-not-twice"></a>
|
||||
</h3>
|
||||
<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span></span>
|
||||
<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-waffle-chart">Example 5: waffle chart<a class="anchor" aria-label="anchor" href="#example-5-waffle-chart"></a>
|
||||
</h3>
|
||||
<div class="sourceCode" id="cb11"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span><span class="co">#</span></span>
|
||||
<span><span class="fu"><a href="reference/waffle.html">waffle</a></span><span class="op">(</span><span class="va">df</span>, <span class="va">status</span>, <span class="va">percentage</span>, x_title <span class="op">=</span> <span class="st">"A caption"</span>, title <span class="op">=</span> <span class="st">"A title"</span>, subtitle <span class="op">=</span> <span class="st">"A subtitle"</span><span class="op">)</span></span></code></pre></div>
|
||||
<p><img src="reference/figures/README-example-waffle-plot-1.png" width="65%"></p>
|
||||
</div>
|
||||
<div class="section level3">
|
||||
<h3 id="example-6-alluvial-chart-reach-themed">Example 6: alluvial chart, REACH themed<a class="anchor" aria-label="anchor" href="#example-6-alluvial-chart-reach-themed"></a>
|
||||
</h3>
|
||||
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span></span>
|
||||
<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-7-lollipop-chart">Example 7: lollipop chart<a class="anchor" aria-label="anchor" href="#example-7-lollipop-chart"></a>
|
||||
</h3>
|
||||
<div class="sourceCode" id="cb13"><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="cb14"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span></span>
|
||||
<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="cb8"><pre class="downlit sourceCode r">
|
||||
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span></span>
|
||||
<span><span class="co"># Add indicator layer </span></span>
|
||||
<span><span class="co"># - based on "pretty" classes and title "Proportion (%)" </span></span>
|
||||
|
|
@ -218,7 +358,7 @@
|
|||
<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>
|
||||
<img src="reference/figures/README-example-map.png" alt="Once exported with tmap::tmap_save()."><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>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]--></head><body>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
@ -44,21 +44,60 @@
|
|||
<small>Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/NEWS.md" class="external-link"><code>NEWS.md</code></a></small>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
<h2 class="pkg-version" data-toc-text="0.8.9000" id="visualizer-089000">visualizeR 0.8.9000<a class="anchor" aria-label="anchor" href="#visualizer-089000"></a></h2>
|
||||
<ul><li>Add <code><a href="../reference/waffle.html">waffle()</a></code>.</li>
|
||||
<li>Add a <code>pal_default()</code> function as a fallback for scale functions and as an initiative in <code><a href="../reference/theme_reach.html">theme_reach()</a></code>. It uses <code><a href="https://sjmgarnier.github.io/viridisLite/reference/viridis.html" class="external-link">viridis::magma()</a></code>.</li>
|
||||
<li>Update of AGORA palettes.</li>
|
||||
<li>Some other small bug fixes.</li>
|
||||
</ul><hr></div>
|
||||
<div class="section level2">
|
||||
<h2 class="pkg-version" data-toc-text="0.7.9000" id="visualizer-079000">visualizeR 0.7.9000<a class="anchor" aria-label="anchor" href="#visualizer-079000"></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">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 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></div>
|
||||
</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><a href="../reference/bar_reach.html">bar_reach()</a></code> and <code><a href="../reference/point_reach.html">point_reach()</a></code> is added.</li>
|
||||
<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>
|
||||
<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>
|
||||
|
|
@ -66,22 +105,18 @@
|
|||
</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>
|
||||
<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>
|
||||
<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><a href="https://statisticsnz.github.io/simplevis/reference/gg_hbar.html" class="external-link">simplevis::gg_hbar()</a></code> call.</li>
|
||||
</ul><hr></div>
|
||||
<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>
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
pandoc: 2.19.2
|
||||
pandoc: '2.5'
|
||||
pkgdown: 2.0.7
|
||||
pkgdown_sha: ~
|
||||
articles: {}
|
||||
last_built: 2022-12-16T16:19Z
|
||||
last_built: 2023-05-29T09:45Z
|
||||
urls:
|
||||
reference: https://gnoblet.github.io/visualizeR/reference
|
||||
article: https://gnoblet.github.io/visualizeR/articles
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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="`ggblanket` as internals for deciding whether the bar chart is horizontally readable."><title>Simple point chart — point_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.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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 point chart — point_reach"><meta property="og:description" content="`ggblanket` as internals for deciding whether the bar chart is horizontally readable."><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="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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
@ -40,37 +40,34 @@
|
|||
</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 point chart</h1>
|
||||
<small class="dont-index">Source: <a href="https://github.com/gnoblet/visualizeR/blob/HEAD/R/point.R" class="external-link"><code>R/point.R</code></a></small>
|
||||
<div class="d-none name"><code>point_reach.Rd</code></div>
|
||||
<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>`ggblanket` as internals for deciding whether the bar chart is horizontally readable.</p>
|
||||
<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">point_reach</span><span class="op">(</span></span>
|
||||
<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">x</span>,</span>
|
||||
<span> <span class="va">y</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> palette <span class="op">=</span> <span class="st">"main"</span>,</span>
|
||||
<span> reverse <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||
<span> family <span class="op">=</span> <span class="st">"Leelawadee"</span>,</span>
|
||||
<span> alpha <span class="op">=</span> <span class="fl">1</span>,</span>
|
||||
<span> size <span class="op">=</span> <span class="fl">1.5</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> 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> text_size <span class="op">=</span> <span class="fl">10</span>,</span>
|
||||
<span> title_size <span class="op">=</span> <span class="fl">14</span>,</span>
|
||||
<span> legend_position <span class="op">=</span> <span class="st">"right"</span>,</span>
|
||||
<span> <span class="va">...</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>
|
||||
|
||||
|
|
@ -80,48 +77,36 @@
|
|||
<dd><p>A data frame.</p></dd>
|
||||
|
||||
|
||||
<dt>x</dt>
|
||||
<dd><p>A numeric column.</p></dd>
|
||||
<dt>from</dt>
|
||||
<dd><p>A character column of upstream stratum.</p></dd>
|
||||
|
||||
|
||||
<dt>y</dt>
|
||||
<dd><p>A character column or coercible as a character column.</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>Some grouping categorical column, e.g. administrative areas or population groups.</p></dd>
|
||||
|
||||
|
||||
<dt>palette</dt>
|
||||
<dd><p>Palette name from 'pal_reach()'.</p></dd>
|
||||
|
||||
|
||||
<dt>reverse</dt>
|
||||
<dd><p>Boolean indicating whether the palette should be reversed.</p></dd>
|
||||
|
||||
|
||||
<dt>family</dt>
|
||||
<dd><p>The font family for all plot's texts. Default to "Leelawadee".</p></dd>
|
||||
<dd><p>The grouping column to fill the alluvium with.</p></dd>
|
||||
|
||||
|
||||
<dt>alpha</dt>
|
||||
<dd><p>Transparency.</p></dd>
|
||||
<dd><p>Fill transparency. Default to 0.5.</p></dd>
|
||||
|
||||
|
||||
<dt>size</dt>
|
||||
<dd><p>Dot size. Default to 1.5.</p></dd>
|
||||
<dt>from_levels</dt>
|
||||
<dd><p>Order by given from levels?</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>value_title</dt>
|
||||
<dd><p>The value/y scale title. Default to NULL.</p></dd>
|
||||
|
||||
|
||||
<dt>group_title</dt>
|
||||
<dd><p>The group legend title. Default to NULL.</p></dd>
|
||||
<dd><p>The group title. Default to NULL.</p></dd>
|
||||
|
||||
|
||||
<dt>title</dt>
|
||||
|
|
@ -133,30 +118,30 @@
|
|||
|
||||
|
||||
<dt>caption</dt>
|
||||
<dd><p>Caption title string. Default to NULL.</p></dd>
|
||||
<dd><p>Plot caption. Default to NULL.</p></dd>
|
||||
|
||||
|
||||
<dt>text_size</dt>
|
||||
<dd><p>The size of all text other than the title, subtitle and caption. Defaults to 10.</p></dd>
|
||||
<dt>rect_color</dt>
|
||||
<dd><p>Stratum rectangles' fill color.</p></dd>
|
||||
|
||||
|
||||
<dt>title_size</dt>
|
||||
<dd><p>The size of the title text. Defaults to 14.</p></dd>
|
||||
<dt>rect_border_color</dt>
|
||||
<dd><p>Stratum rectangles' border color.</p></dd>
|
||||
|
||||
|
||||
<dt>legend_position</dt>
|
||||
<dd><p>Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".</p></dd>
|
||||
<dt>rect_text_color</dt>
|
||||
<dd><p>Stratum rectangles' text color.</p></dd>
|
||||
|
||||
|
||||
<dt>...</dt>
|
||||
<dd><p>Other arguments to be passed to "ggblanket::gg_col"</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>
|
||||
<p>A donut chart to be used parsimoniously</p>
|
||||
</div>
|
||||
|
||||
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||
176
docs/reference/bar.html
Normal file
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.8.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>
|
||||
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
<!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="`ggblanket` as internals for deciding whether the bar chart is horizontally readable."><title>Simple bar chart — bar_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.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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_reach"><meta property="og:description" content="`ggblanket` as internals for deciding whether the bar chart is horizontally readable."><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.3.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_reach.Rd</code></div>
|
||||
</div>
|
||||
|
||||
<div class="ref-description section level2">
|
||||
<p>`ggblanket` as internals for deciding whether the bar chart is horizontally readable.</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_reach</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> percent <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
||||
<span> palette <span class="op">=</span> <span class="st">"main"</span>,</span>
|
||||
<span> reverse <span class="op">=</span> <span class="cn">FALSE</span>,</span>
|
||||
<span> family <span class="op">=</span> <span class="st">"Leelawadee"</span>,</span>
|
||||
<span> alpha <span class="op">=</span> <span class="fl">1</span>,</span>
|
||||
<span> width <span class="op">=</span> <span class="fl">0.5</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> position <span class="op">=</span> <span class="st">"dodge"</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> text_size <span class="op">=</span> <span class="fl">10</span>,</span>
|
||||
<span> title_size <span class="op">=</span> <span class="fl">14</span>,</span>
|
||||
<span> legend_position <span class="op">=</span> <span class="st">"right"</span>,</span>
|
||||
<span> legend_rev <span class="op">=</span> <span class="cn">TRUE</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>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>percent</dt>
|
||||
<dd><p>TRUE or FALSE. Should the x-labels be displayed as percentages? Default to TRUE.</p></dd>
|
||||
|
||||
|
||||
<dt>palette</dt>
|
||||
<dd><p>Palette name from 'pal_reach()'.</p></dd>
|
||||
|
||||
|
||||
<dt>reverse</dt>
|
||||
<dd><p>Boolean indicating whether the palette should be reversed.</p></dd>
|
||||
|
||||
|
||||
<dt>family</dt>
|
||||
<dd><p>The font family for all plot's texts. Default to "Leelawadee".</p></dd>
|
||||
|
||||
|
||||
<dt>alpha</dt>
|
||||
<dd><p>Transparency.</p></dd>
|
||||
|
||||
|
||||
<dt>width</dt>
|
||||
<dd><p>Width.</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>position</dt>
|
||||
<dd><p>Should the chart be stacked? Default to "dodge". Can take "dodge" and "stack".</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>Caption title string. Default to NULL.</p></dd>
|
||||
|
||||
|
||||
<dt>text_size</dt>
|
||||
<dd><p>The size of all text other than the title, subtitle and caption. Defaults to 10.</p></dd>
|
||||
|
||||
|
||||
<dt>title_size</dt>
|
||||
<dd><p>The size of the title text. Defaults to 14.</p></dd>
|
||||
|
||||
|
||||
<dt>legend_position</dt>
|
||||
<dd><p>Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".</p></dd>
|
||||
|
||||
|
||||
<dt>legend_rev</dt>
|
||||
<dd><p>Reverse the color in the guide? Default to TRUE.</p></dd>
|
||||
|
||||
|
||||
<dt>...</dt>
|
||||
<dd><p>Other arguments to be passed to "ggblanket::gg_col"</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>
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]--></head><body>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!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.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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]>
|
||||
<!-- 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/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]--></head><body>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<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.3.9000</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.8.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">
|
||||
|
|
|
|||
161
docs/reference/donut.html
Normal file
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.8.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>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue