Learn R Programming

⚠️There's a newer version (7.1.0) of this package.Take me there.

simplevis

Purpose

simplevis is a package of ggplot2 and leaflet wrapper functions that aims to make visualisation easier with less brainpower required.

It does this by:

  • using families of functions of combinations of colouring (by a variable), facetting, neither or both
  • using prefixes to make it easier to adjust aspects of the visualisation
  • unifying colouring into one concept, and simplyfing applying different colouring methods.

Installation

Install stable version from CRAN: install.packages("simplevis")

Install development version from github: devtools::install_github("statisticsNZ/simplevis")

Documentation

Webpage URL:

https://statisticsnz.github.io/simplevis/

R vignette:

vignette("simplevis", "simplevis")


Copyright and Licensing

The package is Crown copyright (c) 2020, Statistics New Zealand on behalf of the New Zealand Government, and is licensed under the MIT License.

This document is Crown copyright (c) 2020, Statistics New Zealand on behalf of the New Zealand Government, and is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

Copy Link

Version

Install

install.packages('simplevis')

Monthly Downloads

259

Version

6.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Hodge

Last Published

February 15th, 2022

Functions in simplevis (6.1.0)

gg_boxplot

Boxplot ggplot.
gg_bar_col_facet

Bar ggplot that is coloured and facetted.
gg_bar

Bar ggplot.
example_polygon

Example sf polygon object.
gg_bar_col

Bar ggplot that is coloured.
gg_bar_facet

Bar ggplot that is facetted.
example_borders

Example sf object of the New Zealand coastline.
example_point

Example sf point object.
cut_format

Convert Numeric to Factor, with custom formatting
example_stars

Example stars object.
gg_density_col

Density ggplot that is coloured.
gg_boxplot_col_facet

Boxplot ggplot that is coloured and facetted.
gg_boxplot_col

Boxplot ggplot that is coloured
gg_hbar

Horizontal bar ggplot.
gg_density_facet

Density ggplot that is facetted.
gg_density

Density ggplot.
gg_boxplot_facet

Boxplot ggplot that is facetted.
gg_density_col_facet

Density ggplot that is coloured and facetted.
gg_hboxplot

Horizontal boxplot ggplot.
gg_hviolin

Horizontal violin ggplot.
gg_hboxplot_col

Horizontal boxplot ggplot that is coloured.
gg_hboxplot_col_facet

Horizontal boxplot ggplot that is coloured and facetted.
gg_hbar_facet

Horizontal bar ggplot that is facetted.
gg_hpointrange_facet

Horizontal pointrange ggplot that is facetted.
gg_hboxplot_facet

Horizontal boxplot ggplot that is facetted.
gg_hpointrange

Horizontal pointrange ggplot.
gg_hbar_col_facet

Horizontal bar ggplot that is coloured and facetted.
gg_hbar_col

Horizontal bar ggplot that is coloured.
gg_hpointrange_col

Horizontal pointrange ggplot that is coloured.
gg_hviolin_col_facet

Horizontal violin ggplot that is coloured and facetted.
gg_hpointrange_col_facet

Horizontal pointrange ggplot that is coloured and facetted.
gg_line_facet

Line ggplot that is facetted.
gg_point

Point ggplot.
gg_point_col

Point ggplot that is coloured.
gg_hviolin_col

Horizontal violin ggplot that is coloured.
gg_line_col_facet

Line ggplot that is coloured and facetted.
gg_line_col

Line ggplot that is coloured.
gg_point_col_facet

Point ggplot that is coloured and facetted.
gg_hviolin_facet

Horizontal violin ggplot that is facetted.
gg_line

Line ggplot.
gg_pointrange_facet

Pointrange ggplot that is facetted.
gg_sf

Simple feature ggplot map.
gg_pointrange_col

Pointrange ggplot that is coloured.
gg_pointrange_col_facet

Pointrange ggplot that is coloured and facetted.
gg_pointrange

Pointrange ggplot.
gg_point_facet

Point ggplot that is facetted.
gg_sf_facet

Simple feature ggplot map that is facetted.
gg_tile_col

Tile ggplot that is coloured.
gg_tile_col_facet

Tile ggplot that is coloured and facetted.
gg_smooth

Smoothed ggplot.
gg_violin

Violin ggplot.
gg_stars_col

Stars ggplot map that is coloured.
gg_theme

Create a simple theme for a graph.
interval_labels

Convert numeric or interval cuts to simple and pretty labels.
gg_smooth_facet

Smoothed ggplot that is facetted.
gg_stars

Stars ggplot map.
gg_smooth_col

Smoothed ggplot that is coloured.
gg_sf_col

Simple feature ggplot map that is coloured.
gg_smooth_col_facet

Smoothed ggplot that is coloured and facetted.
gg_sf_col_facet

Simple feature ggplot map that is coloured and facetted.
gg_violin_col_facet

Violin ggplot that is coloured and facetted.
leaf_basemap

Basemap stack in leaflet.
shiny_demo

Shiny demo
mutate_text

Add a quick tooltip text column to data.
leaf_stars_col

Stars leaflet map that is coloured.
summarise_boxplot_outliers

Summarise outliers in a dataset or tibble.
leaf_clear

In shiny, clear all features, images and legends.
leaf_sf

Simple feature leaflet map.
gg_violin_col

Violin ggplot that is coloured
plotly_camera

Remove plotly buttons from the mode bar, other than the camera.
plotly_col_legend

Change colour legend elements order.
pal_viridis_reorder

Viridis palette reordered.
sv_font_size_body

Get default font_size_body
sv_density_max_facet

Calculate the max density in a gg_density_facet() plot.
leaf_sf_col

Simple feature leaflet map that is coloured.
leaf_stars

Stars leaflet map.
%>%

Pipe operator
sv_font_size_title

Get default font_size_title
sv_x_zero_adjust

Automatically adjust x_zero and x_zero_line if necessary
sv_numeric_breaks_v

Calculate the breaks for a y axis numeric vector.
sv_interval_labels_chr

Convert bin cuts to simple and pretty labels.
sv_y_zero_adjust

Automatically adjust y_zero and y_zero_line if necessary
theme_mobile_extra

Extra theme elements for ggplot2 graphs on mobile devices
gg_violin_facet

Violin ggplot that is facetted.
summarise_boxplot_stats

Summarise boxplot stats in a dataset or tibble.
pal_d3_reorder

D3 palette reordered.
sv_interval_labels_num

Convert numeric bin cuts to simple and pretty labels.
sv_numeric_breaks_h

Calculate the breaks for a horizontal axis numeric vector.
sv_density_max

Calculate the max density in a gg_density() plot.
pal_na

NA palette.
sv_density_max_col

Calculate the max density in a gg_density_col(..., position == "identity") plot.
sv_density_max_col_facet

Calculate the max density in a gg_density_col_facet(..., position == "identity") plot.