iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 25
0
Data Technology

職場老鳥的資料科學初體驗-R語言專案實作紀錄系列 第 25

(Day25)用Shiny套件打造互動式資料視覺化網站(下)-進階UI開發

  • 分享至 

  • xImage
  •  

Work with the HTML UI

When writing R, you add content with tags functions
tags$h1() ~
tags$a() ~

Create a layout

https://ithelp.ithome.com.tw/upload/images/20180110/20107033DskOfacvQM.png
重點提示

  • Position elements in a grid, or stack them in layers.
  • Use fluidRow() to arrange elements in rows
  • Use column() to arrange elements in columns
  • Column takes width and offset arguments

Assemble layers of panels

tabPanel()
https://ithelp.ithome.com.tw/upload/images/20180110/20107033IOuEeBeUJ1.png
https://ithelp.ithome.com.tw/upload/images/20180110/201070331HMAYNB4ME.png
navlistPanel()
https://ithelp.ithome.com.tw/upload/images/20180110/20107033wOOpdfPQIR.png

重點提示

  • Panels group elements into a single unit for aesthetic or functional reasons
  • Use tabPanel() to create a stackable panel
  • Use tabsetPanel() to arrange tab panels into a stack with tab navigation
  • Use navlistPanel() to arrange tab panels into a stack with sidebar navigation

Use a prepackaged layout

sidebarLayout()
https://ithelp.ithome.com.tw/upload/images/20180110/20107033R5IHVQuVWO.png
navBarPage()
https://ithelp.ithome.com.tw/upload/images/20180110/20107033FV1uf52rxa.png
Page vs Panel
https://ithelp.ithome.com.tw/upload/images/20180110/20107033VLRDomYBIu.png
navbarMenu()
https://ithelp.ithome.com.tw/upload/images/20180110/20107033zdMb6IpG64.png
dashboardPage()
https://ithelp.ithome.com.tw/upload/images/20180110/20107033r9GwWmIGtJ.png
重點提示

  • Use sidebarLayout() with sidebarPanel() and mainPanel() to quickly create a sidebar design.
  • Use fixedPanel() with fixedrow() to create a fixed (non-fluid) design
  • Use navbarPage() with navbarMenu() to create "multipage" app
  • Use the shinyDashboard package to create dashboard layouts

小結

https://ithelp.ithome.com.tw/upload/images/20180110/20107033b1neOztYJR.png

Shiny

整體shiny 主要學習方向
https://ithelp.ithome.com.tw/upload/images/20180110/20107033kRDtTHnevj.png

參考資料

How to start with Shiny – Part 3
[shiny-cheatsheet copy - RStudio](shiny-cheatsheet copy - RStudio)


上一篇
(Day24)用Shiny套件打造互動式資料視覺化網站(中)-Reactive觸發與回應作業
下一篇
(Day26) 專案實作-用Shiny發布互動式網站
系列文
職場老鳥的資料科學初體驗-R語言專案實作紀錄30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言