{"id":13788882,"url":"https://github.com/trangdata/treeheatr","last_synced_at":"2025-12-12T02:24:01.291Z","repository":{"id":48956405,"uuid":"257112111","full_name":"trangdata/treeheatr","owner":"trangdata","description":"Heatmap-integrated Decision Tree Visualizations","archived":false,"fork":false,"pushed_at":"2023-07-17T14:57:12.000Z","size":43620,"stargazers_count":59,"open_issues_count":1,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-09T20:12:30.502Z","etag":null,"topics":["dataviz","decision-trees","ggplot","heatmap","r","visualization"],"latest_commit_sha":null,"homepage":"https://trangdata.github.io/treeheatr","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trangdata.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-19T22:06:53.000Z","updated_at":"2025-09-06T18:53:53.000Z","dependencies_parsed_at":"2023-07-12T14:47:39.403Z","dependency_job_id":"bcd11bbe-7832-4645-a52d-c31d01d1b5ee","html_url":"https://github.com/trangdata/treeheatr","commit_stats":null,"previous_names":["trang1618/treeheatr"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/trangdata/treeheatr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangdata%2Ftreeheatr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangdata%2Ftreeheatr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangdata%2Ftreeheatr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangdata%2Ftreeheatr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trangdata","download_url":"https://codeload.github.com/trangdata/treeheatr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trangdata%2Ftreeheatr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27645857,"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-12-10T02:00:12.818Z","response_time":54,"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":["dataviz","decision-trees","ggplot","heatmap","r","visualization"],"created_at":"2024-08-03T21:00:55.139Z","updated_at":"2025-12-12T02:24:01.264Z","avatar_url":"https://github.com/trangdata.png","language":"R","readme":"---\noutput: rmarkdown::github_document\n---\n\n[![vignette](https://img.shields.io/badge/-Vignette-green?logo=spinnaker)](https://trangdata.github.io/treeheatr/articles/explore.html)\n[![documentation](https://img.shields.io/badge/-Documentation-purple?logo=read-the-docs)](https://trangdata.github.io/treeheatr/reference/)\n![github-action-status](https://github.com/trangdata/treeheatr/actions/workflows/R-CMD-check.yaml/badge.svg)\n`r badger::badge_cran_download(\"treeheatr\", \"grand-total\", \"blue\")`\n`r badger::badge_doi(\"10.1093/bioinformatics/btaa662\", \"yellow\")`\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  fig.path = \"man/figures/\"\n)\n```\n\n# treeheatr \u003cimg src=\"man/figures/logo.png\" style=\"float:right; height:175px;\"\u003e\n\n*Your decision tree may be cool, but what if I tell you you can make it hot?*\n\n## Changes in treeheatr 0.2.0\n\nThe first argument of `heat_tree()`, `data` is now replaced with `x`, \nwhich can be a dataframe (or tibble), \na party (or constparty) object specifying the precomputed tree,\nor partynode object specifying the customized tree. \n`custom_tree` argument is no longer needed.\n\n## Install \n\nPlease make sure your version of R \u003e= 3.5.0 before installation.\n\nYou can install the released version of **treeheatr** from CRAN with:\n```{r, eval=FALSE}\ninstall.packages('treeheatr')\n```\n\nOr the development version from GitHub with remotes:\n```{r, eval=FALSE}\n# install.packages('remotes') # uncomment to install devtools\nremotes::install_github('trangdata/treeheatr')\n```\n\n## Examples\n\n### Penguin dataset\n\nThese data were collected and made available by [Dr. Kristen Gorman](https://www.uaf.edu/cfos/people/faculty/detail/kristen-gorman.php) and the [Palmer Station, Antarctica LTER](https://pal.lternet.edu/).\n\nClassification of different types of penguin species.\n\n```{r, fig.height=3.5, message=FALSE, warning=FALSE, dpi = 200}\nlibrary(treeheatr)\n\nheat_tree(penguins, target_lab = 'species')\n```\n\n### Wine recognition dataset\n\nClassification of different cultivars of wine.\n\n```{r fig.height=3.5, dpi = 200}\nheat_tree(wine, target_lab = 'Type', target_lab_disp = 'Cultivar')\n```\n\n## Citing treeheatr\n\nIf you use treeheatr in a scientific publication, please consider citing the following paper:\n\nLe TT, Moore JH. \n[treeheatr: an R package for interpretable decision tree visualizations](https://doi.org/10.1093/bioinformatics/btaa662). \n_Bioinformatics_. 2020 Jan 1.\n\nBibTeX entry:\n```bibtex\n@article{le2020treeheatr,\n  title={treeheatr: an R package for interpretable decision tree visualizations},\n  author={Le, Trang T and Moore, Jason H},\n  journal={Bioinformatics},\n  year={2020},\n  doi=\"10.1093/bioinformatics/btaa662\"\n}\n```\n\n## How to Use\n\n**treeheatr** incorporates a heatmap at the terminal node of your decision tree.\nThe basic building blocks to a **treeheatr** plot are (yes, you guessed it!) a decision tree and a heatmap.\n\n* The decision tree is computed with `partykit::ctree()` and plotted with the well-documented and flexible [**ggparty**](https://cran.r-project.org/package=ggparty/) package.\nThe tree parameters can be passed to **ggparty** functions via the `heat_tree()` and `draw_tree()` functions of **treeheatr**.\nMore details on different **ggparty** *geoms* can be found [here](https://github.com/martin-borkovec/ggparty).\n\n* The heatmap is shown with `ggplot2::geom_tile()`.\nThe user may choose to cluster the samples within each leaf node or the features across all samples.\n\nMake sure to check out the [vignette](https://trangdata.github.io/treeheatr/articles/explore.html) for detailed information on the usage of **treeheatr**.\n\nPlease [open an issue](https://github.com/trangdata/treeheatr/issues/new) for questions related to **treeheatr** usage, bug reports or general inquiries.\n\nThank you very much for your support!\n\n## Acknowledgements\n\nPackage hex was made with [Midjourney](https://www.midjourney.com/home/) and thus inherits a [CC BY-NC 4.0 license](https://creativecommons.org/licenses/by-nc/4.0/legalcode).\n","funding_links":[],"categories":["ggplot"],"sub_categories":["Domain-specific"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrangdata%2Ftreeheatr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrangdata%2Ftreeheatr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrangdata%2Ftreeheatr/lists"}