Shiny App with d3 data visualization

Slides:



Advertisements
Similar presentations
By Loukik Purohit & Rohit Ghatol
Advertisements

Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Shiny in R the fundamentals of getting started. What Is It? New package in R to create web apps Web app built entirely in R, but can also incorporate.
KompoZer. This is what KompoZer will look like with a blank document open. As you can see, there are a lot of icons for beginning users. But don't be.
Visualizations in Drupal with d3.js – Alan Sherry
Cascading Style Sheets
Slide 1 MIS3023 Professor: Akhilesh Bajaj The University of Tulsa.
Introduction to JavaScript Module 1 Client Side JS Programming M-GO Sponsored By
T HE S HINY A PP Presented by: Lance Cundy Great Plains R Users Group November 15, 2013.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
ExtJS 4.0 JavaScript MVC Framework. Who ExtJS is provided by Sencha ( o Sencha Touch o GWT o CSS Animator o IO (Cloud Data Management)
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
Prof. James A. Landay University of Washington Spring 2008 Web Interface Design, Prototyping, and Implementation Rich Internet Applications: AJAX, Server.
Presented by…. Group 2 1. Programming language 2Introduction.
2012 National BDPA Technology Conference Creating Rich Data Visualizations using the Google API Yolanda M. Davis Senior Software Engineer AdvancED August.
Tutorial #9 – Creating Forms. Tutorial #8 Review – Tables Borders (table, gridlines), Border-collapse: collapse; empty-cells: show; and rowspan, colspan.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Win8 on Intel Programming Course Modern UI : Features Cédric Andreolli Intel Software.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Additional Topics. Tutorial #9 Review – Forms Forms Legend and fieldset Fields Text Password Radio buttons, check box, text area, select lists Buttons.
JavaScript & jQuery the missing manual Chapter 11
JQuery Page Slider. Our goal is to get to the functionality of the Panic Coda web site.Panic Coda web site.
Building a UI with Zen Pat McGibbon –Sales Engineer.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
SHINING WITH SHINY: INTRODUCING A WEB APPLICATION FRAMEWORK FOR R Gokul Bhandari.
Win8 on Intel Programming Course Modern UI HelloWorld in HTML5/JS Cédric Andreolli Intel.
JavaScript Programming B.Ramamurthy 6/113/2014B. Ramamurthy CSE6511.
Client Side Programming with JavaScript Why use client side programming? Web sides built on CGI programs can rapidly become overly complicated to maintain,
Enabling High-Quality Printing in Web Applications
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
C#.NETASP.NETJavaPHPJavaScript PerlPythonOthersLiverpool FCMotorsports.
BTW ”If you go, my advice to you” - Distributed Software Development.
Extending the Operations Dashboard
Lecy ∙ Data-Driven Management Lecture 12 Building Shiny Apps.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
IE Developer Tools Jonathan Seitel Program Manager.
JQUERY AND AJAX
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
A little PHP. Enter the simple HTML code seen below.
Take Your Data Analysis and Reporting to the Next Level by Combining SAS Office Analytics, SAS Visual Analytics, and SAS Studio David Bailey Tim Beese.
Introduction to.
DHTML.
A little PHP.
Javascript and Dynamic Web Pages: Client Side Processing
Shiny for RStudio Exploring Web Mapping Technology
Personal Website Final Project
Human Computer Interaction
Google Web Toolkit Tutorial
Intro to Shiny Workshop (No, really, you can learn this)
© 2016, Mike Murach & Associates, Inc.
Application with Cross-Platform GUI
Using Shiny to Build Web Applications
Testing REST IPA using POSTMAN
Introduction to D3.js and Bar Chart in D3.js
Introduction to Programming the WWW I
Thank you Sponsors.
Version 3.5 (Citrus) Preview
Using Shiny to Build Web Applications
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
Please thank our sponsors!
JavaScript Programming Labs
Types of Spatial Data Sites
Thank you Sponsors.
Javascript and JQuery SRM DSC.
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Lab 1: D3 Setup John Fallon
© 2017, Mike Murach & Associates, Inc.
Presentation transcript:

Shiny App with d3 data visualization Mike Seman

My Background – Mike Seman Went to Colorado School of Mines, PhD in Chemical Engineering 2007. Like to mountain bike and drink beer. Came to North Carolina in 2010 to work at CREE in the growth of GaN/InGaN quantum wells for high brightness LEDs

Why d3 I wanted to understand more rCharts – issues with sizing, control tooltip. Learn js. I didn’t want to be dependent on r wrappers of other libraries to bring charts into my shiny app Keeping up with the competition. Civic tech is rapidly growing, other companies have great visuals.

What is Shiny? R package that allows you to quickly build a user interface to explore data. Allows R users to publish their charts and graphs on-line. (Let me show you my boat) Consists of 2 R files – ui.R and server.R Rstusio has made it easy for you to incorporate widgets and charts (ui side) and run algorithms on your data (server.R)

Simple Shiny App Great tutorials and info: ui.R and server.R Make a folder and can just use runApp() from console in Rstudio IDE Great tutorials and info: http://shiny.rstudio.com/

Shiny – ui.R Defines layout and widgets

Shiny – ui.R selectInput is an R function that makes the HTML of a select box in your application R Code for this select box. HTML for this select box.

Shiny – server.R Define the plot, use R to perform operations on the data based on inputs from the ui side. One thing to understand is it’s “reactive” How and when the code gets executed

Shiny – server.R I like to use “reactiveValues” and use observeEvent to control the reactivity of the app..

d3 – data driven documents What is it: Javascript Library that allows you to tie data to HTML elements How does it work: Has functions for manipulating HTML, makes it easy to select elements and update their attributes Where does it get crazy: “Enter, Update, Exit”, applying transitions, mapping scales. Simple div elements become SVG elements.

d3 - Example Define div with CSS data Use d3 to manipulate divs https://bl.ocks.org/mbostock/7322386 https://bost.ocks.org/mike/bar/ Use d3 to manipulate divs

Diving in: d3 and Shiny Step 1: Have server.R send some JSON data to ui.R rjson convert’s R’s dataframes to JSON format Have observeEvent to send data when clicked Use this to send data from server to client in Shiny Reference: https://ryouready.wordpress.com/2013/11/20/sending-data-from-client-to-server-and-back-using-shiny/

Diving in: d3 and Shiny Step 2: Set-up ui.R to use custom d3 js script Bring in stylesheet and d3 library Define a div to hold barchart Script to create chart, actually needed to be last here because we are modifying div above

Diving in: d3 and Shiny Step 3: modify your favorite d3 example (1 of 2) Comment out data from example Shiny data from server.R Had to add this to get to work with json data from R

Diving in: d3 and Shiny Step 3: modify your favorite d3 example (2 of 2) Mike Bostock’s examples modify “body” But you want to position chart with a defined div UI.R: put chart in your app in a div

Another good example Shiny Inputs, call to Spotify API, d3 chart: http://myinspirationinformation.com/visualisation/d3-js/integrating-d3-js-into-r-shiny/ server.R accessing API Shiny functions for input d3 chart

Shiny App with d3

Future Directions What advanced data science could we bring to my data set. In a contest we could use d3 to visualize the outcome of some advanced machine learning algorithm. (Don’t have to use my data)