How To Create A Waterfall Chart In R

Similar documents
Each function call carries out a single task associated with drawing the graph.

Scatter Plots with Error Bars

Tutorial 3: Graphics and Exploratory Data Analysis in R Jason Pienaar and Tom Miller

Scientific Graphing in Excel 2010

Statistics Revision Sheet Question 6 of Paper 2

Gestation Period as a function of Lifespan

Package LexisPlotR. R topics documented: April 4, Type Package

Formulas, Functions and Charts

Graphics in R. Biostatistics 615/815

Cluster Analysis using R

Package retrosheet. April 13, 2015

Getting started with qplot

Create Charts in Excel

Package plan. R topics documented: February 20, 2015

Package tagcloud. R topics documented: July 3, 2015

Package ggrepel. February 8, 2016

Lab 11: Budgeting with Excel

Package MDM. February 19, 2015

Visualizing Data. Contents. 1 Visualizing Data. Anthony Tanbakuchi Department of Mathematics Pima Community College. Introductory Statistics Lectures

sample median Sample quartiles sample deciles sample quantiles sample percentiles Exercise 1 five number summary # Create and view a sorted

Portal Connector Fields and Widgets Technical Documentation

Package uptimerobot. October 22, 2015

Intermediate PowerPoint

R Graphics Cookbook. Chang O'REILLY. Winston. Tokyo. Beijing Cambridge. Farnham Koln Sebastopol

Package RIGHT. March 30, 2015

Package survpresmooth

Excel -- Creating Charts

Package MBA. February 19, Index 7. Canopy LIDAR data

Package erp.easy. September 26, 2015

5 Correlation and Data Exploration

Microsoft Excel 2010 Part 3: Advanced Excel

Package TRADER. February 10, 2016

Package treemap. February 15, 2013

Package wordcloud. R topics documented: February 20, 2015

Examples of Data Representation using Tables, Graphs and Charts

Package smoothhr. November 9, 2015

Journal of Statistical Software

Plot the following two points on a graph and draw the line that passes through those two points. Find the rise, run and slope of that line.

Chapter 32 Histograms and Bar Charts. Chapter Table of Contents VARIABLES METHOD OUTPUT REFERENCES...474

Package decompr. August 17, 2016

Part 1: Background - Graphing

Package TSfame. February 15, 2013

Regional Drought Decision Support System (RDDSS) Charting Tools Help Documentation

Package bigrf. February 19, 2015

Introduction to Microsoft Excel 2007/2010

Package png. February 20, 2015

Graphing Quadratic Functions

Computational Assignment 4: Discriminant Analysis

Getting Started with R and RStudio 1

Chapter 2: Frequency Distributions and Graphs

Viewing Ecological data using R graphics

CONSTRUCTING SINGLE-SUBJECT REVERSAL DESIGN GRAPHS USING MICROSOFT WORD : A COMPREHENSIVE TUTORIAL

Exercise 1.12 (Pg )

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS

containing Kendall correlations; and the OUTH = option will create a data set containing Hoeffding statistics.

2. Building Cross-Tabs in Your Reports Create a Cross-Tab Create a Specified Group Order Filter Cross-Tab by Group Keep Groups Together

Data exploration with Microsoft Excel: analysing more than one variable

Statgraphics Getting started

Package hoarder. June 30, 2015

Unit 9 Describing Relationships in Scatter Plots and Line Graphs

Math Quizzes Winter 2009

The following is an overview of lessons included in the tutorial.

Basic Understandings

Excel. Microsoft Office s spreadsheet application can be used to track. and analyze numerical data for display on screen or in printed

Lesson 4.3: Using the VLOOKUP Function

Chapter 1: Looking at Data Section 1.1: Displaying Distributions with Graphs

Excel 2003 Tutorials - Video File Attributes

Package DCG. R topics documented: June 8, Type Package

Package polynom. R topics documented: June 24, Version 1.3-8

WHAT S NEW IN OBIEE

Describing, Exploring, and Comparing Data

12-1 Representations of Three-Dimensional Figures

ECDL / ICDL Spreadsheets Syllabus Version 5.0

2015 County Auditors Institute. May Excel Workshop Tips. Working Smarter, Not Harder. by David Scott,

The Center for Teaching, Learning, & Technology

Consolidation of Grade 3 EQAO Questions Data Management & Probability

1.3 LINEAR EQUATIONS IN TWO VARIABLES. Copyright Cengage Learning. All rights reserved.

MicroStrategy Analytics Express User Guide

NICK COLLIER - REPAST DEVELOPMENT TEAM

INTRODUCTION TO EXCEL

LESSON QUESTIONS: Bar charts

KaleidaGraph Quick Start Guide

Advanced Microsoft Excel 2010

(1): 50 minutes None Whole Class N/A 03.SC.TE TE.2.2 Bar Graph, Graph, Line graph, Pie Graph

Appendix 2.1 Tabular and Graphical Methods Using Excel

DIGITAL DESIGN APPLICATIONS Word Exam REVIEW

Years after US Student to Teacher Ratio

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc.

Visualization Quick Guide

Dealing with Data in Excel 2010

Excel 2007 Tutorials - Video File Attributes

Bar Graphs and Dot Plots

WEKA Explorer User Guide for Version 3-4-3

Graphing in SAS Software

Time Series Analysis AMS 316

Information Literacy Program

Transcription:

Package waterfall Type Package Title Waterfall Charts Version 1.0.2 Date 2016-04-02 August 29, 2016 URL https://jameshoward.us/software/waterfall/, https://github.com/howardjp/waterfall BugReports https://github.com/howardjp/waterfall/issues Provides support for creating waterfall charts in R using both traditional base and lattice graphics. License BSD_2_clause + file LICENSE LazyData yes RoxygenNote 5.0.1.9000 Depends lattice NeedsCompilation no Author James P. Howard, II [aut, cre] Maintainer ``James P. Howard, II'' <jh@jameshoward.us> Repository CRAN Date/Publication 2016-04-03 16:40:20 R topics documented: waterfall-package...................................... 2 jaquith............................................ 2 rasiel............................................. 3 waterfallchart........................................ 3 waterfallplot......................................... 5 Index 8 1

2 jaquith waterfall-package Waterfall Charts Create waterfall or "McKinsey" charts This package provides support for creating waterfall charts in R using both traditional base and lattice graphics. Author(s) James P. Howard, II <jh@jameshoward.us> jaquith Sample Business-Adjusted Risk Data Usage Format This dataset provides the sample business-adjusted risk from Security Metrics to illustrate nonfinancial waterfall charts. data(jaquith) A data frame with 9 rows and 2 columns. [,1] factor character Factor label [,2] score numeric Relative score The dataset represents a sample business-adjusted risk calculation. References Andrew Jaquith, Security Metrics: Replacing Fear, Uncertainty, and Doubt (Boston: Addison- Wesley Professional, 2007), 170-171.

waterfallchart 3 rasiel Sample Financial Data Usage Format This dataset provides the sample financial data used in The McKinsey Way to illustrate financial waterfall charts. data(rasiel) A data frame with 5 rows and 3 columns. [,1] label character Column label [,2] value numeric Column height [,3] subtotal character Group and subtotal labels The dataset represents a profit and loss statement for the fictional ACME Widget Corporation for 1998. References Ethan M. Rasiel, The McKinsey Way: Using the Techniques of the World s Top Strategic Consultants to Help You and Your Business (New York: McGraw-Hill, 1999), 115-116. waterfallchart Waterfall Chart Creates a waterfall chart using Lattice Usage waterfallchart(x, data = NULL, groups = NULL, horizontal = FALSE, panel = panel.waterfallchart, prepanel = prepanel.waterfallchart, summaryname = "Total", box.ratio = 2, origin = 0, level.lines = TRUE,...)

4 waterfallchart Arguments x data groups horizontal panel prepanel summaryname box.ratio origin level.lines a formula describing the form of conditioning plot. The formula is generally of the form y ~ x g1 * g2 *..., indicating that plots of y (on the y axis) versus x (on the x axis) should be produced conditional on the variables g1, g2,.... However, the conditioning variables g1,g2,... may be omitted. a data frame containing values (or more precisely, anything that is a valid envir argument in eval, e.g., a list or an environment) for any variables in the formula, as well as groups and subset if applicable. If not found in data, or if data is unspecified, the variables are looked for in the environment of the formula. a vector expected to act as a grouping variable within each panel, typically used to distinguish different groups by varying graphical parameters like color and line type. Unlike with the barchart function, groups specifies where subtotals columns, should appear. There is a subtotal created for each group specified. If no groups are given, a summary column is still reported. This argument is used to process the arguments to these high level functions, but more importantly, it is passed as an argument to the panel function, which is supposed to use it as appropriate. This draws the actual plot after bwplot has done the difficult work of processing the formula. This function returns the bwplot information on the number of columns to display and where to place labels. name of the summary column, usually "Total" specifies the ratio of the width of the rectangles to the interrectangle space. initial offset relative to the x axis. The value serves as the logical starting point for the first column and any summary column. Defaults to 0.... further arguments. if FALSE, the lines connecting adjacent boxes are ommitted from the display. This function closely mimics the barchart interface, but provides a type of chart called a waterfall plot, showing how multiple subvalues contribute to a total sum. The bulk of the work is actually processed in bwplot which defines where tickmarks and other information outside the plot itself are placed. Only a formula method is provided. Matrix and vector interfaces are not provided because mimicing the behavior of barchart for those interfaces produces unintellible and undefined graphic output. References Andrew Jaquith, Security Metrics: Replacing Fear, Uncertainty, and Doubt (Boston: Addison- Wesley Professional, 2007), 170-172. Ethan M. Rasiel, The McKinsey Way: Using the Techniques of the World s Top Strategic Consultants to Help You and Your Business (New York: McGraw-Hill, 1999), 113-118.

waterfallplot 5 Examples data(rasiel) data(jaquith) waterfallchart(value~label, data=rasiel, groups=rasiel$subtotal) waterfallchart(factor~score, data=jaquith) waterfallplot Waterfall Plot Creates a waterfall plot with vertical or horizontal bars. Usage waterfallplot(height, width = 1, space = NULL, names.arg = NULL, horiz = FALSE, density = NULL, angle = 45, col = NULL, border = par("fg"), main = NA, sub = NA, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL, xpd = TRUE, axes = TRUE, axisnames = TRUE, cex.axis = par("cex.axis"), cex.names = par("cex.axis"), plot = TRUE, axis.lty = 0, offset = 0, add = FALSE, summary = FALSE, rev = FALSE, level.lines = TRUE,...) Arguments height width space names.arg horiz density angle col a vector of values describing the height of the bars that make up the plot. Matrices are not supported. optional vector of bar widths. Re-cycled to length the number of bars drawn. Specifying a single value will have no visible effect unless xlim is specified. the amount of space (as a fraction of the average bar width) left before each bar. May be given as a single number or one number per bar. If not given explicitly, it defaults to 0.2. a vector of names to be plotted below each bar If this argument is omitted, then the names are taken from the names attribute of height. a logical value. If FALSE, the bars are drawn vertically with the first bar to the left. If TRUE, the bars are drawn horizontally with the first at the bottom. a vector giving the density of shading lines, in lines per inch, for the bars or bar components. The default value of NULL means that no shading lines are drawn. Non-positive values of density also inhibit the drawing of shading lines. the slope of shading lines, given as an angle in degrees (counter-clockwise), for the bars or bar components. a vector of colors for the bars or bar components. By default, grey is used.

6 waterfallplot border main sub xlab ylab xlim ylim xpd axes axisnames cex.axis cex.names plot axis.lty offset add summary rev Value level.lines the color to be used for the border of the bars. Use border = NA to omit borders. If there are shading lines, border = TRUE means use the same colour for the border as forr the shading lines. overall title for the plot. subtitle for the plot. a label for the x-axis. a label for the y-axis. limits for the x-axis. limits for the y-axis. logical. Should bars be allowed to outside region? logical. If TRUE, a vertical (or horizontal, if horiz is true) axis is drawn. logical. If TRUE, and if there are names.arg (see above), the other axis is drawn (with lty=0 ) and labeled. expansion factor for numeric axis labels. expansion factor for axis names (bar labels). logical. If FALSE, nothing is plotted. the graphics parameter lty applied to the axis and tick marks of the categorical (default horizontal) axis. Note that by default the axis is suppressed. initial offset relative to the x axis. The value serves as the logical starting point for the first column and any summary column. Defaults to 0. logical specifying if bars should be added to an already existing plot; defaults to FALSE. create a summary column. A summary column provides a final sum column showing the relative change from the offset. If a summary is requested and names.arg is set, the names.arg vector must include one extra entry with the summary column s name. Defaults to FALSE. reverse the order of columns? Defaults to FALSE. if FALSE, the lines connecting adjacent boxes are ommitted from the display.... arguments to be passed to other methods. For the default method these can include further arguments (such as axes, asp and main ) and graphical parameters (see par ) which are passed to plot.window(), title() and axis. This function closely mimics the barplot interface, but provides a type of chart called a waterfall plot, showing how multiple subvalues contribute to a total sum. This is a generic function, it currently only has a default method. A formula interface may be added eventually. A numeric vector say mp, giving the coordinates of all the bar midpoints drawn, useful for adding to the graph.

waterfallplot 7 References Andrew Jaquith, Security Metrics: Replacing Fear, Uncertainty, and Doubt (Boston: Addison- Wesley Professional, 2007), 170-172. Ethan M. Rasiel, The McKinsey Way: Using the Techniques of the World s Top Strategic Consultants to Help You and Your Business (New York: McGraw-Hill, 1999), 113-118. Examples data(rasiel) waterfallplot(rasiel$value, names.arg=rasiel$label)

Index Topic datasets jaquith, 2 rasiel, 3 barchart, 4 barplot, 6 bwplot, 4 jaquith, 2 rasiel, 3 waterfall (waterfall-package), 2 waterfall-package, 2 waterfallchart, 3 waterfallplot, 5 8