Tweak explore intro

This commit is contained in:
hadley 2016-07-21 15:27:19 -05:00
parent 437e82736a
commit 48351807ba
1 changed files with 6 additions and 38 deletions

View File

@ -2,50 +2,18 @@
# Introduction
The goal of the first part of this book is to get your up to speed with the basic tools of data exploration as quickly as possible:
The goal of the first part of this book is to get you up to speed with the basic tools of data exploration as quickly as possible:
```{r echo = FALSE, out.width = "75%"}
knitr::include_graphics("diagrams/data-science-explore.png")
```
```{r setup, include = FALSE}
library(ggplot2)
library(dplyr)
```
You will get frustrated when you start programming it R, because it such a stickler for mistakes. Even one character out of place will cause it to complain. However, that frustration is both typical and temporary. It happens to everyone, and the only way to get over it is to keep trying.
If you are like most humans, your brain is not designed to work with raw data. Your working memory can only pay attention to a few values at a time, which makes it difficult to discover patterns in raw data. For example, can you spot the striking relationship between $X$ and $Y$ in the table below?
Visualisation is a great place to start with R programming, because the payoff is so clear: you get to make elegant and informative plots that help you understand data. In [data visualisation] you'll dive into visualisation, learning the basic structure of a ggplot2 plot, and powerful techniques for turning data into plots.
```{r data, echo=FALSE}
circle <- tibble(
pi = sort(rep(seq(0.2, 1.8 * pi, length = 5), 2) + runif(10, -0.15, 0.15)),
x = cos(pi) + 1,
y = sin(pi) - 1
)
circle %>%
select(-pi) %>%
knitr::kable(digits = 2)
```
While we may stumble over raw data, we can easily process visual information. Visualization works because your brain processes visual information in a different (and much wider) channel than it processes symbolic information, like words and numbers. Within your brain is a powerful visual processing system fine-tuned by millions of years of evolution. As a result, often the quickest way to understand your data is to visualize it. Once you plot your data, you can instantly see the relationships between values. Here, we see that the values fall on a circle.
```{r echo=FALSE, dependson = data, fig.asp = 1, out.width = "30%", fig.width = 3}
ggplot(circle, aes(x, y)) +
geom_point() +
coord_fixed()
```
In the following chapters you will:
* Dive into ggplot2 in [data visualisation], learning powerful
and general techniques for turning raw data into visual insights.
* Visualisation alone is typically not enough, so in [data transformation]
you'll learn the key verbs that allow you select important variables,
filter out key observations, and create new variables and summaries.
Visualisation alone is typically not enough, so in [data transformation] you'll learn the key verbs that allow you select important variables, filter out key observations, create new variables, and compute summaries.
* In [exploratory data analysis], you'll combine visualisation and
transformation with your curiosity and scepticism to ask and answer
interesting questions about data.
Finally, in [exploratory data analysis], you'll combine visualisation and transformation with your curiosity and scepticism to ask and answer interesting questions about data.
Modelling is an important part of the exploratory process, but you don't have the skills to effectively learn or apply it yet. We'll come back to modelling in [model], once you're better equipped with more data wrangling and programming tools.
Modelling is an important part of the exploratory process, but you don't have the skills to effectively learn or apply it yet. We'll come back to modelling in [modelling](#model-intro), once you're better equipped with more data wrangling and programming tools.