{"id":33167167,"url":"https://github.com/rrrlw/TDAstats","last_synced_at":"2025-11-20T18:01:37.169Z","repository":{"id":56936639,"uuid":"130141540","full_name":"rrrlw/TDAstats","owner":"rrrlw","description":"R pipeline for computing persistent homology in topological data analysis. See https://doi.org/10.21105/joss.00860 for more details.","archived":false,"fork":false,"pushed_at":"2021-11-23T15:56:42.000Z","size":972,"stargazers_count":40,"open_issues_count":4,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-03T07:04:48.812Z","etag":null,"topics":["cran","data-science","ggplot2","homology","homology-calculations","homology-computation","joss","persistent-homology","pipeline","r","r-package","r-packages","ripser","tda","topological-data-analysis","topology","topology-visualization","visualization"],"latest_commit_sha":null,"homepage":"https://rrrlw.github.io/TDAstats","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rrrlw.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-19T01:22:46.000Z","updated_at":"2025-09-29T13:09:18.000Z","dependencies_parsed_at":"2022-08-21T05:50:45.425Z","dependency_job_id":null,"html_url":"https://github.com/rrrlw/TDAstats","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rrrlw/TDAstats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrlw%2FTDAstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrlw%2FTDAstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrlw%2FTDAstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrlw%2FTDAstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrrlw","download_url":"https://codeload.github.com/rrrlw/TDAstats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrrlw%2FTDAstats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283159045,"owners_count":26788985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-07T02:00:06.343Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cran","data-science","ggplot2","homology","homology-calculations","homology-computation","joss","persistent-homology","pipeline","r","r-package","r-packages","ripser","tda","topological-data-analysis","topology","topology-visualization","visualization"],"created_at":"2025-11-16T00:00:44.022Z","updated_at":"2025-11-20T18:01:37.164Z","avatar_url":"https://github.com/rrrlw.png","language":"R","funding_links":[],"categories":["Frameworks and Libs"],"sub_categories":["R"],"readme":"# TDAstats: topological data analysis in R \u003cimg src=\"man/figures/HexTDA.png\" align=\"right\" height=\"175\" width=\"151\"/\u003e\n\n[![Travis-CI Build Status](https://travis-ci.org/rrrlw/TDAstats.svg?branch=master)](https://travis-ci.org/rrrlw/TDAstats)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/rrrlw/TDAstats?branch=master\u0026svg=true)](https://ci.appveyor.com/project/rrrlw/TDAstats)\n[![Coverage Status](https://img.shields.io/codecov/c/github/rrrlw/TDAstats/master.svg)](https://codecov.io/github/rrrlw/TDAstats?branch=master)\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![CRAN version](http://www.r-pkg.org/badges/version/TDAstats)](https://CRAN.R-project.org/package=TDAstats)\n[![CRAN Downloads](http://cranlogs.r-pkg.org/badges/grand-total/TDAstats)](https://CRAN.R-project.org/package=TDAstats)\n\n[![JOSS DOI](http://joss.theoj.org/papers/10.21105/joss.00860/status.svg)](https://doi.org/10.21105/joss.00860)\n[![Zenodo DOI](https://zenodo.org/badge/130141540.svg)](https://zenodo.org/badge/latestdoi/130141540)\n\n## Overview\n\nTDAstats is an R pipeline for computing persistent homology in topological data analysis.\n\n## Installation\n\nTo install TDAstats, run the following R code:\n```r\n# install from CRAN\ninstall.packages(\"TDAstats\")\n\n# install development version from GitHub\ndevtools::install_github(\"rrrlw/TDAstats\")\n\n# install development version with vignettes/tutorials\ndevtools::install_github(\"rrrlw/TDAstats\", build_vignettes = TRUE)\n```\n\n## Sample code\n\nThe following sample code creates two synthetic datasets, and calculates and visualizes their persistent homology to showcase the use of TDAstats.\n\n```r\n# load TDAstats\nlibrary(\"TDAstats\")\n\n# load sample datasets\ndata(\"unif2d\")\ndata(\"circle2d\")\n\n# calculate persistent homology for both datasets\nunif.phom \u003c- calculate_homology(unif2d, dim = 1)\ncirc.phom \u003c- calculate_homology(circle2d, dim = 1)\n\n# visualize first dataset as persistence diagram\nplot_persist(unif.phom)\n\n# visualize second dataset as topological barcode\nplot_barcode(circ.phom)\n```\n\nA more detailed tutorial can be found in the package vignettes or at [this Gist](https://gist.github.com/rrrlw/2fd22a834a883cb66454b1dabab9fdcb).\n\n## Functionality\n\nTDAstats has 3 primary goals:\n\n1.  *Calculation of persistent homology*: the C++\n[Ripser](https://github.com/Ripser/ripser)\nproject is a lightweight library for calculating persistent homology\nthat outpaces all of its competitors. Given the importance of computational\nefficiency, TDAstats naturally uses Ripser behind the scenes for homology\ncalculations, using the Rcpp package to integrate the C++ code into an R\npipeline (Ripser for R).\n\n2.  *Statistical inference of persistent homology*: persistent homology can be\nused in hypothesis testing to compare the topological structure of two point\nclouds. TDAstats uses a permutation test in conjunction with the Wasserstein\nmetric for nonparametric statistical inference.\n\n3.  *Visualization of persistent homology*: persistent homology is visualized\nusing two types of plots - persistence diagrams and topological barcodes.\nTDAstats provides implementations of both plot types using the\n[ggplot2](https://github.com/tidyverse/ggplot2)\nframework. Having ggplot2 underlying the plots confers many advantages to the\nuser, including generation of publication-quality plots and customization using\nthe ggplot object returned by TDAstats.\n\n## Contribute\n\nTo contribute to TDAstats, you can create issues for any bugs/suggestions on the [issues page](https://github.com/rrrlw/TDAstats/issues). You can also fork the TDAstats repository and create pull requests to add features you think will be useful for users.\n\n## Citation\n\nIf you use TDAstats, please consider citing the following (based on use):\n* **General use of TDAstats**: Wadhwa RR, Williamson DFK, Dhawan A, Scott JG. TDAstats: R pipeline for computing persistent homology in topological data analysis. *Journal of Open Source Software*. 2018; 3(28): 860. doi: [10.21105/joss.00860](https://doi.org/10.21105/joss.00860)\n* **TDAstats to calculate persistent homology (Ripser)**: Bauer U. Ripser: Efficient computation of Vietoris-Rips persistence barcodes. 2019; *arXiv*: 1908.02518.\n* **TDAstats to perform statistical test**: Robinson A, Turner K. Hypothesis testing for topological data analysis. *J Appl Comput Topol*. 2017; 1: 241.\n\n## Real-world applications, use cases, and mentions\n\n* Stenseke J. Persistent homology and the shape of evolutionary games. Journal of Theoretical Biology. 2021; 531: 110903. Link to [paper](https://www.sciencedirect.com/science/article/pii/S0022519321003222).\n* Torres-Espin A, Haefeli J, Ehsanian R, et al. Topological network analysis of patient similarity for precision management of acute blood pressure in spinal cord injury. eLife. 2021; 10: e68015. Link to [paper](https://elifesciences.org/articles/68015).\n* Somasundaram E, Litzler A, Wadhwa R, Owen S, Scott J. Persistent homology of tumor CT scans is associated with survival in lung cancer. Medical Physics. 2021; 48(11): 7043-7051. Link to [paper](https://aapm.onlinelibrary.wiley.com/doi/abs/10.1002/mp.15255) and [preprint](https://www.medrxiv.org/content/10.1101/2020.12.06.20244863v1).\n* Richardson M, Verma R, Singhania A, Tabone O, Das M, Rodrigue M, Leissner P, Woltmann G, Cooper A, O'Garra A, Haldar P. Blood transcriptional phenotypes of progressive latent M. tuberculosis infection inform novel signatures that improve prediction of tuberculosis risk. Cell Reports Medicine. 2021. Link to [paper](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3815986).\n* Perez-Moraga R, Fores-Martos J, Suay-Garcia B, Duval J-L, Falco A, Climent J. A COVID-19 Drug Repurposing Strategy through Quantitative Homological Similarities Using a Topological Data Analysis-Based Framework. Pharmaceutics. 2021; 13(4): 488. Link to [paper](https://www.mdpi.com/1999-4923/13/4/488).\n* Kandanaarachchi S, Hyndman RJ. Leave-one-out kernel density estimates for outlier detection. Monash University. 2021. Link to [paper](https://www.monash.edu/business/ebs/research/publications/ebs/wp02-2021.pdf).\n* Somasundaram EV, Brown SE, Litzler A, Scott JG, Wadhwa RR. Benchmarking R packages for calculation of persistent homology. R Journal. 2021; 13(1): 184-193. Link to [paper](https://journal.r-project.org/archive/2021/RJ-2021-033/RJ-2021-033.pdf).\n* Brochard A, Blaszczyszyn B, Mallat S, Zhang S. Particle gradient descent model for point process generation. 2020. arXiv:2010.14928. Link to [preprint](https://arxiv.org/abs/2010.14928).\n* Nguyen DQN, Xing L, Lin L. Community detection, pattern recognition, and hypergraph-based learning: approches using metric geometry and persistent homology. 2020. arXiv:2010.00435. Link to [preprint](https://arxiv.org/abs/2010.00435).\n* Pinto GVF. Motivic constructions on graphs and networks with stability results. Doctoral Thesis: Universidade Estadual Paulista Rio Claro \u0026 Ohio State University. 2020. Link to [thesis](http://hdl.handle.net/11449/192494).\n* Gommel M. A Machine Learning Exploration of Topological Data Analysis Applied to Low and High Dimensional fMRI Data. Doctoral Thesis: University of Iowa. 2019. doi: [10.17077/etd.005247](https://doi.org/10.17077/etd.005247). Link to [thesis](https://iro.uiowa.edu/discovery/fulldisplay/alma9983779398602771/01IOWA_INST:ResearchRepository?tags=scholar).\n* Mémoli F, Singhal K. A Primer on Persistent Homology of Finite Metric Spaces. Bulletin of Mathematical Biology. 2019; 81(7): 2074. Links to [paper](https://link.springer.com/article/10.1007/s11538-019-00614-z) and [preprint](https://arxiv.org/abs/1905.13400)\n* Srinivasan R, Chander A. Understanding Bias in Datasets using Topological Data Analysis. Fujitsu Laboratories of America. 2019. [Link](http://ceur-ws.org/Vol-2419/paper_9.pdf)\n* Kough D, Neuzil M, Simpson C, Glover R. Analyzing State of the Union Addresses using Topology. University of St. Thomas. 2019. [Link](https://www.stthomas.edu/media/collegeofartsandsciences/mathematics/pdf/camsummer2019/CAMReport2019TDANeuzilKoughSimpson.pdf)\n* Rickert J. A Mathematician's Perspective on Topological Data Analysis and R. 2018. [Link](https://rviews.rstudio.com/2018/11/14/a-mathematician-s-perspective-on-topological-data-analysis-and-r/)\n* [Blog post on Data Management](https://www.kaisataipale.net/blog/2019/02/22/data-management/)\n* [Analyzing finance data](https://github.com/kaitai/Example-with-TDAstats)\n* [R package for visualizing persistent homology](https://github.com/rrrlw/ggtda)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrrlw%2FTDAstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrrlw%2FTDAstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrrlw%2FTDAstats/lists"}