Visualisation for EDA April 2017

Hadley Wickham 
 @hadleywickham
 Chief Scientist, RStudio

Import

Visualise Surprises, but doesn't scale

Tidy

Consistent way of storing data

Transform

Create new variables & new summaries

Model

Scales, but doesn't (fundamentally) surprise

Program

Communicate

Import Explore Tidy

Consistent way of storing data

Visualise Surprises, but doesn't scale

Transform

Create new variables & new summaries

Model

Scales, but doesn't (fundamentally) surprise

Program

Communicate

First: my GitHub commits

Second: my travel

Which will culminate in this figure

Live demo

ggrepel 
 by Kamil Slowikowski https://github.com/slowkow/ggrepel

ggbeeswarm 
 by Erik Clark & Scott Sherrill-Max https://github.com/eclarke/ggbeeswarm

Import

Visualise

readr

ggplot2

readxl

Model

haven xml2 DBI

Tidy tibble tidyr

Transform dplyr forcats hms

broom modelr

stringr lubridate shiny rmarkdown

Communicate purrr magrittr

r4ds.had.co.nz O'Reilly discount: AUTHD

tidyverse.org

Program

Console visualisations

Previously > library(tidyverse) Loading ggplot2 Loading tibble Loading tidyr Loading readr Loading purrr Loading dplyr Loading stringr Loading forcats

Why not make use of the horizontal space? > library(tidyverse) + ggplot2 2.2.1.9000 + tibble

1.3.0

+ tidyr

0.6.1

+ readr

1.1.0

+ purrr

0.2.2.9000

+ dplyr

0.5.0.9004

Date: 2017-04-23 R: 3.3.2 OS: macOS Sierra 10.12.4 GUI: RStudio 1.0.141 Locale: en_US.UTF-8 TZ: America/Chicago

+ stringr 1.2.0 + forcats 0.2.0 Conflicts -------------------------------------------------------------------* filter(),

from dplyr, masks stats::filter()

* is_null(),

from purrr, masks testthat::is_null()

* lag(),

from dplyr, masks stats::lag()

* matches(),

from dplyr, masks testthat::matches()

library(precis) # data.frame [32 × 11] name

type

precis





1

mpg

dbl

10.4 [ 15.4 ( 19.2)

22.8]

33.9

2

cyl

dbl

3 levels:

3

disp

dbl

71.1 [121.0 (196.0) 334.0] 472.0

4

hp

dbl

5

drat

6

52 [

4 (11) 6 (7) 8 (14) 96 (

123)

180]

335

dbl

2.76 [ 3.08 ( 3.70)

3.92]

4.93

wt

dbl

1.51 [ 2.54 ( 3.32)

3.65]

5.42

7

qsec

dbl

14.5 [ 16.9 ( 17.7)

18.9]

22.9

8

vs

dbl

2 levels:

0 (18) 1 (14)

9

am

dbl

2 levels:

0 (19) 1 (13)

10

gear

dbl

3 levels:

3 (15) 4 (12) 5 (5)

11

carb

dbl

1 [

2 (

2)

4]

8

rescale = TRUE, reorder = TRUE? # data.frame [32 × 11] name

type

precis





1

mpg

dbl

1.40 [1.54 (1.92) 2.28] 3.39 * 10

2

disp

dbl

0.71 [1.21 (1.96) 3.34] 4.72 * 100

3

hp

dbl

5.20 [0.96 (1.23) 1.80] 3.35 * 10

4

drat

dbl

2.76 [3.08 (3.70) 3.92] 4.93 * 1

5

wt

dbl

1.51 [2.54 (3.32) 3.65] 5.42 * 1

6

qsec

dbl

1.45 [1.69 (1.77) 1.89] 2.29 * 10

7

carb

dbl

1

8

cyl

dbl

3 levels:

4 (11) 6 (7) 8 (14)

9

vs

dbl

2 levels:

0 (18) 1 (14)

10

am

dbl

2 levels:

0 (19) 1 (13)

11

gear

dbl

3 levels:

3 (15) 4 (12) 5 (5)

[2

(2

) 4

] 8

* 1

histogram = TRUE name

type

precis



10.4 ▂▁▇▃▅▅▂▂▁▁▂▂

1

mpg

dbl

2

cyl

dbl

3

disp

dbl

4

hp

dbl

5

drat

dbl

2.76 ▂▂▇▂▁▅▇▃▂▁▁▁

4.93

6

wt

dbl

1.51 ▁▁▂▂▁▁▂▁▂▁▇▂▂▁▁▁▁▁▁▂▁

5.42

7

qsec

dbl

14.5 ▂▂▁▁▃▇▅▁▇▂▂▂▁▁▁▁▁

22.9

8

vs

dbl

0 ▇▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▅

1

9

am

dbl

0 ▇▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▅

1

10

gear

dbl

3 ▇▁▁▁▁▁▁▁▁▅▁▁▁▁▁▁▁▁▁▂

5

11

carb

dbl

1 ▅▇▁▂▁▇▁▁▁▁▁▁▁▁

8

4 ▅▁▁▁▁▁▁▁▁▃▁▁▁▁▁▁▁▁▁▇

33.9 8

71.1 ▅▁▁▃▇▂▁▁▁▁▃▁▃▁▅▁▁▁▁▁▁ 472.0 52 ▁▅▅▇▂▂▇▁▂▁▂▁▁▁▁

335

This work is licensed under the 
 Creative Commons Attribution-Noncommercial 3.0 
 United States License. To view a copy of this license, visit 
 http://creativecommons.org/licenses/by-nc/3.0/us/

Hadley Wickham @hadleywickham Chief Scientist, RStudio - GitHub

Apr 23, 2017 - Program purrr magrittr dplyr forcats hms ggplot2 broom modelr r4ds.had.co.nz ... R: 3.3.2. + tidyr 0.6.1. OS: macOS Sierra 10.12.4. + readr 1.1.0.

709KB Sizes 0 Downloads 163 Views

Recommend Documents

RStudio Data Import - GitHub
“A data model in which the data is organized into a tree-like structure” - Wikipedia. Page 10. WHAT IS XML, HTML AND JSON? XML: Extensible Markup ...

endocrinology hadley pdf
Sign in. Loading… Page 1. Whoops! There was a problem loading more pages. Retrying... endocrinology hadley pdf. endocrinology hadley pdf. Open. Extract. Open with. Sign In. Main menu. Displaying endocrinology hadley pdf.

The earTh ScienTiST - nesta
Mar 1, 2016 - Earth Science Inquiry with Web Mapping Tools . ... enjoy one of the warmest Christmases ever, there are tornadoes in the South, heavy snows in the .... The story of life dates back 3.8 billion years and is punctuated ..... and reviewed

Notification-NAL-Scientist-Sr-Scientist-Posts.pdf
also have experience atleast for a minimum of 3 years in the relevant field. Familiarity. with finite element codes like Hypermesh, NASTRAN. Understanding of ...

Notification-NAL-Scientist-Sr-Scientist-Posts.pdf
NATIONAL AEROSPACE LABORATORIES ... standards, ARINC 429 data simulation and cockpit display simulation using ... Notification-NAL-Scientist-Sr-Scientist-Posts.pdf. Notification-NAL-Scientist-Sr-Scientist-Posts.pdf. Open. Extract.

Visiting Scientist Proposal - AfricaRice
JOB ANNOUNCEMENT. Business Application Specialist. Ref: GSS/03/2017/23. The Africa Rice Centre (AfricaRice) is seeking a highly qualified Business Application. Specialist to be based at Abidjan, Côte d'Ivoire. About AfricaRice. AfricaRice is a leadi

PDF Married Love Tessa Hadley Full eBook
 Married Love is a collection to treasure, a masterful new work from one of the ... Married Love by Tessa Hadley, Married Love For android by Tessa Hadley, ...

The earTh ScienTiST - nesta
Mar 1, 2016 - demonstrate how to use the popular EarthViewer app in the classroom to illustrate key concepts aligned ... Featured web-sites will be examples created by CIESIN (the Center for ...... cost and be part of the USA delegation.

Chief Cost.pdf
explanation whatsoever for obvious laches involved in the. institution of this public interest litigation, which is styled as. public interest litigation. 8. The Supreme Court has applied the doctrine of laches to the. public interest litigations in

Visiting Scientist Proposal - AfricaRice
The Africa Rice Centre (AfricaRice) is seeking a highly qualified TAAT Rice Value Chain. Coordinator ... AfricaRice is a leading Pan – African rice research organization committed to improving the livelihoods in Africa though ... our operations and

Bank of Maharashtra Bharti 2018 For Chief Financial Officer & Chief ...
The total business of the Bank is over Rs. 2, 30,000 Crores. The Bank. is committed to ... h) Participating in the corporate decision-making process as a member of the Management. Team with joint ... Page 3 of 11. Bank of Maharashtra Bharti 2018 For

new scientist jan.pdf
Download. Connect more apps... Try one of the apps below to open or edit this item. new scientist jan.pdf. new scientist jan.pdf. Open. Extract. Open with. Sign In.

Chief Cost.pdf
explanation whatsoever for obvious laches involved in the. institution of this public interest litigation, which is styled as. public interest litigation. 8. The Supreme Court has applied the doctrine of laches to the. public interest litigations in

August 5, 2015 Via E-mail Daniel McShan Chief Executive ... - GitHub
Aug 5, 2015 - limited to, drawings, schematics, patent application information, ... designs, strategies, materials, design & manufacturing methods as well as third ... Reference Technologies is not going to pay your company any more money.

Luke Mann 3121 Seneca Chief Trail Ellicott City, MD 21042 ... - GitHub
block specific sites in Safari. Application currently has over 5,000 downloads. ”PF Debate Timer”, iOS/Swift: Created an iOS application that serves as a timer for high school debate. Application currently has over 2,000 downloads. ”Yard Saleâ€

Super Scientist Awards.pdf
Page 1 of 4. Page 1 of 4. Page 2 of 4. Page 2 of 4. Page 3 of 4. Page 3 of 4. Page 4 of 4. Page 4 of 4. Super Scientist Awards.pdf. Super Scientist Awards.pdf.