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.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Hodge

Last Published

January 14th, 2022

Functions in simplevis (6.0.0)

gg_bar_col

Bar ggplot that is coloured.
example_stars

Example stars object.
gg_bar_facet

Bar ggplot that is facetted.
gg_bar_col_facet

Bar ggplot that is coloured and facetted.
gg_boxplot

Boxplot ggplot.
gg_bar

Bar ggplot.
example_point

Example sf point object.
example_polygon

Example sf polygon object.
cut_format

Convert Numeric to Factor, with custom formatting
example_borders

Example sf object of the New Zealand coastline.
gg_hbar_col

Horizontal bar ggplot that is coloured.
gg_density_col_facet

Density ggplot that is coloured and facetted.
gg_density_col

Density ggplot that is coloured.
gg_hbar_col_facet

Horizontal bar ggplot that is coloured and facetted.
gg_density

Density ggplot.
gg_boxplot_facet

Boxplot ggplot that is facetted.
gg_boxplot_col

Boxplot ggplot that is coloured
gg_boxplot_col_facet

Boxplot ggplot that is coloured and facetted.
gg_density_facet

Density ggplot that is facetted.
gg_hpointrange_col_facet

Horizontal pointrange ggplot that is coloured and facetted.
gg_hpointrange_facet

Horizontal pointrange ggplot that is facetted.
gg_hpointrange_col

Horizontal pointrange ggplot that is coloured.
gg_hboxplot_facet

Horizontal boxplot ggplot that is facetted.
gg_hbar

Horizontal bar ggplot.
gg_hviolin

Horizontal violin ggplot.
gg_hpointrange

Horizontal pointrange ggplot.
gg_hboxplot_col_facet

Horizontal boxplot ggplot that is coloured and facetted.
gg_hboxplot_col

Horizontal boxplot ggplot that is coloured.
gg_hbar_facet

Horizontal bar ggplot that is facetted.
gg_hboxplot

Horizontal boxplot ggplot.
gg_point_col_facet

Point ggplot that is coloured and facetted.
gg_point

Point ggplot.
gg_hviolin_col_facet

Horizontal violin ggplot that is coloured and facetted.
gg_line_facet

Line ggplot that is facetted.
gg_point_col

Point ggplot that is coloured.
gg_hviolin_col

Horizontal violin ggplot that is coloured.
gg_line_col

Line ggplot that is coloured.
gg_line_col_facet

Line ggplot that is coloured and facetted.
gg_hviolin_facet

Horizontal violin ggplot that is facetted.
gg_line

Line ggplot.
gg_sf_col

Simple feature ggplot map that is coloured.
gg_smooth

Smoothed ggplot.
gg_sf_facet

Simple feature ggplot map that is facetted.
gg_sf_col_facet

Simple feature ggplot map that is coloured and facetted.
gg_pointrange_col_facet

Pointrange ggplot that is coloured and facetted.
gg_pointrange_col

Pointrange ggplot that is coloured.
gg_tile_col_facet

Tile ggplot that is coloured and facetted.
gg_stars_col

Stars ggplot map that is coloured.
gg_smooth_col_facet

Smoothed ggplot that is coloured and facetted.
gg_sf

Simple feature ggplot map.
gg_pointrange_facet

Pointrange ggplot that is facetted.
gg_smooth_col

Smoothed ggplot that is coloured.
gg_violin

Violin ggplot.
gg_point_facet

Point ggplot that is facetted.
gg_pointrange

Pointrange ggplot.
gg_theme_map

Create a simple theme for a map.
leaf_basemap

Basemap stack in leaflet.
gg_violin_facet

Violin ggplot that is facetted.
interval_labels

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

Tile ggplot that is coloured.
pal_viridis_reorder

Viridis palette reordered.
leaf_sf

Simple feature leaflet map.
%>%

Pipe operator
leaf_stars_col

Stars leaflet map that is coloured.
gg_smooth_facet

Smoothed ggplot that is facetted.
mutate_text

Add a quick tooltip text column to data.
gg_stars

Stars ggplot map.
pal_d3_reorder

D3 palette reordered.
sv_interval_labels_num

Convert numeric bin cuts to simple and pretty labels.
pal_na

NA palette.
sv_numeric_breaks_h

Calculate the breaks for a horizontal axis numeric vector.
sv_numeric_breaks_v

Calculate the breaks for a y axis numeric vector.
summarise_boxplot_stats

Summarise boxplot stats in a dataset or tibble.
sv_density_max

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

Automatically adjust x_zero and x_zero_line if necessary
sv_font_size_title

Get default font_size_title
theme_mobile_extra

Extra theme elements for ggplot2 graphs on mobile devices
sv_y_zero_adjust

Automatically adjust y_zero and y_zero_line if necessary
gg_theme

Create a simple theme for a graph.
sv_interval_labels_chr

Convert bin cuts to simple and pretty labels.
leaf_sf_col

Simple feature leaflet map that is coloured.
leaf_stars

Stars leaflet map.
gg_violin_col

Violin ggplot that is coloured
sv_font_size_body

Get default font_size_body
plotly_col_legend

Change colour legend elements order.
plotly_camera

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

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

Shiny demo
theme_mobile_extra_map

Extra theme elements for ggplot2 maps on mobile devices
sv_density_max_col_facet

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

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

Summarise outliers in a dataset or tibble.
gg_violin_col_facet

Violin ggplot that is coloured and facetted.