An R package to help automatically create reproducible spreadsheets that adhere to the guidance on releasing statistics in spreadsheets from the UK government’s Analysis Function, with a focus on accessibility (‘a11y’).
Visit the {a11ytables} website for documentation.
This package is not yet capable of creating perfectly accessible spreadsheets but will help with the bulk of the work needed. Users of this packages should refer back to the main spreadsheet guidance or the spreadsheet accessibility checklist after using it to make sure nothing has been missed. Please email [email protected] if you use the package so they can monitor use and the outputs produced.
The package is under (opinionated) active development. Please see the NEWS file for the latest changes.
To contribute, please add an issue or a pull request after reading the code of conduct and contributing guidance.
Install the package from GitHub using {remotes}.
install.packages("remotes") # if not already installed
remotes::install_github(
repo = "co-analysis/a11ytables", # GitHub user/repository
dependencies = TRUE, # install required/suggested packages
build_vignettes = TRUE # generate vignette documentation
)
library(a11ytables) # attach package
If you need an earlier version of the package, you should replace the
repo
argument call with, for example,
"co-analysis/[email protected]"
for the version 0.1.0 release.
The package depends on {openxlsx} and {pillar}, which are also installed with {a11ytables}.
To create a spreadsheet:
- Use
create_a11ytable()
- Pass the output to
generate_workbook()
- Pass the output to
openxlsx::saveWorkbook()
Run ?function_name
or visit the package
website
for function documentation. For long-form documentation, visit the
package website or run
browseVignettes("a11ytables")
to read the:
- introductory vignette to get started
- accessbility checklist vignette to see how the package complies with best-practice guidance
- terminology vignette to understand the nomenclature of spreadsheet terms as used in this package
- package structure vignette to see how the package works under the hood
This package also includes an RStudio Addin that inserts pre-filled demo skeletons of the {a11ytables} workflow.
The ONS’s Analysis Standards and Pipelines team has released a Python package called ‘gptables’. {a11ytables} is an independent effort that offers a native R solution that is very similar to gptables in its outputs, though there are some differences in implementation. You can always use gptables in R via the {reticulate} package if you prefer.
{a11ytables} can help you fulfil a Reproducible Analytical Pipeline by automating the generation of compliant spreadsheets for publication.
Please note that the {a11ytables} project is released with a Contributor Code of Conduct.
© Crown Copyright, 2023, Cabinet Office.
This work is Crown Copyright. The source code for the software is released under the MIT licence as per the the UK Government Licensing Framework and the GDS Way licensing guidance. The documentation for the software is released under the Open Government Licence.