{"id":19952738,"url":"https://github.com/nhs-south-central-and-west/scwplot","last_synced_at":"2025-07-20T16:03:35.433Z","repository":{"id":158181306,"uuid":"591412014","full_name":"NHS-South-Central-and-West/scwplot","owner":"NHS-South-Central-and-West","description":"R package for creating consistent SCW-style ggplot figures.","archived":false,"fork":false,"pushed_at":"2023-08-04T00:28:46.000Z","size":3394,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-13T14:07:45.915Z","etag":null,"topics":["data-visualisation","ggplot","r","rstats"],"latest_commit_sha":null,"homepage":"https://nhs-south-central-and-west.github.io/scwplot/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NHS-South-Central-and-West.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-20T17:36:45.000Z","updated_at":"2024-06-11T01:17:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"ccd00d7f-0456-4e10-b40c-762cecb30a45","html_url":"https://github.com/NHS-South-Central-and-West/scwplot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NHS-South-Central-and-West/scwplot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHS-South-Central-and-West%2Fscwplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHS-South-Central-and-West%2Fscwplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHS-South-Central-and-West%2Fscwplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHS-South-Central-and-West%2Fscwplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NHS-South-Central-and-West","download_url":"https://codeload.github.com/NHS-South-Central-and-West/scwplot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHS-South-Central-and-West%2Fscwplot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266152253,"owners_count":23884473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visualisation","ggplot","r","rstats"],"created_at":"2024-11-13T01:14:16.786Z","updated_at":"2025-07-20T16:03:35.404Z","avatar_url":"https://github.com/NHS-South-Central-and-West.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\n#| label: setup\n#| include: false\n\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# scwplot \u003ca href=\"https://nhs-south-central-and-west.github.io/scwplot/\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"139\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![check-standard](https://github.com/NHS-South-Central-and-West/scwplot/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/NHS-South-Central-and-West/scwplot/actions/workflows/check-standard.yaml)\n[![codecov](https://codecov.io/gh/NHS-South-Central-and-West/scwplot/branch/main/graph/badge.svg?token=00PF3Y2TDL)](https://codecov.io/gh/NHS-South-Central-and-West/scwplot)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n\u003c!-- badges: end --\u003e\n\nThe scwplot package provides functions for applying consistent SCW-branded aesthetics to ggplot visualisations in R, as well as additional functionality that produces clean plots and makes plotting in R easier.\n\n## Installation\n\nscwplot is not available on CRAN. In order to install the package, you must do so directly from this GitHub repository with {devtools}, using the code below:\n\n```{r}\n#| label: install-scwplot\n#| eval: false\n\n# install.packages(\"pak\")\npak::pak(\"NHS-South-Central-and-West/scwplot\")\n```\n\nIf you haven't already installed devtools, you will also have to run the first line of code in the code chunk.\n\n## Usage\n\nThe primary purpose of scwplot is to extend the functionality of ggplot to create consistent SCW-style figures, so usage builds on top of basic [ggplot2](https://ggplot2.tidyverse.org/) functionality.\n\nA simple example of the scwplot usage:\n\n```{r}\n#| label: scwplot-basics\n#| fig.width: 12\n#| fig.height: 8\n#| dpi: 300\n\nlibrary(ggplot2)\nlibrary(scwplot)\n\nggplot(mpg, aes(displ, hwy, fill = as.factor(cyl))) +\n  geom_jitter(\n    shape = 21, size = 6, stroke = 1,\n    alpha = .8, width = .5, height = 2.5\n  ) +\n  labs(\n    title = \"Example {scwplot} Usage with MPG Dataset\",\n    subtitle = glue::glue(\n      \"Plotting the Effect of Engine Displacement on \",\n      \"Highway Miles Per Gallon, Split by Cylinders\"\n    ),\n    caption = \"Source: EPA (https://fueleconomy.gov)\",\n    x = \"Engine Displacement (in Litres)\", y = \"Miles per Gallon\"\n  ) +\n  scale_fill_qualitative(palette = \"scw\") +\n  theme_scw()\n```\n\nThe package includes the following functionality:\n\n- Themes - functions for controlling the display of plot theme elements.\n- Colour - functions for incorporating the use of colour to display data.\n- Images - functions for adding images (i.e., brand images and logos) to plots.\n- Format - functions for applying final formatting to a plot and saving it to file.\n\n\n## Acknowledgements\n\nThis package takes a lot of inspiration from the NHS-R community's [NHSRtheme](https://github.com/nhs-r-community/NHSRtheme) package and BBC's [bbplot](https://github.com/bbc/bbplot) package. The code, the structure of the repository, and the approach taken to achieve the package's goals has been influenced by [ggplot2](https://ggplot2.tidyverse.org/) and [ggsci](https://nanx.me/ggsci/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhs-south-central-and-west%2Fscwplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhs-south-central-and-west%2Fscwplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhs-south-central-and-west%2Fscwplot/lists"}