Sunburst chart drawing: R language & excel

The sunburst chart is also called the sun chart. It is a kind of ring mosaic diagram. Each ring represents the proportional data of the same level. The closer the ring to the origin, the higher the level, and the innermost circle represents the level. top of the structure. In addition to the rings, the sunburst map has several 'rays' emanating from the origin, which show the context between different levels of data. The sunburst diagram starts from the center of the circle and advances outward layer by layer, which can clearly reflect the path of events, and is mostly used for path analysis.

The sunburstR package in the R language can realize the drawing of the sunburst graph. After install.packages('sunburstR'), use its own data visit-sequences.csv to demonstrate:

install.packages('sunburstR')
library(sunburstR)
sequence <- read.csv(
  system.file('examples/visit-sequences.csv',
              package = 'sunburstR'),
  header = F,stringsAsFactors = F)
head(sequence)
sunburst(sequence)

  

 

 

 

 

Excel 2010 operation demonstration:

The first step is to select the grouped summary data and insert a doughnut chart.

 

 The second step, select the doughnut chart, right-click to select the data.

 

 

The third step is to add a data series and select detailed grouped data.

 Step 4: Add the total amount data to the sunburst chart according to the operation of the third step, then fill the total amount data with a pie chart, and finally add the data label and display it as follows:

Excel 2016 has its own sunburst chart in the insert chart, which can be directly inserted and generated with one click.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reference source:

http://www.360doc.com/content/17/0502/07/35804869_650214788.shtml

http://blog.sina.com.cn/s/blog_49f78a4b0102wg92.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325219992&siteId=291194637