Enhancing Spotfire with the Power of R

Slides:



Advertisements
Similar presentations
Introduction to Web Bill of Lading Q Proprietary and Confidential Copyright © 2005 INTTRA Inc. 2 Agenda Industry Challenges INTTRA Solution Value.
Advertisements

Accelerating The Application Lifecycle. DEPLOY DEFINE DESIGN TEST DEVELOP CHANGE MANAGEMENT Application Lifecycle Management #1 in Java Meta, Giga, Gartner.
Chapter 1: The Database Environment
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 1 Introduction to Perl and CGI.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Introduction to Rails.
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
©2011 Quest Software, Inc. All rights reserved.. Andrei Polevoi, Tatiana Golubovich Program Management Group ActiveRoles Add-on Manager Overview.
Introduction Lesson 1 Microsoft Office 2010 and the Internet
Suite Suite 2 TPF Software – Overview Binary Editor Remote Scripts zTREX Add-Ins & Project Integration with Source Control Manager.
The Enterprise Business Center. #2 CyberSource Enterprise Business Center your payment processing dashboard ******** Log out security feature All tools.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
State of Connecticut Core-CT Project Query 8 hrs Updated 6/06/2006.
Vanderbilt Business Objects Users Group 1 Reporting Techniques & Formatting Beginning & Advanced.
Process Monitoring is only the first step in improving process efficiency.
New Products for © 2009 ANGEL Learning, Inc. Proprietary and Confidential, 2 Update Summary Enrich teaching and learning Meet accountability needs.
© 2010 TIBCO Software Inc. All Rights Reserved. Confidential and Proprietary. TIBCO Spotfire Application Data Services TIBCO Spotfire European User Conference.
Integration Integrating Word, Excel, Access, and PowerPoint
Microsoft Office Illustrated Fundamentals Unit C: Getting Started with Unit C: Getting Started with Microsoft Office 2010 Microsoft Office 2010.
Benchmark Series Microsoft Excel 2013 Level 2
WHAT IS ELINK? Thermoflow, Inc.
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
Microsoft SharePoint 2010 technology for Developers
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
Macromedia Dreamweaver MX 2004 – Design Professional Dreamweaver GETTING STARTED WITH.
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
Chapter 10: The Traditional Approach to Design
Systems Analysis and Design in a Changing World, Fifth Edition
Automation with SA , CERN Markus Steiner, PM Software.
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 2Advanced Reports, Access Tools, and Customizing Access Chapter 8Integrating Access Data.
DEV-2: Getting Started with OpenEdge® Architect – Part I
The Web Warrior Guide to Web Design Technologies
© by Pearson Education, Inc. All Rights Reserved.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Integrating Access with the Web and with Other Programs.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
CategoryCapability + Recommended Tool Analysis Self Service BI with Power View integration Ad-Hoc (e.g. user defined) views Interactive analysis.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Tutorial 11: Connecting to External Data
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Create with SharePoint 2010 Jen Dodd Sr. Solutions Consultant
A First Program Using C#
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Copyright © 2006, SAS Institute Inc. All rights reserved. Enterprise Guide 4.2 : A Primer SHRUG : Spring 2010 Presented by: Josée Ranger-Lacroix SAS Institute.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
PowerPoint 2003 – Level 1 Computer Concepts Cathy Horwitz April 25, 2011.
Office Live Workspace Visio 2007 Outlook 2007 Groove 2007 Access 2007 Excel 2007 Word 2007.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Introducing Reporting Services for SQL Server 2005.
Building Data Visualization Solutions with Visio 2007 Paul Holdaway Microsoft Consulting Services (UK)
All rights reserved, property and © CAD Computer GmbH & Co.KG 2009 Cover page.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
All rights reserved, property and © CAD Computer GmbH & Co.KG 2009 Cover page.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Copyright © 2012 UNICOM Systems, Inc. Confidential Information z/Ware Product Overview illustro Systems International A Division of UNICOM Global.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 8 1 Microsoft Office Access 2003 Tutorial 8 – Integrating Access with the.
Project Planning Defining the project Software specification Development stages Software testing.
Excel Services Displays all or parts of interactive Excel worksheets in the browser –Excel “publish” feature with optional parameters defined in worksheet.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
ReportWorX vs. ReportWorX Express
Microsoft Office Illustrated
Exchanging Data with Other Programs
Welcome to E-Prime E-Prime refers to the Experimenter’s Prime (best) development studio for the creation of computerized behavioral research. E-Prime is.
Microsoft Office Access 2003
Microsoft Office Access 2003
Tutorial 7 – Integrating Access With the Web and With Other Programs
Extend Excel with Smartlist Designer
ArcGIS Pro: An Introduction Overview
Presentation transcript:

Enhancing Spotfire with the Power of R Charles Roosen (Mango Solutions) Difei Luo (TIBCO Software)

Overview What is Spotfire? R Extensions for Spotfire The Spotfire Platform The Spotfire SDK R Extensions for Spotfire Motivation Extension Types Implementation Details

The Spotfire Platform

TIBCO Spotfire Enterprise Analytics overview Business Users Analysts Spotfire Analytics IT & Developers Interactive Dashboards Support Guided Applications Training Ad-hoc Analysis Enterprise Integration and Deployment Data Integration Platform Extensibility Professional Services Security Integration App Integration 4

TIBCO Spotfire Professional – In-memory interactive analytics Explore data with multiple, linked visualizations From simple Bar charts to powerful statistics at the tip of your fingers Intuitive, user-driven interface Completely interactive user experience Auto-generated dynamic filters Real-time, in-memory filtering on any field Instantly share any analysis No separate publishing step Fast, in-memory analysis Flexible, free-dimensional ad-hoc analysis Intuitive user experience Visual and interactive Leads to greater insights and immediate answers Guided Analytic applications Created by business users Adaptable to new business processes and new applications Access corporate and local data sources Databases, backend systems, spreadsheets Load data from multiple sources ODBC/OleDB access, TS As Information Links, Excel Spreadsheets, flat data files, … 5

TS Enterprise Analytics – Platform Overview

Demo: Spotfire

The Spotfire SDK

What is the Spotfire SDK? The TIBCO Spotfire platform has a software development kit (SDK) for configuring, automating, and extending the platform. The SDK is used to create custom TIBCO Spotfire Extensions. Extensions add features that from the end users perspective are virtually indistinguishable from the built-in features. Extensions are implemented in C# using Visual Studio Well documented API’s Well designed architecture Good examples on the Spotfire Technology Network

Extension Types TIBCO Spotfire Extension types include: Data Reader: Import data from custom file, database, and web services data sources Data Writer: Export data to custom file, database, and web services data sources Calculation: Add custom aggregation, expression function, and statistical methods that automatically re-execute on data update events Dialog Tool: Prompt users for input into custom application and document-level automation jobs Control Panel: Collect user input from and display feedback to an always available custom control panel Visualization Panel: Display custom charts, plots and other forms of presentation based on the current set of filtered and marked data Automation Interface: Send and receive properties, events, and commands to and from an external application

R Extensions for Spotfire

Motivation R has a wealth of statistical techniques of value to Spotfire users R core features Bioconductor PK modeling Focus is on using R for statistical computation R does the computation Spotfire does the user interface, graphics, reporting, and automation Why not just use S+? R has functionality not available for S+, e.g. Bioconductor

Extensions Implemented Open R Data File Load the first object in an “RData” file as a data.frame Open R Script File Execute an R script file creating a data.frame Open From R Expression Execute a one-liner expression creating a data.frame R Column Calculation Execute an R expression that creates a column R Custom Expression Execute an R expression computing a summary such as “mean()” or “mad()” Create and Manage General R Calculations Execute a block of R code creating a table

Demo: R Extensions

Implementation Details General approach Spotfire writes data to a tab-delimited file R reads the data, does some processing, and writes results to a tab-delimited file Spotfire reads the tab-delimited file The C# code On the C# side, most of the code is somewhat generic code for invoking some general process and communicating to it via text files The only R-specific code is that related to what “Process” is invoked The R code A general R template script handles the data exchange and errors Each type of extension has an R script, e.g. “Create Column” Varying values such as file names or R expressions are inserted into the script as “spotfire.parameters”

C# Process Code File.WriteAllText(generatedScriptFile, masterScript); string args = string.Format("CMD BATCH {0} {1} {2}", batchOptions, scriptFileName, stdoutFileName); string rExecPath = RCalculationUtilities.GetRExecutableFilePath(); ProcessStartInfo info = new ProcessStartInfo(rExecPath, args); info.WorkingDirectory = sessionDir; info.WindowStyle = ProcessWindowStyle.Hidden; try { using (Process rProc = Process.Start(info)) { rProc.WaitForExit(); if (rProc.ExitCode > 1) { string errorMsgFileName = Path.Combine(sessionDir, "errormsg.txt"); if (File.Exists(errorMsgFileName)) { errorMsg = File.ReadAllText(errorMsgFileName); }

R Master Template # If an error occurs, quit with a non-zero status code options(error = expression({{cat(geterrmessage(), file="errormsg.txt");q(status=100)}})) # Parameters for passing settings other than data to R. spotfire.parameters <- {1} # Load data spotfire.inputFilename <- "{2}" spotfire.data <- read.delim(spotfire.inputFilename, check.names = FALSE) # BEGIN User defined script {0} # END User defined script # Save results spotfire.outputFilename <- "{3}" write.table(spotfire.results, file = spotfire.outputFilename, sep = "\t", na = "", row.names = FALSE)

R Extension Scripts ## R objects used: ## ## spotfire.data: data.frame passed from Spotfire to R ## spotfire.parameters: named character vector of parameters ## spotfire.results: data.frame passed from R to Spotfire ## Note: Error and special-case handling code left out for space reasons # Example 1: Load the data from an Rdata file spotfire.results <- get(load(file = spotfire.parameters["FilePath"])[1]) # Example 2: Execute an expression creating a data.frame expr <- spotfire.parameters["DataFrameCreationExpression"] spotfire.results <- eval(parse(text=expr)) # Example 3: Execute an expression creating a column expr <- spotfire.parameters["CreateColumnExpression"] spotfire.results <- with(spotfire.data, eval(parse(text=expr)))

Summary Spotfire is a useful tool for interactive data visualization R provides rich computational capabilities for Spotfire users The Spotfire SDK makes it easy to integrate the two Simple communication via text files and a child process works pretty well