knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

{a11ytables}

Project Status: Active – The project has reached a stable, usable state and is being actively developed. CRAN
status R-CMD-check Codecov test
coverage

Purpose

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.

Accessibility

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 analysis.function@ons.gov.uk if you use the package so they can monitor use and the outputs produced.

Contribute

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

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/a11ytables@v0.1.0" for the version 0.1.0 release.

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()

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:

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

Related projects

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.

Code of Conduct

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

Copyright and Licensing

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



matt-dray/a11ytables documentation built on May 31, 2024, 2:39 p.m.