Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
67 views

The Data Analysis Workflow

This document discusses data visualization and introduces the concept of the Grammar of Graphics. It explains that the Grammar of Graphics breaks down graphs into semantic components including layers, mappings between variables and geometric object aesthetics, and scales. R's ggplot2 package implements the Grammar of Graphics, allowing data to be mapped to aesthetics like color, shape, and size to visualize patterns and relationships. Examples demonstrate mapping variables to aesthetics to create point layers in SPSS and R.

Uploaded by

spirit_abode
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

The Data Analysis Workflow

This document discusses data visualization and introduces the concept of the Grammar of Graphics. It explains that the Grammar of Graphics breaks down graphs into semantic components including layers, mappings between variables and geometric object aesthetics, and scales. R's ggplot2 package implements the Grammar of Graphics, allowing data to be mapped to aesthetics like color, shape, and size to visualize patterns and relationships. Examples demonstrate mapping variables to aesthetics to create point layers in SPSS and R.

Uploaded by

spirit_abode
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Data visualization

• The data analysis workflow:

• Visualization helps to understand data


• Data transformation is often required
• Next steps:
– introduce the concept of Grammar of Graphics and learn some plotting templates for ggplot
– learn data transformation functions

1
The Grammar of Graphics
• The Grammar of Graphics (Leland Wilkinson, 2005) —a general scheme for data visualization
which breaks up graphs into semantic components:
– A plot is made up of layers
– A layer consists of data and a set of mappings between variables and aesthetics of geometric
objects. Some mappings require statistical transformation of data
– Scales control the details of the mapping
– All components
are independent and reusable
• R implementation –
package ggplot2
(Hadley Wickham, 2007)

2
Mappings (points layer) - SPSS

4
Mappings (points layer) – R/ggplot2

ggplot(data=catsales) +
geom_point(aes(x=Sales, y=Profit, colour=`Product Category`,
shape=Region, size=Quantity))

5
Aesthetic mapping exercise

6
Geoms exercise

You might also like