gptables
gptables copied to clipboard
Good Practice Tables - an XlsxWriter wrapper to write consistently formatted statistical tables to Excel.
Good Practice Tables (gptables)
.. image:: https://github.com/best-practice-and-impact/gptables/workflows/continuous-integration/badge.svg :target: https://github.com/best-practice-and-impact/gptables/actions :alt: Actions build status
.. image:: https://readthedocs.org/projects/gptables/badge/?version=latest :target: https://gptables.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
.. image:: https://badge.fury.io/py/gptables.svg :target: https://badge.fury.io/py/gptables :alt: PyPI release
gptables is an opinionated python package for spreadsheet production.
It produces .xlsx files from your pandas dataframes or using
reticulate in R. You define the mapping from your data to elements of the
table. It does the rest.
gptables uses the official guidance on good practice spreadsheets_.
It advocates a strong adherence to the guidance by restricting the range of operations possible.
The default theme gptheme should accommodate most use cases.
However, the Theme object allows development of custom themes, where other formatting is required.
gptables is developed and maintained by the Analysis Function. It can be
installed from PyPI or GitHub. The source code is maintained on GitHub.
Users may also be interested in a11ytables, an R native equivalent to
gptables, and csvcubed_, a package for turning data and metadata into
machine-readable CSV-W files.
.. _guidance on good practice spreadsheets: https://analysisfunction.civilservice.gov.uk/policy-store/releasing-statistics-in-spreadsheets/
.. _Analysis Function: https://analysisfunction.civilservice.gov.uk/
.. _PyPI: https://pypi.org/project/gptables/
.. _GitHub: https://github.com/best-practice-and-impact/gptables
.. _a11ytables: https://co-analysis.github.io/a11ytables/index.html
.. _csvcubed: https://gss-cogs.github.io/csvcubed-docs/external/
5 Simple Steps
-
You map your data to the elements of a
GPTable. -
You can define the format of each element with a custom
Theme, or simply use the default - gptheme. -
Optionally design a
Coverpage to provide information that relates to all of the tables in your Workbook. -
Optionally upload a
notes_tablewith information about any notes. -
You
write_workbookto win.