- Web Application Development with R Using Shiny(Third Edition)
- Chris Beeley Shitalkumar R. Sukhdeve
- 190字
- 2021-07-16 17:52:11
The Gapminder application
Now that we've got the basics, let's build a full application. Before we proceed, note that we will need to install a few packages—tidyverse, gapminder, leaflet, and ggmap. Each can be installed from CRAN (the official R package repository) using the code phrases install.packages("tidyverse"), install.packages("gapminder"), and so on. We will not install ggmap this way, though. At the time of writing, there is a bug in the CRAN version. We'll install the dev version instead, as shown in the following code:
install.packages("devtools")
library(devtools)
devtools::install_github("dkahle/ggmap")
The application is pretty simple to get us started, but it illustrates several important methods and principles in Shiny. It features tabbed output, which allows the user to select different inputs or groups, which are each kept on a separate tab. It features the standard Shiny layout—the sidebar layout—with inputs at the left and outputs in the main section. The three tabs give a textual summary, a line graph showing life expectancy over time, and a map with circles scaled to the life expectancy in each country. The application looks like the following screenshot:
- Spring Boot 2.0 Projects
- TCP/IP入門經(jīng)典(第5版)
- 局域網(wǎng)組建、管理與維護項目教程(Windows Server 2003)
- Building RESTful Web Services with Spring 5(Second Edition)
- 物聯(lián)網(wǎng)通信技術(shù)
- 圖解手機元器件維修技巧
- 6G:面向2030年的移動通信
- 6G無線網(wǎng)絡(luò)空口關(guān)鍵技術(shù)
- 物聯(lián)網(wǎng)工程導(dǎo)論(第3版)
- Hands-On Bitcoin Programming with Python
- 全聯(lián)網(wǎng)標識服務(wù)
- 移動互聯(lián)網(wǎng)新思維
- 工業(yè)以太網(wǎng)技術(shù):AFDX/TTE網(wǎng)絡(luò)原理、接口、互連與安全
- 移動互聯(lián)網(wǎng)環(huán)境下的核心網(wǎng)剖析及演進
- 物聯(lián)網(wǎng)與智慧廣電