rrrlw/TDAstats

stat and geom layers

Closed this issue · 4 comments

Would it make sense to supplement the plot_*() shorthands with stat_*() and geom_*() layers that perform the transformation and visualization duties separately? This would allow users to

  • produce plots using recognizable and (more) customizable ggplot2 syntax
  • render alternative visualizations of birth–death PH data
  • visualize data generated by other means (e.g. via construction of a Čech complex) in persistence and barcode diagrams

Since the plot_*() functions don't require a specific class of data frames (just recognizable column names), this could, i think, be done without any changes to current functionality.

rrrlw commented

Yes, this is an excellent point, and I have been developing a potential package (tentatively named ggtda) that implements the mentioned stats and geoms, but it's turning out to be more challenging that I expected :/ will link to the repo once a development version is ready; although I will be pretty inactive for the next few weeks, if you're interested in contributing to ggtda, comment below and I'll be happy to invite you to the repo as a collaborator!

rrrlw commented

Currently, any 3-by-n numeric matrix with columns named "dimension", "birth", and "death" (I don't think order matters) should be compatible with the plot_persist and plot_barcode functions, although I will take your suggestion and attempt to generalize them to make plotting easier for persistent homology calculated outside of TDAstats

You're right, most of what i itemized can be done currently, which i realized after posting. Though i do think/agree that the functionality becomes more accessible when it fits into the existing popular framework.

I'm excited to hear about ggtda! Do you anticipate incorporating TDA methods beyond persistence homology as they are developed, e.g. statistical Reeb graphs? I'd be delighted to work with you on it!

rrrlw commented

Issue is being addressed with the ggtda repo.