Skip to content

Commit

Permalink
Merge pull request #28 from ScotGovAnalysis/change-org-name
Browse files Browse the repository at this point in the history
Change DataScienceScotland to ScotGovAnalysis
  • Loading branch information
alice-hannah authored Jan 12, 2024
2 parents a1b6e67 + 9cdd8e7 commit 4a88616
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ You can fix typos, spelling mistakes, or grammatical errors in the documentation

## Bigger changes

If you want to make a bigger change, it's a good idea to first [file an issue](https://github.com/DataScienceScotland/sgplot/issues/new) and make sure the package maintainers agree that it’s needed.
If you want to make a bigger change, it's a good idea to first [file an issue](https://github.com/ScotGovAnalysis/sgplot/issues/new) and make sure the package maintainers agree that it’s needed.

If you’ve found a bug, please file an issue that illustrates the bug with a minimal [reprex](https://www.tidyverse.org/help/#reprex).

### Pull request process

* If you work in Scottish Government, request write access to the repository by contacting the [package maintainers](https://datasciencescotland.github.io/sgplot/authors.html#authors). If you are external, fork the repository.
* If you work in Scottish Government, request write access to the repository by contacting the [package maintainers](https://ScotGovAnalysis.github.io/sgplot/authors.html#authors). If you are external, fork the repository.

* Clone the repository onto your computer and crate a Git branch for your changes.

Expand Down
10 changes: 5 additions & 5 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ Thanks for using sgplot!

## Try these first

* If you want to find out more about any of sgplot's functions; help files can be found on the [References](https://datasciencescotland.github.io/sgplot/reference) page of the package website. Alternatively, type `?function_name` into the RStudio console. For example:
* If you want to find out more about any of sgplot's functions; help files can be found on the [References](https://ScotGovAnalysis.github.io/sgplot/reference) page of the package website. Alternatively, type `?function_name` into the RStudio console. For example:

``` r
?theme_sg()
```

* If you need help with `ggplot2`, it might be helpful to look at the [sgplot cookbook](https://datasciencescotland.github.io/sgplot/articles/cookbook.html) which contains lots of example code to create various types of chart. The [ggplot2 website](https://ggplot2.tidyverse.org/index.html) may also be helpful.
* If you need help with `ggplot2`, it might be helpful to look at the [sgplot cookbook](https://ScotGovAnalysis.github.io/sgplot/articles/cookbook.html) which contains lots of example code to create various types of chart. The [ggplot2 website](https://ggplot2.tidyverse.org/index.html) may also be helpful.


## Where to ask for help

* If it's a question: Ask the Scottish Government [R Yammer community](https://web.yammer.com/main/groups/eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI2MzQ4MzE2NjczIn0).

* If it's a bug: [file an issue](https://github.com/DataScienceScotland/sgplot/issues/new) on GitHub.
* If it's a bug: [file an issue](https://github.com/ScotGovAnalysis/sgplot/issues/new) on GitHub.

* If you're not sure or aren't comfortable with either of these options, contact the [package maintainers](https://datasciencescotland.github.io/sgplot/authors.html#authors).
* If you're not sure or aren't comfortable with either of these options, contact the [package maintainers](https://ScotGovAnalysis.github.io/sgplot/authors.html#authors).

Before opening a new issue, be sure to [search issues and pull requests](https://github.com/DataScienceScotland/sgplot/issues) to make sure the bug hasn't been reported and/or already fixed in the development version.
Before opening a new issue, be sure to [search issues and pull requests](https://github.com/ScotGovAnalysis/sgplot/issues) to make sure the bug hasn't been reported and/or already fixed in the development version.
By default, the search will be pre-populated with `is:issue is:open`.
You can [edit the qualifiers](https://help.github.com/articles/searching-issues-and-pull-requests/) (e.g. `is:pr`, `is:closed`) as needed.
For example, you'd simply remove `is:open` to search **all** issues in the repo, open or closed.
Expand Down
2 changes: 1 addition & 1 deletion .lintr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
linters: linters_with_defaults() # see vignette("lintr")
exclude: list("^#| fig.alt = ")
exclude: "^#| fig.alt = "
encoding: "UTF-8"
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Authors@R: c(
Description: Standard ggplot theme and colour palettes for use in Scottish Government.
License: MIT + file LICENSE
URL:
https://github.com/DataScienceScotland/sgplot,
https://DataScienceScotland.github.io/sgplot
BugReports: https://github.com/DataScienceScotland/sgplot/issues
https://github.com/ScotGovAnalysis/sgplot,
https://ScotGovAnalysis.github.io/sgplot
BugReports: https://github.com/ScotGovAnalysis/sgplot/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Fix issue where `scale_` functions didn't work without the package being loaded (#26)

* Add [examples of using non-default colour palettes](https://datasciencescotland.github.io/sgplot/articles/cookbook.html#using-different-colour-palettes) (#24)
* Add [examples of using non-default colour palettes](https://ScotGovAnalysis.github.io/sgplot/articles/cookbook.html#using-different-colour-palettes) (#24)

* Add link to `theme_sg()` in `use_sgplot()` help file

Expand All @@ -20,4 +20,4 @@

* Add functions to create accessible plots using `ggplot2`

* Add pkgdown site (https://datasciencescotland.github.io/sgplot) including [cookbook](https://datasciencescotland.github.io/sgplot/articles/cookbook.html)
* Add pkgdown site (https://ScotGovAnalysis.github.io/sgplot) including [cookbook](https://ScotGovAnalysis.github.io/sgplot/articles/cookbook.html)
16 changes: 8 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ex2_alt <- paste("A bar chart with white background,",

<!-- badges: start -->

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/DataScienceScotland/sgplot)](https://github.com/DataScienceScotland/sgplot/releases/latest) [![R build status](https://github.com/DataScienceScotland/sgplot/workflows/R-CMD-check/badge.svg)](https://github.com/DataScienceScotland/sgplot/actions)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/ScotGovAnalysis/sgplot)](https://github.com/ScotGovAnalysis/sgplot/releases/latest) [![R build status](https://github.com/ScotGovAnalysis/sgplot/workflows/R-CMD-check/badge.svg)](https://github.com/ScotGovAnalysis/sgplot/actions)

<!-- badges: end -->

Expand All @@ -37,26 +37,26 @@ sgplot is an R package for creating accessible plots in the Scottish Government.
The package has been developed using the [Government Analysis Function Data Visualisation guidance](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/) and uses accessible colour palettes from the [Scottish Government Design System](https://designsystem.gov.scot/guidance/charts/data-visualisation-colour-palettes).
sgplot should be used in conjunction with these guidance documents.

More information about the package and its functions can be found on the [sgplot website](https://DataScienceScotland.github.io/sgplot).
In particular, the [cookbook](https://DataScienceScotland.github.io/sgplot/articles/cookbook.html) contains lots of examples.
More information about the package and its functions can be found on the [sgplot website](https://ScotGovAnalysis.github.io/sgplot).
In particular, the [cookbook](https://ScotGovAnalysis.github.io/sgplot/articles/cookbook.html) contains lots of examples.
Slides are also available for an internal [presentation given to statisticians and analysts](https://alicebyers5.github.io/presentations-and-blogs/2023-06-19_sgplot/slides.html).


## Installation

If you are working within the Scottish Government network, you can install sgplot in the same way as with other R packages. The easiest way to do this is by using the [pkginstaller](https://github.com/DataScienceScotland/pkginstaller/tree/main) add-in. Further guidance is available on [eRDM](https://erdm.scotland.gov.uk:8443/documents/A42404229/details).
If you are working within the Scottish Government network, you can install sgplot in the same way as with other R packages. The easiest way to do this is by using the [pkginstaller](https://github.com/ScotGovAnalysis/pkginstaller/tree/main) add-in. Further guidance is available on [eRDM](https://erdm.scotland.gov.uk:8443/documents/A42404229/details).

Alternatively, sgplot can be installed directly from GitHub. Note that this method requires the remotes package and may not work from within the Scottish Government network.

``` r
remotes::install_github(
"DataScienceScotland/sgplot",
"ScotGovAnalysis/sgplot",
upgrade = "never",
build_vignettes = TRUE
)
```

Finally, sgplot can also be installed by downloading the [zip of the repository](https://github.com/DataScienceScotland/sgplot/archive/main.zip) and running the following code, replacing the section marked `<>` (including the arrows themselves) with the location of the downloaded zip:
Finally, sgplot can also be installed by downloading the [zip of the repository](https://github.com/ScotGovAnalysis/sgplot/archive/main.zip) and running the following code, replacing the section marked `<>` (including the arrows themselves) with the location of the downloaded zip:

``` r
remotes::install_local(
Expand All @@ -75,7 +75,7 @@ Once installed, sgplot can be loaded using the `library()` function:
library(sgplot)
```

Help files for each function in the package can be found on the [References](https://datasciencescotland.github.io/sgplot/reference) page of the package website. Alternatively, type `?function_name` into the RStudio console. For example:
Help files for each function in the package can be found on the [References](https://ScotGovAnalysis.github.io/sgplot/reference) page of the package website. Alternatively, type `?function_name` into the RStudio console. For example:

``` r
?theme_sg()
Expand Down Expand Up @@ -129,7 +129,7 @@ gapminder |>
```

**Note on use of titles, subtitles and captions** <br>
Titles, subtitles and captions have been embedded in these example charts for demonstration purposes. However, for accessibility reasons, it is usually preferable to provide titles in the body of the page rather than embedded within the image of the plot. More information is available in the [accessibility article](https://datasciencescotland.github.io/sgplot/articles/accessibility.html#other-accessibility-considerations).
Titles, subtitles and captions have been embedded in these example charts for demonstration purposes. However, for accessibility reasons, it is usually preferable to provide titles in the body of the page rather than embedded within the image of the plot. More information is available in the [accessibility article](https://ScotGovAnalysis.github.io/sgplot/articles/accessibility.html#other-accessibility-considerations).

## Licence

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<!-- badges: start -->

[![GitHub release (latest by
date)](https://img.shields.io/github/v/release/DataScienceScotland/sgplot)](https://github.com/DataScienceScotland/sgplot/releases/latest)
date)](https://img.shields.io/github/v/release/ScotGovAnalysis/sgplot)](https://github.com/ScotGovAnalysis/sgplot/releases/latest)
[![R build
status](https://github.com/DataScienceScotland/sgplot/workflows/R-CMD-check/badge.svg)](https://github.com/DataScienceScotland/sgplot/actions)
status](https://github.com/ScotGovAnalysis/sgplot/workflows/R-CMD-check/badge.svg)](https://github.com/ScotGovAnalysis/sgplot/actions)

<!-- badges: end -->

Expand All @@ -24,9 +24,9 @@ System](https://designsystem.gov.scot/guidance/charts/data-visualisation-colour-
sgplot should be used in conjunction with these guidance documents.

More information about the package and its functions can be found on the
[sgplot website](https://DataScienceScotland.github.io/sgplot). In
[sgplot website](https://ScotGovAnalysis.github.io/sgplot). In
particular, the
[cookbook](https://DataScienceScotland.github.io/sgplot/articles/cookbook.html)
[cookbook](https://ScotGovAnalysis.github.io/sgplot/articles/cookbook.html)
contains lots of examples. Slides are also available for an internal
[presentation given to statisticians and
analysts](https://alicebyers5.github.io/presentations-and-blogs/2023-06-19_sgplot/slides.html).
Expand All @@ -36,7 +36,7 @@ analysts](https://alicebyers5.github.io/presentations-and-blogs/2023-06-19_sgplo
If you are working within the Scottish Government network, you can
install sgplot in the same way as with other R packages. The easiest way
to do this is by using the
[pkginstaller](https://github.com/DataScienceScotland/pkginstaller/tree/main)
[pkginstaller](https://github.com/ScotGovAnalysis/pkginstaller/tree/main)
add-in. Further guidance is available on
[eRDM](https://erdm.scotland.gov.uk:8443/documents/A42404229/details).

Expand All @@ -46,14 +46,14 @@ the Scottish Government network.

``` r
remotes::install_github(
"DataScienceScotland/sgplot",
"ScotGovAnalysis/sgplot",
upgrade = "never",
build_vignettes = TRUE
)
```

Finally, sgplot can also be installed by downloading the [zip of the
repository](https://github.com/DataScienceScotland/sgplot/archive/main.zip)
repository](https://github.com/ScotGovAnalysis/sgplot/archive/main.zip)
and running the following code, replacing the section marked `<>`
(including the arrows themselves) with the location of the downloaded
zip:
Expand All @@ -75,9 +75,9 @@ library(sgplot)
```

Help files for each function in the package can be found on the
[References](https://datasciencescotland.github.io/sgplot/reference)
page of the package website. Alternatively, type `?function_name` into
the RStudio console. For example:
[References](https://ScotGovAnalysis.github.io/sgplot/reference) page of
the package website. Alternatively, type `?function_name` into the
RStudio console. For example:

``` r
?theme_sg()
Expand Down Expand Up @@ -142,7 +142,7 @@ demonstration purposes. However, for accessibility reasons, it is
usually preferable to provide titles in the body of the page rather than
embedded within the image of the plot. More information is available in
the [accessibility
article](https://datasciencescotland.github.io/sgplot/articles/accessibility.html#other-accessibility-considerations).
article](https://ScotGovAnalysis.github.io/sgplot/articles/accessibility.html#other-accessibility-considerations).

## Licence

Expand Down
4 changes: 2 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: https://datasciencescotland.github.io/sgplot
url: https://scotgovanalysis.github.io/sgplot

template:
bootstrap: 5
Expand All @@ -21,7 +21,7 @@ authors:
<i class='fas fa-envelope' aria-hidden='true'></i>\
<span class='visually-hidden'>Email Scottish Government></span></a>\
&nbsp;&nbsp;\
<a href='https://github.com/DataScienceScotland'>\
<a href='https://github.com/scotgovanalysis'>\
<i class='fab fa-github' aria-hidden='true'></i>\
<span class='visually-hidden'>Scottish Government GitHub profile></span>\
</a>"
Expand Down
6 changes: 3 additions & 3 deletions man/sgplot-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vignettes/colours.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ The `grey` in this palette does not meet the required colour contrast with an of

## Analysis Function colour palettes

The Analysis Function guidance also contains [suggested colour palettes](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-4). These are also provided in sgplot, however the Scottish Government palettes are used by default. To use an Analysis Function palette, set `palette_type = "af"` when using any of the `scale_` [colour functions](https://datasciencescotland.github.io/sgplot/reference/index.html#colours).
The Analysis Function guidance also contains [suggested colour palettes](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-4). These are also provided in sgplot, however the Scottish Government palettes are used by default. To use an Analysis Function palette, set `palette_type = "af"` when using any of the `scale_` [colour functions](https://scotgovanalysis.github.io/sgplot/reference/index.html#colours).


### Main palette
Expand Down Expand Up @@ -169,8 +169,8 @@ There may be instances where you'd like to use a different colour palette.
If so, this should be carefully considered to ensure it meets accessibility requirements.
The Analysis Function guidance outlines [appropriate steps for choosing your own accessibile colour palette](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-9) and should be used.

An example of how to use an alternative colour palette is provided in the [cookbook](https://datasciencescotland.github.io/sgplot/articles/cookbook.html#using-your-own-colour-palette).
However, if you use a different palette regularly and feel it would be useful for this to be added to sgplot, please make a suggestion as per the [contributing guidance](https://datasciencescotland.github.io/sgplot/CONTRIBTUING.html).
An example of how to use an alternative colour palette is provided in the [cookbook](https://scotgovanalysis.github.io/sgplot/articles/cookbook.html#using-your-own-colour-palette).
However, if you use a different palette regularly and feel it would be useful for this to be added to sgplot, please make a suggestion as per the [contributing guidance](https://scotgovanalysis.github.io/sgplot/CONTRIBTUING.html).


## Viewing Palettes in R
Expand All @@ -191,4 +191,4 @@ sgplot::sg_colour_palettes$main
sgplot::af_colour_palettes
```

Examples of how to apply these palettes to ggplot2 charts are available in both the [cookbook](https://datasciencescotland.github.io/sgplot/articles/cookbook.html) and the reference files for `scale_` [colour functions](https://datasciencescotland.github.io/sgplot/reference/index.html#colours).
Examples of how to apply these palettes to ggplot2 charts are available in both the [cookbook](https://scotgovanalysis.github.io/sgplot/articles/cookbook.html) and the reference files for `scale_` [colour functions](https://scotgovanalysis.github.io/sgplot/reference/index.html#colours).
4 changes: 2 additions & 2 deletions vignettes/cookbook.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ knitr::opts_chunk$set(

This cookbook provides examples of the code used to produce various chart types using sgplot. There are also examples to demonstrate how to apply further customisation to sgplot charts.

If there is a chart type or task which you think would be useful to include here, please [submit a suggestion](https://github.com/DataScienceScotland/sgplot/issues/new?assignees=alicebyers5&labels=documentation&title=Cookbook+suggestion).
If there is a chart type or task which you think would be useful to include here, please [submit a suggestion](https://github.com/scotgovanalysis/sgplot/issues/new?assignees=alicebyers5&labels=documentation&title=Cookbook+suggestion).

**use_sgplot** <br>
The examples in this cookbook use the sgplot theme and colour functions explicitly, however it may be easier to make use of the `use_sgplot()` function if your charts all require a similar style. More information on `use_sgplot` can be found on the [homepage](https://datasciencescotland.github.io/sgplot/#use-sgplot-as-default).
The examples in this cookbook use the sgplot theme and colour functions explicitly, however it may be easier to make use of the `use_sgplot()` function if your charts all require a similar style. More information on `use_sgplot` can be found on the [homepage](https://scotgovanalysis.github.io/sgplot/#use-sgplot-as-default).

**Note on use of titles, subtitles and captions** <br>
Titles, subtitles and captions have been embedded in the charts in this cookbook for demonstration purposes. However, for accessibility reasons, it is usually preferable to provide titles in the body of the page rather than embedded within the image of the plot.
Expand Down
Loading

0 comments on commit 4a88616

Please sign in to comment.