Skip to main content
100%

tut8

✓ Published0🌍 Public
BBenHeubl
Last edited Feb 13, 2020
Created on Feb 13, 2020

This visualization shows a decision-tree model of Brexit voting patterns, mapping how various factors predict the percentage of Leave votes across the UK. The code builds a classification tree using the `rpart` function on the `Brexit` dataset, with `Percent.Leave` as the target variable. The tree’s branching structure reveals the key demographic or geographic splits that separate Remain- and Leave-leaning areas. The rendering relies on R’s base graphics to display the tree nodes and splits, while the user must supply a complexity parameter (`cp`) to control tree depth and overfitting.

AI-generated description

Similar vizzes