Skip to content

Commit

Permalink
Merge pull request #18 from DataScienceScotland/final-changes
Browse files Browse the repository at this point in the history
Final changes for v0.1 release
  • Loading branch information
alice-hannah authored May 30, 2023
2 parents 09ba7b9 + 64a376f commit 1871b1c
Show file tree
Hide file tree
Showing 9 changed files with 601 additions and 555 deletions.
11 changes: 11 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

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:

``` 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.


## Where to ask for help

* If it's a question: Ask the Scottish Government [R Yammer community](https://web.yammer.com/main/groups/eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI2MzQ4MzE2NjczIn0).
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/render-readme.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on: push

name: render-readme

jobs:
render-readme:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rmarkdown, local::.

- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit rendered README
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add README.md man/figures/README-*
git commit -m "Re-build README.md" || echo "No changes to commit"
git push origin || echo "No changes to commit"
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sgplot
Title: Graphic Styles and Colours for Scottish Government Plots
Version: 0.0.0.9001
Version: 0.1.0
Authors@R: c(
person("Scottish Government", , , "statistics.enquiries@gov.scot", role = c("cph", "fnd")),
person("Alice", "Byers", , "alice.byers@gov.scot", c("aut", "cre"))
Expand Down
14 changes: 3 additions & 11 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
## sgplot 0.0.0.9001
# sgplot 0.1.0

* Developments to `theme_sg()` following testing feedback
* Add [cookbook](https://datasciencescotland.github.io/sgplot/articles/cookbook.html) to pkgdown site
* Add [saving charts](https://datasciencescotland.github.io/sgplot/articles/saving.html) article to pkgdown site
* Add `mm_to_inch()` helper function
* Remove use of showtext package for Google font

## sgplot 0.0.0.9000

* First development version for testing
* First package release
* Add functions to create accessible plots using `ggplot2`
* Add pkgdown site (https://datasciencescotland.github.io/sgplot)
* Add pkgdown site (https://datasciencescotland.github.io/sgplot) including [cookbook](https://datasciencescotland.github.io/sgplot/articles/cookbook.html)
6 changes: 4 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ More information about the package and its functions can be found on the [sgplot

## Installation

To install sgplot, the remotes package is required. The package can then be installed directly from GitHub with:
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).

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(
Expand All @@ -51,7 +53,7 @@ remotes::install_github(
)
```

Network security settings may prevent `remotes::install_github()` from working. If this is the case, sgplot can 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/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:

``` r
remotes::install_local(
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ contains lots of examples.

## Installation

To install sgplot, the remotes package is required. The package can then
be installed directly from GitHub with:
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).

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(
Expand All @@ -43,9 +51,7 @@ remotes::install_github(
)
```

Network security settings may prevent `remotes::install_github()` from
working. If this is the case, sgplot can be installed by downloading the
[zip of the
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
Expand Down
Loading

0 comments on commit 1871b1c

Please sign in to comment.