Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Visualization with

Taiwan R user Group

陳奎銘 (Ben) benjamin0901@gmail.com

Why Visualization?





假設今天我想要觀察台股最近幾年的走勢...

[1] "TWII"





這樣鬼才看得懂...

plot of chunk unnamed-chunk-2

Why R?

R的視覺化軍火庫

靜態





假設今天有個阿宅想要辦聯誼...

在網路上看到...

立馬找出男女比例懸殊的幾個系





接下來,聯誼什麼的,就不干R的事囉~~~ 還是乖乖畫圖吧~~~





graphics

graphics plot of chunk unnamed-chunk-4

graphics

優點

教學

R Graphics





ggplot2

ggplot2 plot of chunk unnamed-chunk-5

ggplot2

起手式


缺點

教學

延伸閱讀





googleVis

googleVis

googleVis

-- R & Google Charts API

-- Visualize data with Google Chart Tools without manually upload data to Google.

-- data.frame

googleVis

優點


缺點

教學





rCharts

rCharts

rCharts

-- R與JavaScript的結合

-- 有一堆JavaScript的library:highchartsMorrisNVD3PolychartsRickshawxchartsLeaflet(for map)...

rCharts

install.package("devtools")
library(devtools)
install_github("rCharts", "ramnathv")

rCharts

優點


缺點

教學





shiny

shiny

-- 以R做網頁的工具

-- 幾乎只要會R就行

-- 互動式呈現資料

-- 支援各式繪圖工具:graphics、ggplot2、googleVis和rCharts

shiny

install.packages("shiny")
library(shiny)
runExample()
# Valid examples are '01_hello',
#'02_text','03_reactivity',
#'04_mpg','05_sliders','06_tabsets', 
#'07_widgets','08_html','09_upload',
#'10_download','11_timer'
runExample("01_hello")

教學

不想只在local端執行shiny的話...

回到之前的例子

graphics ggplot2
googleVis
rCharts

graphics

barplot(target1, beside=TRUE,legend=colnames(target1))

ggplot2

ggplot(aes(x=disp, y=number, fill=sex), data=target2)+
geom_bar(stat="identity", position="dodge")

googleVis

bar <- gvisColumnChart(target, xvar="disp", yvar=c("male","female"))
plot(bar)

rCharts

hPlot(number ~ disp, group = "sex", data = target2, type = "column")

googleVis ggplot2, rCharts
class: data.frame class: data.frame
graphics
class: matrix

偶爾也要關心一下台灣...

最近有個新聞

所得差距

二十等分位 vs. 五等分位 plot of chunk unnamed-chunk-14

低收入戶比例 plot of chunk unnamed-chunk-15

低收入戶分佈 (ggplot2::geom_polygon) plot of chunk unnamed-chunk-16

過年去台東玩吧~~

救救老殘窮...

出去玩之前,要衡量一下自己的包...

歷年薪資分佈(gVisMotionChart)

資料來源

主計處

內政部

台灣圖資

Taiwan R User Group

Thank you!!!

Use a spacebar or arrow keys to navigate