salmon visualization!!

English version is below

今日のTokyo global RでLTしてきました!

本当は部屋探しの話をする予定だったのですが、googleVisパッケージが余りにも感動的だったので、以前研究に使っていた養殖サーモンのデータをvisualizeするという話をしました。

縦軸をpriceにして、横軸をweightで、左下にある再生ボタンを押すと、サーモンの価格が数年ごとに上がって下がってを繰り返す周期性を示しながら、だんだんと生産量を伸ばしてゆくさまが見られます。

ハンスロスリングとか好きなので、普通に自分のなじみのあるデータがこんな風に動いてくれてむっちゃ興奮しました。仕事でも使ってみたいっすね。

————————————————————————————–

So I talked about visualization of salmon aquaculture a bit in Tokyo.R which is user conference for R.

Just before listen Mr. Markus’s presentation, I was going to talk about “How to find your room with R”, but I just changed my mind 5mins before my presentation, since the google chart was so fascinated.

So here is the chart what I created on R with “googleVis” package. It was quite easy to produce this interactive chart. You just need some kind of panel data then follow the example code.

library(googleVis)
data <- read.csv(“data/salmon panel data.csv”, header = TRUE)
M <- gvisMotionChart(data, “county”, “year”)
print(M, file=”salma.html”)
 

My code is like this. So I made the following plot and got excited so much then could not stop to talk about it…

 

カテゴリー: R, データマイニング パーマリンク

コメントを残す