ENGLISH

Engineering Production-Grade Shiny Apps (Chapman & Hall/CRC The R Series)

Book information

Publisher
Chapman and Hall/CRC
Year
2021
ISBN
0367444674, 9780367444679
Language
english
Format
PDF
Filesize
27 MB (28107414 bytes)
Edition
1
Pages
364\399
Time added
2021-09-19 13:52:06

Description

From the Reviews "[This book] contains an excellent blend of both Shiny-specific topics … and practical advice from software development that fits in nicely with Shiny apps. You will find many nuggets of wisdom sprinkled throughout these chapters…." Eric Nantz, Host of the R-Podcast and the Shiny Developer Series (from the Foreword) "[This] book is a gradual and pleasant invitation to the production-ready shiny apps world. It …exposes a comprehensive and robust workflow powered by the {golem} package. [It] fills the not yet covered gap between shiny app development and deployment in such a thrilling way that it may be read in one sitting…. In the industry world, where processes robustness is a key toward productivity, this book will indubitably have a tremendous impact." David Granjon, Sr. Expert Data Science, Novartis Presented in full color, Engineering Production-Grade Shiny Apps helps people build production-grade shiny applications, by providing advice, tools, and a methodology to work on web applications with R. This book starts with an overview of the challenges which arise from any big web application project: organizing work, thinking about the user interface, the challenges of teamwork and the production environment. Then, it moves to a step-by-step methodology that goes from the idea to the end application. Each part of this process will cover in detail a series of tools and methods to use while building production-ready shiny applications. Finally, the book will end with a series of approaches and advice about optimizations for production. Features Focused on practical matters: This book does not cover Shiny concepts, but practical tools and methodologies to use for production. Based on experience: This book is a formalization of several years of experience building Shiny applications. Original content: This book presents new methodologies and tooling, not just a review of what already exists. Engineering Production-Grade Shiny Apps covers medium to advanced content about Shiny, so it will help people that are already familiar with building apps with Shiny, and who want to go one step further. Cover Half Title Series Page Title Page Copyright Page Dedication Contents List of Figures Introduction Foreword Application presentation I. Building Successful {shiny} Apps 1. About Successful {shiny} Apps 1.1. A (very) short introduction to {shiny} 1.2. What is a complex {shiny} application? 1.2.1. Reaching the cliff of complexity 1.2.2. Balancing complexities 1.2.3. Assessing code complexity 1.2.4. Production-grade software engineering 1.3. What is a successful {shiny} app? 1.3.1. It exists 1.3.2. It is accurate 1.3.3. It is usable 1.3.4. It is immortal 2. Planning Ahead 2.1. Working with a “long-term” mindset 2.1.1. Prepare for success 2.1.2. Develop with the KISS principle 2.2. Working as a team: Tools and structure 2.2.1. From the tools point of view 2.2.2. From the team point of view 3. Structuring Your Project 3.1. {shiny} app as a package 3.1.1. What is in a production-grade {shiny} app? 3.1.2. Resources 3.2. Using {shiny} modules 3.2.1. Why {shiny} modules? 3.2.2. When to use {shiny} modules 3.2.3. A practical walkthrough 3.2.4. Communication between modules 3.3. Structuring your app 3.3.1. Business logic and application logic 3.3.2. Small is beautiful (bis repetita) 3.3.3. Conventions matter 4. Introduction to {golem} 4.1. What is {golem}? 4.2. Understanding {golem} app structure 4.2.1. DESCRIPTION and NAMESPACE 4.2.2. R/ 4.2.3. golem-config 4.2.4. inst/app/www/ 4.2.5. dev/ 4.2.6. man/ 5. The Workflow 5.1. Step 1: Design 5.2. Step 2: Prototype 5.3. Step 3: Build 5.4. Step 4: Strengthen 5.5. Step 5: Deploy II. Step 1: Design 6. UX Matters 6.1. Simplicity is gold 6.1.1. How we read the web: Scanning content 6.1.2. Building a self-evident app (or at least self-explanatory) 6.2. The danger of feature-creep 6.2.1. What is feature-creep? 6.2.2. Too much reactivity 6.2.3. Too much interactivity 6.3. Web accessibility 6.3.1. About accessibility 6.3.2. Making your app accessible 6.3.3. Evaluating your app accessibility and further reading 7. Don’t Rush into Coding 7.1. Designing before coding 7.1.1. The urge to code 7.1.2. Knowing where to search 7.1.3. About concept map 7.2. Ask questions 7.2.1. About the end users 7.2.2. Building personas 7.2.3. Pre-existing code-base 7.2.4. Deployment III. Step 2: Prototype 8. Setting up for Success with {golem} 8.1. Create a {golem} 8.2. Setting things up with dev/01_start.R 8.2.1. Fill the DESCRIPTION and set options 8.2.2. Set common files 8.2.3. Use recommended elements 8.2.4. Add utility functions 8.2.5. Changing the favicon 8.3. Setting infrastructure for prototyping 8.3.1. Add modules in dev/02_dev.R 8.3.2. Add CSS and JS files 9. Building an “ipsum-app” 9.1. Prototyping is crucial 9.1.1. Prototype, then polish 9.1.2. The “UI first” approach 9.2. Prototyping {shiny} 9.2.1. Fast UI prototyping with {shinipsum} 9.2.2. Using {fakir} for fake data generation 9.3. Building with RMarkdown 9.3.1. Define the content of the application 9.3.2. Using the Rmd files as a laboratory notebook 9.3.3. Rmd, Vignettes, and documentation first IV. Step 3: Build 10. Building the App with {golem} 10.1. Add dependencies 10.1.1. Package dependencies 10.1.2. Importing packages and functions 10.2. Submodules and utility functions 10.3. Add tests 10.4. Documentation and code coverage 10.4.1. Vignette 10.4.2. Code coverage and continuous integration 10.5. Using {golem} dev functions V. Step 4: Strengthen 11. Build Yourself a Safety Net 11.1. Testing your app 11.1.1. Testing the business logic 11.1.2. shiny::testServer() 11.1.3. Testing the interactive logic 11.1.4. Testing the app load 11.2. A reproducible environment 11.2.1. {renv} 11.2.2. Docker 12. Version Control 12.1. Using version control with Git 12.1.1. Why version control? 12.1.2. Git basics: add - commit - push - pull 12.1.3. About branches 12.1.4. Issues 12.2. Git integration 12.2.1. With RStudio 12.2.2. As part of a larger world 12.2.3. About git-flow 12.2.4. Further readings on Git 12.3. Automated testing VI. Step 5: Deploy 13. Deploy Your Application 13.1. Before deployment checklist 13.2. Sharing your app as a package 13.2.1. Install on your machine 13.2.2. Share as a built package 13.3. Deploying apps with {golem} 13.3.1. RStudio environments 13.3.2. Docker VII. Optimizing 14. The Need for Optimization 14.1. Build first, then optimize 14.1.1. Identifying bottlenecks 14.1.2. Do you need faster functions? 14.1.3. Don’t sacrifice readability 14.2. Tools for profiling 14.2.1. Profiling R code 14.2.2. Profiling {shiny} 14.2.3. More resources about web-page performance 15. Common Application Caveats 15.1. Reactivity anti-patterns 15.1.1. Reactivity is awesome… until it is not 15.1.2. observe vs observeEvent 15.1.3. Building triggers and watchers 15.1.4. Using R6 as data storage 15.1.5. Logging reactivity with {whereami} 15.2. R does too much 15.2.1. Rendering the UI from the server side 15.2.2. Too much data in memory 15.3. Reading data 15.3.1. Including data in your application 15.3.2. Reading external datasets 15.3.3. Using external databases 15.3.4. Data-source checklist 16. Optimizing {shiny} Code 16.1. Optimizing R code 16.2. Caching elements 16.2.1. What is caching? 16.2.2. Native caching in R 16.2.3. Caching in {shiny} 16.3. Asynchronous in {shiny} 16.3.1. How to 17. Using JavaScript 17.1. Introduction 17.2. A quick introduction to JavaScript 17.2.1. About JavaScript 17.2.2. Including JavaScript code in your app 17.2.3. Understanding HTML, class, and id 17.2.4. Querying in Vanilla JavaScript 17.2.5. About DOM events 17.2.6. About jQuery and jQuery selectors 17.3. Client-side JavaScript 17.3.1. Common patterns 17.3.2. Where to put them: Back to JavaScript Events 17.4. JavaScript {shiny} communication 17.4.1. From R to JavaScript 17.4.2. From JavaScript to R 17.5. About {shinyjs} JS functions 17.6. One last thing: API calls 17.7. Learn more about JavaScript 17.7.1. {shiny} and JavaScript 17.7.2. JavaScript basics 17.7.3. jQuery 17.7.4. Intermediate/advanced JavaScript 18. A Gentle Introduction to CSS 18.1. What is CSS? 18.1.1. About CSS 18.1.2. {shiny}’s default: fluidPage() 18.2. Getting started with CSS 18.2.1. About CSS syntax 18.2.2. CSS selectors 18.2.3. CSS properties 18.3. Integrate CSS files in your {shiny} app 18.3.1. Inline CSS 18.3.2. Writing in a tags$style() 18.3.3. Including external files 18.3.4. Using R packages 18.4. External resources VIII. Appendix Appendix A - Use Case: Building an App from Start to Finish Appendix B - Session Info Index

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

2008 · PDF