本例使用的财务报表数据是2012年和2011年的资产负债表,其最高层级是资产、负债和权益三大类。在其下又分若干子项。上图的矩形面积显示了各子项的金额大小,而颜色显示了数据在时间上的变化。可以从中观察到苹果公司将大部分资产投入到长期投资中,而右侧负债所占比例相当的小,而且权益类方面留存收益所占比例最大。从动态比较角度来看,相对于2011年,2012年的现金持有下降,而无形资产大幅度上升。
本例所用的原始数据,整理后的数据和代码:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(treemap) | |
data <- read.csv('d:/sheet1.csv',T) | |
tmPlot(data, | |
index=c("item", "subitem"), | |
vSize="time1206", | |
vColor="time1106", | |
type="comp", | |
title='苹果公司财务报表可视化', | |
palette='RdBu') |
没有评论:
发表评论