data11<- read.csv("C:/Users/u6032404/OneDrive/backup 9.9.19/MJ/Minute/Data Collection Matrix/data11.csv",header = T)
head(data11)
## X root group subgroup subsubgroup value
## 1 5 root Social Social Fuctioning (SFQ) 8
## 2 2 root Social Family Family (FRS-V) 6
## 3 3 root Social Family Family (DRRI-2) 12
## 4 4 root Social Culture/Community (PIUQ-SF 6) 6
## 5 6 root Biological Symptoms (NSI) 22 22
## 6 7 root Biological Symptoms (PHQ-15) 15
## pathString
## 1 world/Social/Social Fuctioning
## 2 world/Social/Family
## 3 world/Social/Family
## 4 world/Social/Community/Culture
## 5 world/Biological/b
## 6 world/Biological/c
# Circlepacker package
library(circlepackeR)
# Change the format. This use the data.tree library. This library needs a column that looks like root/group/subgroup/..., so I build it
library(data.tree)
data11$pathString <- paste("world", data11$group, data11$subgroup, data11$subsubgroup, sep = "/")
population <- as.Node(data11)
# Make the plot
#circlepackeR(population, size = "value")
# You can custom the minimum and maximum value of the color range.
p <- circlepackeR(population, size = "value", color_min = "hsl(7689,72%,12%)", color_max = "hsl(6631,61%,82%)")
p
#https://jeromefroe.github.io/circlepackeR/