library(xts) library(Quandl) T3_2<-Quandl("PIKETTY/T3_2") #並べ替え sortlist <- order(T3_2[,1]) dat <- T3_2[sortlist,] T3_2<-dat rownames(T3_2) <- c(1:nrow(T3_2)) #save("T3_2", file="T3_2.dat") #load("T3_2.dat") ##### T3_2 ##### #1 Year 年 #2 National capital Wn 国民資本 #3 incl. Land 土地 #4 incl. Housing 住宅 #5 incl. Other domestic capital assets その他の国内資本資産 #6 incl. Net foreign capital 純外国資本 #7 Public capital Wg 公的資本 #8 incl. Public assets 公的資産 #9 incl. Public debt 公的債務 #10 Private capital W 民間資本 #11 incl. private assets 民間資産 #12 incl. private debt 民間負債 library("plotrix") library(RColorBrewer) #png("Piketty3_2A.png",width=1000,height=800) stackpoly(T3_2[,3:6],ylim=c(0,800),axis4=F,main="フランスの資本 1700-2010年",col=brewer.pal(4,"Pastel1"), xaxlab=c("1700","1750","1780","1810","1850","1880","1910","1920","1950","1970","1990","2000","2010"),border="gray36",staxx=F,stack=TRUE) #boxed.labels(3,180,"土地",border=F,bg=NA,col="gray20") #boxed.labels(4,400,"住宅",border=F,bg=NA,col="gray20") #boxed.labels(4,600,"その他国内資本",border=F,bg=NA,col="gray20") #boxed.labels(6,670,"純外国資本",border=F,bg=NA,col="gray20") boxed.labels(c(3,4,4,6),c(180,400,600,670),c("土地","住宅","その他国内資本","純外国資本"),border=F,bg=NA,col="gray20",cex=2) #dev.off()
|