Interactive web visualization for CART decision trees built with R's rpart. Export an rpart model to JSON, then explore its structure, node statistics, variable importance, and performance in the browser — rendered with D3.js.
- Interactive D3 tree: pan, zoom, drag nodes, hover for tooltips
- Decision-path breadcrumb from root to any node
- Node detail: impurity, complexity, deviance, class probabilities
- Variable-importance chart
- Model-performance panel: confusion matrix + classification statistics
- Failure-definition overlay for domain context
- Classification (Gini) and regression (MSE) trees
- Dataset selector for comparing multiple models
There are two ways to use ArborView. Pick whichever suits you — the documentation applies to either.
Visit ArborView, hosted on Vercel. Nothing to install — the example datasets are built in, so just pick one from the header dropdown.
You need Node.js v18 or later (npm is included). Then clone the repo, install the dependencies, and start the dev server:
git clone https://github.com/jrkasprzyk/ArborView.git
cd ArborView
npm install
npm run devOpen the URL Vite prints (typically http://localhost:5173) and pick a dataset from the header dropdown.
To export and view your own models, you also need the R language and a local clone — see How to export an rpart model.
New here? Start with the tutorial.
Documentation follows the Diátaxis framework:
| Guide | Read it when you want to… |
|---|---|
| Tutorial | Learn the app from zero by running it and exploring a tree. |
| How-to guides | Solve a specific task: export a model, add performance, recolor classes, register a dataset. |
| Reference | Look up exact details: JSON schema, R script arguments, npm scripts, CSS variables, tech stack. |
| Explanation | Understand the concepts: CART, impurity, the two colour systems, the export-to-D3 architecture. |
Contributors coming from R or Python also have language primers: TypeScript for R users · TypeScript for Python users.
MIT — Copyright 2026 Joseph Kasprzyk, Zach Carpenter, Edith Zagona