Learn R Programming

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

simplevis

Introduction

simplevis is a package of ggplot2 and leaflet wrapper functions designed to support effortless high quality ggplot2 and leaflet visualisations for reports or interactive shiny apps.

The intent is that these can be made more consistently with less effort, code and expertise than would otherwise be required.

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

2.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Hodge

Last Published

September 1st, 2020

Functions in simplevis (2.0.0)

a4_height_mm

A4 useable height.
ggplot_box_facet

Boxplot ggplot that is facetted.
ggplot_hbar

Horizontal bar ggplot.
ggplot_box

Boxplot ggplot.
add_tip

Add a quick tooltip text column to data.
example_stars_nz_no3n

Example stars object of New Zealand modelled river water NO3N concentrations.
example_sf_nz_livestock

Example sf object of New Zealand livestock.
example_stars_nz_drp

Example stars object of New Zealand modelled river water DRP concentrations.
example_sf_nz_river_wq

Example sf object of New Zealand river water quality trends.
a4_width_mm

A4 useable width.
ggplot_hbar_col

Horizontal bar ggplot that is coloured.
ggplot_line_col_facet

Line ggplot that is coloured and facetted.
ggplot_line_col

Line ggplot that is coloured.
ggplot_stars_col

Map of an array in ggplot that is coloured.
ggplot_line_facet

Line ggplot that is facetted.
ggplot_stars_col_facet

Map of an array in ggplot that is coloured and facetted.
ggplot_scatter

Scatter ggplot.
ggplot_sf_col

Map of simple features in ggplot that is coloured.
ggplot_line

Line ggplot.
ggplot_sf_col_facet

Map of simple features in ggplot that is coloured and facetted.
ggplot_hbar_facet

Horizontal bar ggplot that is facetted.
ggplot_sf

Map of simple features in ggplot.
ggplot_scatter_facet

Scatter ggplot that is facetted.
ggplot_vbar_col

Vertical bar ggplot that is coloured.
ggplot_sf_facet

Map of simple features in ggplot that is facetted.
ggplot_stars

Map of an array in ggplot.
ggplot_hbar_col_facet

Horizontal bar ggplot that is coloured and facetted.
leaflet_stars_col

Map of an array in leaflet that is coloured.
ggplot_vbar

Vertical bar ggplot.
ggplot_scatter_col

Scatter ggplot that is coloured.
leaflet_sf_col

Map of simple features in leaflet that is coloured.
ggplot_stars_facet

Map of an array in ggplot that is facetted.
ggplot_scatter_col_facet

Scatter ggplot that is coloured and facetted.
ggplot_vbar_col_facet

Vertical bar ggplot that is coloured and facetted.
pal_ea19_trend3

Colour palette for a categorical trend variable with 3 values.
leaflet_basemap

Basemap stack in leaflet.
ggplot_vbar_facet

Vertical bar ggplot that is facetted.
pal_ea19_trend5

Colour palette for a categorical trend variable with 5 values.
pal_ea19_nof4

Colour palette for 4 categories from good to bad
run_template

Run shiny template with option to download.
pal_point_set1

Colour palette for categorical variables for points.
sentence_spaced_colnames

Convert column names to sentence case.
leaflet_stars

Map of an array in leaflet.
numeric_legend_labels

Numeric legend labels.
pal_point_trend2

Colour palette for a categorical trend variable with 2 values for points.
nz

New Zealand coastline.
pal_snz

Colour palette for categorical variables.
pal_ea19

Colour palette for categorical variables.
pal_ea19_nztcs_c

Colour palette for the NZTCS.
pal_ea19_trend2

Colour palette for a categorical trend variable with 2 values.
leaflet_basemap_nz

Basemap stack in leaflet for New Zealand.
pal_snz_nof4

Colour palette for 4 categories from good to bad
leaflet_sf

Map of simple features in leaflet.
pal_point_trend3

Colour palette for a categorical trend variable with 3 values for points.
pal_snz_trend3

Colour palette for a categorical trend variable with 3 values.
pal_snz_nztcs_s

Colour palette for the NZTCS.
%>%

Pipe operator
pal_ea19_nof5

Colour palette for 5 categories from good to bad
pal_snz_nztcs_c

Colour palette for the NZTCS.
pal_snz_nof5

Colour palette for 5 categories from good to bad
theme_sf

Theme for ggplot maps of simple features.
theme_scatter

Theme for scatter ggplots.
pal_snz_trend5

Colour palette for a categorical trend variable with 5 values.
signed_sqrt_trans

Signed square root ggplot scale transformation.
theme_box

Theme for box ggplots.
theme_stars

Theme for ggplot maps of arrays.
pal_point_trend5

Colour palette for a categorical trend variable with 5 values for points.
plotly_legend_order

Order plotly legend elements.
pal_snz_trend2

Colour palette for a categorical trend variable with 2 values.
theme_hbar

Theme for horizontal bar ggplots.
theme_vbar

Theme for vertical bar ggplots.
plotly_camera

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

Theme for line ggplots.
plotly_legend_rev

Reverse plotly legend elements.