Tim G, in the comments, points out that there is an easier data structure now that can be used for the sunburst plot.
https://github.com/JohnCoene/echarts4r/issues/207#issuecomment-718524703
df <- data.frame(parents = c("","earth", "earth", "mars", "mars", "land", "land", "ocean", "ocean", "fish", "fish", "Everything", "Everything", "Everything"),
labels = c("Everything", "land", "ocean", "valley", "crater", "forest", "river", "kelp", "fish", "shark", "tuna", "venus","earth", "mars"),
value = c(0, 30, 40, 10, 10, 20, 10, 20, 20, 8, 12, 10, 70, 20))
# create a tree object
universe <- data.tree::FromDataFrameNetwork(df)
# use it in echarts4r
universe %>%
e_charts() %>%
e_sunburst()