Skip to contents

Purpose

An R package to help automatically create reproducible spreadsheets that adhere to the latest guidance (June 2021) on releasing statistics in spreadsheets from the Best Practice and Impact Division (BPID) of the UK’s Government Statistical Service (GSS).

Visit the {a11ytables} website for documentation.

The package is under (opinionated) active development. Please see the NEWS file for the latest changes. Please leave your ideas as issues or raise a pull request.

Install

Install the package from GitHub using {remotes}.

install.packages("remotes")  # if not already installed
remotes::install_github("co-analysis/a11ytables")
library(a11ytables)  # attach package

The package depends on {openxlsx} and {pillar}, which are also installed with {a11ytables}.

Use

To create a spreadsheet:

  1. Use create_a11ytable()
  2. Pass the output to generate_workbook()
  3. Pass the output to openxlsx::saveWorkbook()

For more help, use browseVignettes("a11ytables") or visit the website. You can read the:

This package also includes an RStudio Addin that inserts pre-filled demo skeletons of the {a11ytables} workflow.

BPID released a Python package called ‘gptables’ that has been updated given the latest best-practice guidance. {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 fulfill a Reproducible Analytical Pipeline by automating the generation of compliant spreadsheets for publication.

Code of Conduct

Please note that the {a11ytables} project is released with a Contributor Code of Conduct.

© Crown Copyright, 2022, 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 Govenrment Licence