Web Application Development with R Using Shiny - Second Edition
eBook - ePub

Web Application Development with R Using Shiny - Second Edition

Chris Beeley

Buch teilen
  1. 194 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Web Application Development with R Using Shiny - Second Edition

Chris Beeley

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Integrate the power of R with the simplicity of Shiny to deliver cutting-edge analytics over the WebAbout This Book• Use Shiny's built-in functions to produce engaging user interfaces, and integrate them into your own web pages• Implement powerful user-contributed packages to access graphics from the web, make your own dashboards, use interactive maps, and more• Extend Shiny using JavaScript and jQuery with minimal coding using this handy, step-by-step guideWho This Book Is ForThis book is for anybody who wants to produce interactive data summaries over the web, whether you want to share them with a few colleagues or the whole world. No previous experience with R, Shiny, HTML, or CSS is required to begin using this book, although you should possess some previous experience with programming in a different language.What You Will Learn• Build interactive applications using Shiny's built-in widgets• Use the built-in layout functions in Shiny to produce user-friendly applications• Integrate Shiny applications with web pages and customize them using HTML and CSS• Harness the power of JavaScript and jQuery to customize your applications• Engage your users and build better analytics using interactive plots• Debug your applications using Shiny's built-in functions• Deliver simple and powerful analytics across your organization using Shiny dashboards• Share your applications with colleagues or over the Internet using cloud services or your own serverIn DetailR is a highly flexible and powerful tool for analyzing and visualizing data. Most of the applications built using various libraries with R are desktop-based. But what if you want to go on the web? Here comes Shiny to your rescue!Shiny allows you to create interactive web applications using the excellent analytical and graphical capabilities of R. This book will guide you through basic data management and analysis with R through your first Shiny application, and then show you how to integrate Shiny applications with your own web pages. Finally, you will learn how to finely control the inputs and outputs of your application, along with using other packages to build state-of-the-art applications, including dashboards.Style and approachLearn by doing! Each chapter includes code and examples to use and adapt for your own applications. As the chapters progress, the code and examples are built upon until you have all the materials required to build a large, complex, real-world analytics application.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Web Application Development with R Using Shiny - Second Edition als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Web Application Development with R Using Shiny - Second Edition von Chris Beeley im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Open Source Programming. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2016
ISBN
9781785289682

Web Application Development with R Using Shiny Second Edition


Table of Contents

Web Application Development with R Using Shiny Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with R and Shiny!
Installing R
The R console
Code editors and IDEs
Learning R
Getting help
Loading data
Data types and structures
Dataframes, lists, arrays, and matrices
Variable types
Functions
Objects
Base graphics and ggplot2
Bar chart
Line chart
Advanced tasks with dplyr and ggvis
Preparing the data
A simple interactive line plot
Installing Shiny and running the examples
Summary
2. Building Your First Application
Types of Shiny application
Interactive Shiny documents in RMarkdown
A minimal example of a fully Shiny application
ui.R of minimal example
A note on HTML helper functions
The finished interface
server.R of minimal example
The program structure
An optional exercise
Embedding applications in documents
Widget types
The Google Analytics application
The UI
Data processing
Reactive objects
Outputs
Text summary
Trend graphs
A map of users across the world
A note on the application code
An optional exercise
Advanced layout features
Summary
3. Building Your Own Web Pages with Shiny
Running the applications and code
Shiny and HTML
Custom HTML links in Shiny
ui.R
server.R
server.R – data preparation
server.R – the server definition
A minimal HTML interface
index.html
server.R
JavaScript and Shiny
Example 1 – reading and writing the DOM
ui.R
server.R
Example 2 – sending messages between client and server
ui.R
server.R
dropdownDepend.js
Take a step back and rewind
jQuery
index.html – the body
server.R
Exercise
Debugging
Bootstrap 3 and Shiny
Summary
4. Taking Control of Reactivity, Inputs, and Outputs
What's new in our application?
Downloading data from RGoogleAnalytics
Animation
Streamline the UI by hiding elements
Naming tabPanel elements
Beautiful tables with DataTable
Reactive user interfaces
The reactive user interface example – server.R
The reactive user interface example – ui.R
Progress bars
Advanced reactivity and data handling
Controlling the whole interface with submitButton()
Controlling specific inputs with the isolate() function
Running reactive functions over time
Using reactive objects and functions efficiently
More advanced topics in Shiny
Finely controlling inputs and outputs
Reading client information and GET requests in Shiny
Custom interfaces from GET strings
Advanced graphics options
Downloading graphics and reports
Downloadable reports with knitr
Downloading and uploading data
Debugging
Good practice when coding Shiny applications
Debugging functions
Summary
5. Advanced Applications I – Dashboards
Applications in this chapter
Version one – sidebar layout
Adding icons to your UI
Using shinyBS to add pop-ups and tooltips
ui.R
Adding a pop-up window to an output
Using shinythemes
Version two – grid layout (A)
ui.R
Version two – grid layout (B)
ui.R
Version three – navigation bar
ui.R
Version four – dashboard
Notifications
Info boxes
ui.R
Google Charts gauge
Resizing the google chart
ui.R
Summary
6. Advanced Applications II – Using JavaScript Libraries in Shiny Applications
The htmlwidgets package
The application framework
ui.R
Dygraphs
server.R
Dygraphs with a prediction
rCharts
d3heatmap
threejs
Summary
7. Sharing Your Creations
Sharing with the R community
Sharing over GitHub
An introduction to Git
Using Git and GitHub within Rstudio
Projects in RStudio
Sharing applications using Git
Sharing using .zip and .tar
Sharing with the world
Shinyapps.io
Shinyapps.io without RStudio
Shiny Server
Scoping, loading, and reusing data in Shiny applications
Temporary data input/output
Permanent data functions
Browser compatibility
Summary
Index

Web Application Development with R Using Shiny Second Edition

Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2013
Second edition: January 2016
Production reference: 1220116
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78217-434-9
www.packtpub.com

Credits

Author
Chris Beeley
Reviewer
Bogdan Rau
Commissioning Editor
Nadeem Bagban
Acquisition Editors
Shaon Basu
Divya Poojari
Content Development Editor
Susmita Sabat
Technical Editor
Dhiraj Chandanshive
Copy Editors
Dipti Mankame
Rashmi Sawant
Project Coordinator
Judie Jose
Proofreader
Safis Editing
Indexer
Tejal Daruwale Soni
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade

About the Author

Chris Beeley works for Nottinghamshire Healthcare NHS Trust as the lead analyst and programmer for staff and patient experience. He uses a variety of open source tools (PHP/MySQL, Apache, R, Shiny, and Ubuntu) to collect, collate, analyze, and report on patient and staff experience throughout the organization. He was the author of the previous edition of this book.
He has been a keen user of R and a passionate advocate of open source tools in research and healthcare settings, having completed his PhD. He has made extensive use of R (and Shiny) to automate analysis and report on a new patient feedback website. This was funded by a grant from the NHS Institute for Innovation and made in collaboration with staff, service users, and carers within the Trust, particularly individuals from the Involvement Centre.

Inhaltsverzeichnis