Coder Social home page Coder Social logo

advanced-user-interfaces-for-shiny-developers's Introduction

Advanced-User-Interfaces-for-Shiny-Developers

Disclaimer: this repository is under review by the erum::Conf 2020 program committee (and will be removed if not accepted)

by the Scientific Computing and Consulting Group, Novartis


๐Ÿ—“๏ธ May 30, 2020
โฐ 09:00 - 17:00 (?) ๐Ÿจ @ Politecnico


Workshop Links


Overview

In the past two years, there were various Shiny focused workshops introducing basic as well as advanced topics such as modules and Javascript/R interactions. However, handling advanced user interfaces was never an emphasis. Clients often desire custom designs, yet this generally exceeds core features of Shiny. We recognized that R App developers lacking a significant background in web development may have found this requirement to be overwhelming. Consequently, the aim of this workshop is to provide participants the necessary knowledge to extend Shiny's layout, input widgets and include the new components in a novel modular framework. The workshop is organized into four parts. We first dive into the {htmltools} package, providing functions to create and manipulate shiny tags as well as manage dependencies. We then go through the basics of JavaScript, especially jQuery. Part 3 homes in on the development of a new template on top of Shiny by demonstrating examples from the {bs4Dash} and {shinyMobile} packages, part of the RinteRface project. Finally, we integrate these new components into shiny modules, designed with an object-oriented-based package, namely {tidymodules}. This novel approach allows the development of Shiny apps using R6 classes, thereby significantly reducing the burden of modular communication faced by classic shiny modules and their namespace management.

Learning objectives

  • Manipulate Shiny tags with {htmltools}
  • Understand how dependencies are handled
  • Discover the steps to create a new template from scratch
  • Learn how shiny deals with inputs
  • Discover a new framework for robust module development

Prerequisite

  • Be familiar with Shiny, modules
  • Basic knowledge in HTML and JavaScript is a plus

Is this course for me?

You should take this course if you answer yes to at least 2 of the following questions:

  • Do you want to know how to develop outstanding shiny apps?
  • Have you ever wondered how to develop new input widgets?
  • Are you bothered by the cumbersomeness of module communication in vanilla Shiny?
  • How would you manage an app with 150 tightly connected modules?

Workshop Preparation

During this tutorial you will need ... (Work in Progress)

We will also set up a RStudio Cloud dedicated project.

Schedule

Below is the preliminary program, subject to changes by erum::Conf organisers. The time slots are still undefined since the global program is not available.

Time Activity
(1h) ๐ŸŽฌ 1: Introduction to htmltools
(15 min) โ˜• Coffee break
(1h) ๐Ÿ’… 4: Introduction to JavaScript
(1h) ๐Ÿฑ Lunch break
(1h) โšก 3: Develop a custom shiny template
(15 min) โ˜• Coffee break
(2h) ๐ŸŒ 4: tidymodules

Detailed schedule

  • Introduction to {htmltools}

    • HTML
    • Shiny's tags: structure (name, class, attributes, children, ...)
    • Manipulate tags: access/modifie/add the class, attributes, children
    • Introduction to HTML dependencies
  • Introduction to JavaScript for Shiny (preliminary)

    • Types
    • Functions
    • jQuery
    • Events
    • ...
  • Develop a custom shiny template (examples taken from RinteRface templates)

    • Reminder on {shiny}'s dependencies (Bootstrap 3, 4, jQuery, ...)
    • Create new CSS/JS dependencies with {hmtltools}
    • Develop the template layout (navbar, sidebar, body, footer, ...)
    • Develop custom input widgets (how to input binding work?)
      • Basic description of the Shiny input binding utils
      • Describe how {shiny} deal with inputs
    • Test the newly created components
      • Unit tests with testthat
      • Testing JavaScript code
      • Other tests
  • Introduction to {tidymodules}

    • Introduction to R6: object oriented programming key concepts
    • Reminders on classic shiny modules: what are the main drawbacks?
    • {tidymodules}
      • Modules definition
        • Inheritance set up
        • Initialize input and output ports
        • Create ui and server methods
        • Other methods
      • Nested modules
      • Module communication
        • Input inheritance (between nested and parent modules)
        • Port forwarding
        • Tidy operations between modules
      • Handle multiple user interfaces
      • Manage module: the ModStore
        • visNetwork representation

Instructors

Mustapha Larbaoui and David Granjon are respectively, associate director and principal scientist and consultant at Novartis where they use and trains others to use R, Shiny...


This work is licensed under a Creative Commons Attribution 4.0 International License.

advanced-user-interfaces-for-shiny-developers's People

Contributors

divadnojnarg avatar m-l-1 avatar

Watchers

 avatar  avatar  avatar

Forkers

drroad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.