Metadata-Version: 2.4
Name: ggshu
Version: 0.2.0
Summary: Grammar of Graphics for shu.
Author-email: carrascomj <carrascomurielj@gmail.com>
Maintainer-email: carrascomj <carrascomurielj@gmail.com>
Project-URL: Homepage, https://biosustain.github.io/shu/
Project-URL: Documentation, https://biosustain.github.io/shu/plotting.html
Project-URL: Repository, https://github.com/biosustain/shu.git
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
Requires-Dist: pandas==1.5.2
Requires-Dist: numpy==1.24.0
Requires-Dist: IPython==8.18.1
Requires-Dist: requests>=2.32.3
Provides-Extra: dev
Requires-Dist: pytest==7.2.0; extra == "dev"
Requires-Dist: black==22.10.0; extra == "dev"
Requires-Dist: isort==5.10.1; extra == "dev"

ggshu
=====

  This is alpha software and very subject to change!

A utility package to transform dataframes into `shu <https://github.com/biosustain/shu/>`_ data.

.. image:: schema.png
  :alt: Shu grammar graphics schema.


Example
-------

.. code-block:: python

    (
        ggmap(
            df_cond,
            aes(reaction="r", color="flux", size="flux", condition="cond", y="kcat"),
        )
        # plot flux to color and size of reactions
        + geom_arrow()
        # plot kcat as histogram shows on left side of reactions
        + geom_hist(side="left")
        # plot conc to color of metabolites
        + geom_metabolite(aes=aes(color="conc", metabolite="m"))
        # plot km as density plots shows on hover on metabolites
        + geom_kde(aes=aes(y="km"), mets=True)
    ).to_json("shu_data")
