Skip to content

Commit

Permalink
Merge pull request #229 from best-practice-and-impact/newExamples
Browse files Browse the repository at this point in the history
New examples
  • Loading branch information
danmilne1 authored Jul 3, 2024
2 parents 8a368ea + 27ca98b commit 7bac368
Show file tree
Hide file tree
Showing 21 changed files with 501 additions and 1,902 deletions.
48 changes: 28 additions & 20 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,53 @@ examples_ directory of the package.
.. todo:: Replace datasets in examples with open online datasets


.. automodule:: gptables.examples.iris
.. automodule:: gptables.examples.penguins_minimal

.. literalinclude:: ../../gptables/examples/iris.py
.. literalinclude:: ../../gptables/examples/penguins_minimal.py
:language: python
:lines: 15-
:lines: 16-

.. automodule:: gptables.examples.penguins_minimal_alternate

.. automodule:: gptables.examples.iris_cover
.. literalinclude:: ../../gptables/examples/penguins_minimal_alternate.py
:language: python
:lines: 16-

.. literalinclude:: ../../gptables/examples/iris_cover.py
.. literalinclude:: ../../gptables/examples/penguins_multiple_sheets.py
:language: python
:lines: 12-
:lines: 16-

.. automodule:: gptables.examples.penguins_theme

.. literalinclude:: ../../gptables/examples/penguins_theme.py
:language: python
:lines: 16-

.. automodule:: gptables.examples.iris_additional_formatting
.. automodule:: gptables.examples.penguins_cover

.. literalinclude:: ../../gptables/examples/iris_additional_formatting.py
.. literalinclude:: ../../gptables/examples/penguins_cover.py
:language: python
:lines: 24-
:lines: 14-

.. automodule:: gptables.examples.penguins_notes

.. automodule:: gptables.examples.cor_multiple_sheets
.. literalinclude:: ../../gptables/examples/penguins_notes.py
:language: python
:lines: 15-

.. literalinclude:: ../../gptables/examples/cor_multiple_sheets.py
.. automodule:: gptables.examples.penguins_additional_formatting

.. literalinclude:: ../../gptables/examples/penguins_additional_formatting.py
:language: python
:lines: 16-
:lines: 25-




R Usage
-------

Use of ``gptables`` in R requires use of python via the `reticulate <https://rstudio.github.io/reticulate/>`_ package.

This example demonstrates basic usage of the pacakge in R. More advanced usage will
use a similar approach to python (above), but may require use of ``reticulate`` functions
to create/modify python objects.

.. literalinclude:: ../../gptables/examples/iris.R
:language: R

R users may also be interested in the `a11ytables <https://co-analysis.github.io/a11ytables/>`_
However we recommend use of the `a11ytables <https://co-analysis.github.io/a11ytables/>`_
R package, developed by the Cabinet Office.
20 changes: 0 additions & 20 deletions gptables/examples/R_install_dependency_file.R

This file was deleted.

74 changes: 0 additions & 74 deletions gptables/examples/cor_multiple_sheets.py

This file was deleted.

Loading

0 comments on commit 7bac368

Please sign in to comment.