Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logo #10

Merged
merged 10 commits into from
Sep 11, 2024
Merged

Logo #10

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.