scsplot is superseded by sgplot.

scsplot

GitHub release (latest by date) R build status

scsplot contains functions for creating graphics in reporting of the Scottish Government Covid-19 Scottish Contact Survey (SCS).

The following functions are available:

The available colours have been selected using the Government Statistical Service (GSS) Data visualisation: colours guidance. Names and hex codes for available colours and palettes can be viewed by running the following code:

# View names and hex codes for all colours
scs_colour_values

# View names and hex codes for all colour palettes
scs_colour_palettes

# View names and hex codes for `main` colour palette
scs_colour_palettes[["main"]]

The following colour palettes are available: main, sequential and focus.

Installation

To install scsplot, the package remotes is required. The package can be installed directly from GitHub with:

remotes::install_github(
  "DataScienceScotland/scsplot",
  upgrade = "never"
)

Network security settings may prevent remotes::install_github() from working. If this is the case, scsplot can be installed by downloading the zip of the repository and running the following code (replacing the section marked <>, including the arrows themselves):

remotes::install_local(
  "<FILEPATH OF ZIPPED FILE>/scsplot-main.zip",
  upgrade = "never"
)

The scsplot package can then be loaded using the library() function:

library(scsplot)

To access the help file associated with a function within the scsplot package, type ?function_name into the RStudio console, for example:

?scs_theme

Using and Contributing to scsplot

At present, this package is maintained by Alice Byers.

This package has primarily been developed for use by the Scottish Government Scottish Contact Survey team. However, its contents may be useful more widely. As such, suggestions and contributions are welcome.



DataScienceScotland/scsplot documentation built on Jan. 26, 2023, 7:21 p.m.