df <- data.frame(
site = c("London","London","London","Paris","Paris","Paris",
"Berlin","Berlin","Berlin","Rome","Rome","Rome",
"Madrid","Madrid","Madrid"),
cluster = c("Cluster1","Cluster2","Cluster3","Cluster1","Cluster2","Cluster3",
"Cluster1","Cluster2","Cluster3","Cluster1","Cluster2","Cluster3",
"Cluster1","Cluster2","Cluster3"),
value = c(0.95, 0.05, 0, 0.50, 0.45, 0.05, 0.10, 0.45, 0.45, 0,
0.01, 0.99, 0, 0.75, 0.25)
)
build_pie_chart(df, location = "London")
Run the code above in your browser using DataLab