#if (!require("sunburstR")) devtools::install_github("timelyportfolio/sunburstR")
library(sunburstR)
school=read.csv("school.csv")
school
A&S |
Philosophy |
Ethics |
30 |
A&S |
Philosophy |
Sustainability |
40 |
A&S |
Biology |
Botany |
20 |
A&S |
Biology |
Zoology |
35 |
A&S |
Chemistry |
Organic |
29 |
A&S |
Chemistry |
Inorganic |
45 |
Business |
Accounting |
|
75 |
Business |
BusAdm |
Finance |
28 |
Business |
BusAdm |
Marketing |
75 |
## Example |
14 continued |
|
|
school$combo=paste(school$School,school$Department,school$Specialization,sep="-")
school$combo=gsub("-$","",school$combo)
head(school,1)
A&S |
Philosophy |
Ethics |
30 |
A&S-Philosophy-Ethics |
myburst=sunburst(school[,c(5,4)])
saveWidget(myburst,file = "myburst.html",selfcontained = TRUE)