The Grammar of Graphics

Slides:



Advertisements
Similar presentations
Rich Pugh Andy Nicholls Head to Head: Lattice vs ggplot2 Rich Pugh
Advertisements

Poster Template for a 841mm x 594mm poster presentation Your name and the names of the people who have contributed to this presentation go here. The names.
Plotting with ggplot2: Part 1
CS1100: Computer Science and Its Applications Creating Graphs and Charts in Excel.
Paper Example Created by Name.... College of Arts and Sciences Western Michigan University, Kalamazoo MI Introduction Methods Results Example Template.
Microsoft ® Office Word 2007 Training Reuse text and other document parts: Introducing building blocks [Your company name] presents:
XP New Perspectives on Integrating Microsoft Office XP Tutorial 1 1 Integrating Microsoft Office XP Tutorial 1 – Integrating Word and Excel.
Microsoft Office Illustrated Fundamentals
The introduction to SPSS Ⅱ.Tables and Graphs for one variable ---Descriptive Statistics & Graphs.
1 Enter rotation angle Click Rotate for rotate and flip options.
Microsoft Office Illustrated Fundamentals Unit I: Working with Charts.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 3 1 Integrating Microsoft Office XP Tutorial 3 – Integrating Word, Excel, Access, and PowerPoint.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 1 1 Integrating Microsoft Office XP Tutorial 1 – Integrating Word and Excel.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Excel 2007 Lab 2 Charting Worksheet Data.
Working with Themes, Quick Parts, Page Backgrounds, and Headers and Footers Lesson 7.
MS Word 2010 Tutorial Prepared by: Mr. R. De Vera ii.
Ggplot2 A cool way for creating plots in R Maria Novosolov.
Understanding Efficiency. Using Microsoft Office.
 Text formatting can be done in a variety of ways! shadowing  Bold, italics, underline, shadowing, strikethrough, color are all possible options for.
Lesson 4: Inserting Charts. 2 Learning Objectives After studying this lesson, you will be able to:  Insert charts to display numerical data  Link to.
Application software Word processing 1. Application software  Some types:  Document production:  Word-processing, desktop publishing, web page authoring.
© 2004 The McGraw-Hill Companies, Inc. All rights reserved. The Advantage Series Microsoft Office Word 2003 CHAPTER 4 Printing and Web Publishing.
PAPER TITLE (TEMPLATE FOR A 841MM X 594MM POSTER PRESENTATION)
WORD PROCESSING.
Excel Charts and Graphs
The poster title goes here and here
AP CSP: Cleaning Data & Creating Summary Tables
Overview of R and ggplot2 for graphics
Access Reports.
EET 2259 Unit 11 Charts and Graphs
slidedoc cover page example
Do you like telling stories? Do you know what a narrative essay is?
Using Collaboration Tools to Improve Artifact Consistency in CS577 Projects Allen Kou.
Microsoft Office Access 2003
The poster title goes here and here
© Paradigm Publishing, Inc.
The names of the authors The affiliation names go here
graphical representation of data
Poster Template for a 1189mm x 841mm poster presentation
Poster title Author(s) Institution(s) Corresponding author’s Name
graphical representation of data
Poster title Author(s) Institution(s) Corresponding author’s Name
Vitalnet quickly makes publication-ready output
Poster Template for a 920mmX 750mm (A1) (portrait) poster presentation
Copywrite Digital Printers
Copywrite Digital Printers
Copywrite Digital Printers
Graphs with SPSS.
graphical representation of data
PAPER TITLE (TEMPLATE FOR A 841MM X 594MM POSTER PRESENTATION)
The poster title goes here and here
The poster title goes here and here
Poster Template for a 1189mm x 841mm poster presentation
Title of a Poster Paper for IW-FCV2019
Topic 7: Visualization Lesson 1 – Creating Charts in Excel
Overview of R and ggplot2 for graphics
Tutorial 7 – Integrating Access With the Web and With Other Programs
The poster title goes here and here
Poster Template for a 841mm x 594mm poster presentation
POWER YOUR POINT Add your text in here.
Microsoft Office Illustrated Fundamentals
Exercise 64 Use the Flash Movie Explorer to examine the contents of an application to quickly locate specific elements such as instances. Use the Movie.
EET 2259 Unit 11 Charts and Graphs
PAPER TITLE (Template for ICETMIE Abstract )
Microsoft Office Illustrated Fundamentals
The poster title goes here and here
Microsoft Office Illustrated Fundamentals
POWER YOUR POINT Add your text in here.
The poster title goes here and here
The poster title goes here and here
Presentation transcript:

The Grammar of Graphics Using ggplot2 to create informative and beautiful graphics in R, easily

Introduction The painful process of creating graphs in SPSS Creating complicated graphs in SPSS is possible, but very tedious. Total time; ~12 hours. Hard to change details Figure 19; Reforms (t0) by attitudes on Redistribution, within EVS waves.   Footer text: to modify choose 'Insert' (or ‘View’ for Office 2003 or earlier) then 'Header and footer' 5/11/19

Plotting in R The basic R functions create functional plots, but are again quite limited. Creating trellis plots for complicated datasets with various graphical layers is time-consuming and requires programming experience. Lattice helps, and can be used to create anything you might desire… However, this will probably require writing custom panel functions, and can become difficult very quickly. Footer text: to modify choose 'Insert' (or ‘View’ for Office 2003 or earlier) then 'Header and footer' 5/11/19

The Grammar of Graphics Leland Wilkinson’s approach Created by Leland Wilkinson, when working (ironically) for SPSS Ggplot2 is a (sometimes loose) implementation in R by Hadley Wickham Create plots not by choosing a chart, but by rules about the building blocks that make a graphic, written in the ‘grammar’ of graphics. Make graphics easier Grammar instead of preset plots facilitate innovative display options Footer text: to modify choose 'Insert' (or ‘View’ for Office 2003 or earlier) then 'Header and footer' 5/11/19

Example What is a pie chart? How would you describe a pie chart to someone who has never seen one? A pie chart is a stacked barchart with polar coordinates With ggplot, the difference is “+ coord_polar(theta="y")” Footer text: to modify choose 'Insert' (or ‘View’ for Office 2003 or earlier) then 'Header and footer' 5/11/19

Examples in R Extremely easy to overlay different graphical elements and statistical transformations Very, very many different applications. (Try doing a google search) Themes can be created and applied to easily create plots with the same ‘look and feel’ (not in my presentation, homework?) Footer text: to modify choose 'Insert' (or ‘View’ for Office 2003 or earlier) then 'Header and footer' 5/11/19

helpful resources Ggplot2 documentation: http://docs.ggplot2.org/current/ Cookbook; http://www.cookbook-r.com/Graphs/ Presentation by creator of ggplot2, examples and philosophy; http://www.slideshare.net/hadley/grammar-of-graphics-past-present-future Google, stack overflow, R mailing lists. Footer text: to modify choose 'Insert' (or ‘View’ for Office 2003 or earlier) then 'Header and footer' 5/11/19