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

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Hodge

Last Published

June 2nd, 2020

Functions in simplevis (1.1.4)

example_stars_nz_drp

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

Horizontal bar ggplot.
ggplot_scatter_col_facet

Scatter ggplot that is coloured and facetted.
ggplot_hbar_col

Horizontal bar ggplot that is coloured.
ggplot_scatter_facet

Scatter ggplot that is facetted.
ggplot_stars

Map of an array in ggplot.
ggplot_box

Vertical box ggplot.
ggplot_hbar_col_facet

Horizontal bar ggplot that is coloured and facetted.
ggplot_box_facet

Vertical box ggplot that is facetted.
ggplot_line

Line ggplot.
ggplot_line_col

Line ggplot that is coloured.
ggplot_stars_col

Map of an array in ggplot that is coloured.
ggplot_hbar_facet

Horizontal bar ggplot that is facetted.
ggplot_line_col_facet

Line ggplot that is coloured and facetted.
ggplot_vbar_col_facet

Vertical bar ggplot that is coloured and facetted.
ggplot_line_facet

Line ggplot that is facetted.
ggplot_vbar_facet

Vertical bar ggplot that is facetted.
a4_height_mm

A4 useable height.
ggplot_stars_col_facet

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

Map of an array in ggplot that is facetted.
pal_ea19

Colour palette for categorical variables.
a4_width_mm

A4 useable width.
ggplot_sf_col_facet

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

Colour palette for 4 categories from good to bad
example_sf_nz_livestock

Example sf object of New Zealand livestock.
ggplot_vbar

Vertical bar ggplot.
ggplot_vbar_col

Vertical bar ggplot that is coloured.
pal_snz_nof4

Colour palette for 4 categories from good to bad
pal_snz_nof5

Colour palette for 5 categories from good to bad
ggplot_scatter

Scatter ggplot.
ggplot_scatter_col

Scatter ggplot that is coloured.
sentence_spaced_colnames

Convert column names to sentence case.
example_sf_nz_river_wq

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

Map of an array in leaflet.
leaflet_stars_col

Map of an array in leaflet that is coloured.
pal_ea19_nof5

Colour palette for 5 categories from good to bad
signed_sqrt_trans

Signed square root ggplot scale transformation.
leaflet_sf

Map of simple features in leaflet.
pal_ea19_nztcs_c

Colour palette for the NZTCS.
theme_scatter

Theme for scatter ggplots.
theme_stars

Theme for ggplot maps of arrays.
theme_sf

Theme for ggplot maps of simple features.
theme_line

Theme for line ggplots.
theme_vbar

Theme for vertical bar ggplots.
leaflet_sf_col

Map of simple features in leaflet that is coloured.
pal_point_trend2

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

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

Map of simple features in ggplot that is coloured.
ggplot_sf

Map of simple features in ggplot.
numeric_legend_labels

Numeric legend labels.
nz

New Zealand coastline.
ggplot_sf_facet

Map of simple features in ggplot that is facetted.
pal_point_trend5

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

Run shiny template with option to download.
plotly_reverse_legend

Reverse plotly legend elements.
plotly_remove_buttons

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

Pipe operator
pal_snz_trend5

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

Order plotly legend elements.
leaflet_basemap_stack

Basemap stack in leaflet.
pal_snz

Colour palette for categorical variables.
pal_point_set1

Colour palette for categorical variables for points.
leaflet_basemap_stack_nz

Basemap stack in leaflet for New Zealand.
pal_snz_nztcs_s

Colour palette for the NZTCS.
pal_ea19_trend5

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

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

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

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

Colour palette for the NZTCS.
pal_ea19_trend3

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

Theme for vertical box ggplots.
theme_hbar

Theme for horizontal bar ggplots.
example_stars_nz_no3n

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