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.

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

5.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Hodge

Last Published

November 10th, 2021

Functions in simplevis (5.0.0)

example_stars

Example stars object.
gg_bar_col

Vertical bar ggplot that is coloured.
gg_boxplot_col

Boxplot ggplot that is coloured
gg_boxplot

Boxplot ggplot.
gg_bar

Vertical bar ggplot.
example_sf_point

Example sf point object.
example_sf_polygon

Example sf polygon object.
cut_format

Convert Numeric to Factor, with custom formatting
gg_bar_col_facet

Vertical bar ggplot that is coloured and facetted.
gg_bar_facet

Vertical bar ggplot that is facetted.
gg_density_col_facet

Smoothed density ggplot that is coloured and facetted.
gg_density

Smoothed density ggplot.
gg_density_col

Smoothed density ggplot that is coloured.
gg_hbar

Horizontal bar ggplot.
gg_hbar_col

Horizontal bar ggplot that is coloured.
gg_density_facet

Smoothed density ggplot that is facetted.
gg_boxplot_facet

Boxplot ggplot that is facetted.
gg_line_facet

Line ggplot that is facetted.
gg_boxplot_col_facet

Boxplot ggplot that is coloured
gg_line_col_facet

Line ggplot that is coloured and facetted.
gg_hbar_facet

Horizontal bar ggplot that is facetted.
gg_hbar_col_facet

Horizontal bar ggplot that is coloured and facetted.
gg_point_col

Point ggplot that is coloured.
gg_point

Point ggplot.
gg_tile_col

Tile ggplot that is coloured.
gg_sf

Simple feature ggplot map.
gg_sf_col_facet

Simple feature ggplot map that is coloured and facetted.
leaflet_sf

Simple feature leaflet map.
gg_sf_facet

Simple feature ggplot map that is facetted.
gg_tile_col_facet

Tile ggplot that is coloured and facetted.
leaflet_stars_col

Stars leaflet map that is coloured.
run_template

Run shiny template with option to download.
leaflet_stars

Stars leaflet map.
sv_density_max

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

Simple feature leaflet map that is coloured.
gg_sf_col

Simple feature ggplot map that is coloured.
plotly_camera

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

Line ggplot.
sv_font_size_title

Get default font_size_title
pal_d3_reorder

D3 palette reordered.
sv_interval_labels_chr

Convert bin cuts to simple and pretty labels.
theme_mobile_extra

Extra theme elements for ggplot2 graphs on mobile devices
theme_mobile_extra_map

Extra theme elements for ggplot2 maps on mobile devices
gg_stars

Stars ggplot map.
gg_stars_col

Stars ggplot map that is coloured.
gg_point_col_facet

Point ggplot that is coloured and facetted.
gg_line_col

Line ggplot that is coloured.
theme_hv_gridlines

Theme for graphs with horizontal and vertical gridlines.
interval_labels

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

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

NA palette.
mutate_text

Add a quick tooltip text column to data.
sv_interval_labels_num

Convert numeric bin cuts to simple and pretty labels.
sv_font_size_body

Get default font_size_body
gg_point_facet

Point ggplot that is facetted.
plotly_col_legend

Change colour legend elements order.
leaflet_basemap

Basemap stack in leaflet.
nz

New Zealand coastline.
sv_density_max_col

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

Viridis palette reordered.
sv_numeric_breaks_h

Calculate the breaks for a horizontal axis numeric vector.
theme_map

Theme for maps.
theme_v_gridlines

Theme for graphs with vertical gridlines.
theme_no_gridlines

Theme for graphs with no gridlines.
sv_density_max_col_facet

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

Theme for graphs with horizontal gridlines.
sv_y_zero_adjust

Automatically adjust y_zero and y_zero_line if necessary
%>%

Pipe operator
sv_x_zero_adjust

Automatically adjust x_zero and x_zero_line if necessary
sv_numeric_breaks_v

Calculate the breaks for a y axis numeric vector.