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 simplify the creation of high quality graph and map visualisations.

These functions only require inputs of data, variables and titles to provide beautiful interactive or image visualisations. However they allow for more flexibility if required.

The intent is that high quality well-designed graphs and maps 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 http://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

1.5.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Hodge

Last Published

July 7th, 2020

Functions in simplevis (1.5.0)

ggplot_box

Vertical box ggplot.
a4_height_mm

A4 useable height.
ggplot_hbar_col

Horizontal bar ggplot that is coloured.
ggplot_box_facet

Vertical box ggplot that is facetted.
ggplot_hbar

Horizontal bar ggplot.
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_stars_nz_no3n

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

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

A4 useable width.
ggplot_line

Line ggplot.
ggplot_hbar_facet

Horizontal bar ggplot that is facetted.
ggplot_hbar_col_facet

Horizontal bar ggplot that is coloured and facetted.
ggplot_scatter_col_facet

Scatter ggplot that is coloured and facetted.
ggplot_scatter_facet

Scatter ggplot that is facetted.
ggplot_line_col

Line ggplot that is coloured.
ggplot_line_col_facet

Line ggplot that is coloured and facetted.
ggplot_line_facet

Line ggplot that is facetted.
ggplot_stars

Map of an array in ggplot.
ggplot_sf_facet

Map of simple features in ggplot that is facetted.
ggplot_sf_col_facet

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

Scatter ggplot that is coloured.
ggplot_vbar

Vertical bar ggplot.
ggplot_scatter

Scatter ggplot.
ggplot_stars_col

Map of an array in ggplot that is coloured.
ggplot_vbar_col

Vertical bar ggplot that is coloured.
ggplot_stars_col_facet

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

Map of simple features in ggplot.
leaflet_stars

Map of an array in leaflet.
ggplot_stars_facet

Map of an array in ggplot that is facetted.
leaflet_sf

Map of simple features in leaflet.
pal_snz_nof4

Colour palette for 4 categories from good to bad
leaflet_sf_col

Map of simple features in leaflet that is coloured.
ggplot_sf_col

Map of simple features in ggplot that is coloured.
leaflet_basemap_stack

Basemap stack in leaflet.
leaflet_stars_col

Map of an array in leaflet that is coloured.
pal_snz_nof5

Colour palette for 5 categories from good to bad
pal_snz_nztcs_c

Colour palette for the NZTCS.
pal_ea19_trend5

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

Colour palette for categorical variables for points.
leaflet_basemap_stack_nz

Basemap stack in leaflet for New Zealand.
ggplot_vbar_col_facet

Vertical bar ggplot that is coloured and facetted.
pal_ea19_nof5

Colour palette for 5 categories from good to bad
pal_snz

Colour palette for categorical variables.
nz

New Zealand coastline.
pal_snz_nztcs_s

Colour palette for the NZTCS.
numeric_legend_labels

Numeric legend labels.
plotly_order_legend

Order plotly legend elements.
plotly_remove_buttons

Remove plotly buttons from the mode bar, other than the camera and plotly logo.
pal_ea19_trend3

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

Theme for line ggplots.
ggplot_vbar_facet

Vertical bar ggplot that is facetted.
pal_point_trend5

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

Theme for vertical bar ggplots.
theme_scatter

Theme for scatter ggplots.
pal_ea19_trend2

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

Colour palette for categorical variables.
pal_ea19_nof4

Colour palette for 4 categories from good to bad
pal_point_trend2

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

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

Convert column names to sentence case.
pal_snz_trend3

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

Signed square root ggplot scale transformation.
run_template

Run shiny template with option to download.
pal_ea19_nztcs_c

Colour palette for the NZTCS.
plotly_reverse_legend

Reverse plotly legend elements.
theme_hbar

Theme for horizontal bar ggplots.
theme_box

Theme for vertical box ggplots.
pal_point_trend3

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

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

Theme for ggplot maps of simple features.
theme_stars

Theme for ggplot maps of arrays.
%>%

Pipe operator