Skip to content

Commit

Permalink
Merge pull request #10 from best-practice-and-impact/logo
Browse files Browse the repository at this point in the history
Logo
  • Loading branch information
Senths02 authored Sep 11, 2024
2 parents a1cd5ef + 90d738a commit 748d19c
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 148 deletions.
19 changes: 5 additions & 14 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ ex2_alt <- paste("A bar chart with white background,",

afcharts is an R package for creating accessible plots by the Government Analysis Function. Currently, functions are available for styling ggplot2 plots.

The package has been developed using the [Government Analysis Function Data Visualisation guidance](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/).
afcharts should be used in conjunction with these guidance documents.

More information about the package and its functions can be found on the [afcharts website](https://best-practice-and-impact.github.io/afcharts).
In particular, the [cookbook](https://best-practice-and-impact.github.io/afcharts/articles/cookbook.html) contains lots of examples.
The package has been developed using the [Government Analysis Function Data Visualisation guidance](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/). afcharts should be used in conjunction with these guidance documents.

More information about the package and its functions can be found on the [afcharts website](https://best-practice-and-impact.github.io/afcharts). In particular, the [cookbook](https://best-practice-and-impact.github.io/afcharts/articles/cookbook.html) contains lots of examples.

## Installation

Expand All @@ -53,7 +50,6 @@ remotes::install_github(
)
```


## Getting Started

Once installed, afcharts can be loaded using the `library()` function:
Expand All @@ -68,10 +64,9 @@ Help files for each function in the package can be found on the [References](htt
?theme_af()
```


### Use afcharts as default

The easiest way to use afcharts is by adding `use_afcharts()` to the beginning of your R script, Rmarkdown document or Shiny app code. This function will set a number of defaults to ggplot2 geoms, use afcharts colour palettes and use `theme_af()`.
The easiest way to use afcharts is by adding `use_afcharts()` to the beginning of your R script, Rmarkdown document or Shiny app code. This function will set a number of defaults to ggplot2 geoms, use afcharts colour palettes and use `theme_af()`.

#### Example 1: Plot with one colour using ggplot2 defaults

Expand Down Expand Up @@ -116,18 +111,14 @@ 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://best-practice-and-impact.github.io/afcharts/articles/accessibility.html#other-accessibility-considerations).

**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://best-practice-and-impact.github.io/afcharts/articles/accessibility.html#other-accessibility-considerations).

## Acknowledgments

The afcharts package is based on the [sgplot](https://scotgovanalysis.github.io/sgplot/index.html) package, written by Alice Hannah.


## Licence

Unless stated otherwise, the codebase is released under [the MIT License](LICENSE). This covers both the codebase and any sample code in the documentation.

The documentation is [© Crown copyright](http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/) and available under the terms
of the [Open Government 3.0](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) licence.
The documentation is [© Crown copyright](http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/) and available under the terms of the [Open Government 3.0](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) licence.
204 changes: 70 additions & 134 deletions man/figures/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 748d19c

Please sign in to comment.