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

124

Version

1.1.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Hodge

Last Published

May 6th, 2020

Functions in simplevis (1.1.2)

ggplot_hbar_col

Horizontal bar ggplot that is coloured.
a4_height_mm

A4 useable height.
ggplot_hbar

Horizontal bar ggplot.
ggplot_box

Vertical box ggplot.
ggplot_box_facet

Vertical box ggplot that is facetted.
example_sf_nz_livestock

Example sf object of New Zealand livestock.
example_stars_nz_no3n

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

Line ggplot that is coloured and facetted.
ggplot_line_col

Line ggplot that is coloured.
ggplot_line

Line ggplot.
a4_width_mm

A4 useable width.
example_stars_nz_drp

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

Scatter ggplot that is coloured and facetted.
ggplot_scatter_facet

Scatter ggplot that is facetted.
example_sf_nz_river_wq

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

Horizontal bar ggplot that is coloured and facetted.
ggplot_line_facet

Line ggplot that is facetted.
ggplot_vbar

Vertical bar ggplot.
ggplot_scatter_col

Scatter ggplot that is coloured.
ggplot_scatter

Scatter ggplot.
ggplot_sf_col

Map of simple features in ggplot that is coloured.
ggplot_sf

Map of simple features in ggplot.
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_hbar_facet

Horizontal bar ggplot that is facetted.
ggplot_stars_facet

Map of an array in ggplot that is facetted.
leaflet_stars_col

Map of an array in leaflet that is coloured.
ggplot_sf_col_facet

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

Map of simple features in ggplot that is facetted.
leaflet_stars

Map of an array in leaflet.
leaflet_sf

Map of simple features in leaflet.
ggplot_stars_col

Map of an array in ggplot that is coloured.
pal_ea19_nztcs_c

Colour palette for the NZTCS.
ggplot_stars

Map of an array in ggplot.
ggplot_vbar_col_facet

Vertical bar ggplot that is coloured and facetted.
ggplot_vbar_facet

Vertical bar ggplot that is facetted.
pal_snz_nof5

Colour palette for 5 categories from good to bad
theme_scatter

Theme for scatter ggplots.
theme_sf

Theme for ggplot maps of simple features.
numeric_legend_labels

Numeric legend labels.
nz_region

New Zealand coastline with regions.
leaflet_basemap_stack

Basemap stack in leaflet.
pal_ea19_trend2

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

Colour palette for the NZTCS.
pal_ea19

Colour palette for categorical variables.
leaflet_basemap_stack_nz

Basemap stack in leaflet for New Zealand.
nz

New Zealand coastline.
signed_sqrt_trans

Signed square root ggplot scale transformation.
pal_point_trend2

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

Colour palette for 4 categories from good to bad
pal_point_set1

Colour palette for categorical variables for points.
leaflet_sf_col

Map of simple features in leaflet that is coloured.
pal_snz

Colour palette for categorical variables.
pal_snz_trend5

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

Theme for vertical box ggplots.
pal_ea19_nof5

Colour palette for 5 categories from good to bad
pal_ea19_nof4

Colour palette for 4 categories from good to bad
pal_snz_trend3

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

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

Theme for vertical bar ggplots.
theme_stars

Theme for ggplot maps of arrays.
pal_ea19_trend5

Colour palette for a categorical trend variable with 5 values.
%>%

Pipe operator
remove_plotly_buttons

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

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

Colour palette for the NZTCS.
sentence_spaced_colnames

Convert column names to sentence case.
run_template

Run shiny template with option to download.
pal_point_trend5

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

Theme for horizontal bar ggplots.
theme_line

Theme for line ggplots.
pal_snz_trend2

Colour palette for a categorical trend variable with 2 values.