r4ds/import.qmd

28 lines
1.3 KiB
Plaintext

# Wrangle {#sec-import-intro .unnumbered}
```{r}
#| results: "asis"
#| echo: false
source("_common.R")
```
In this part of the book, you'll learn about data wrangling, the art of getting your data into R in a useful form for further work.
In some cases, this is a relatively simple application of a package that does data import.
But in more complex cases it encompasses both tidying and transformation as the native structure of the data might be quite far from the tidy rectangle you'd prefer to work with.
![](diagrams/data-science-wrangle.png)
This part of the book proceeds as follows:
- In @sec-import-rectangular, you'll learn how to get plain-text data in rectangular formats from disk and into R.
- In @sec-import-spreadsheets, you'll learn how to get data from Excel spreadsheets and Google Sheets into R.
- In @sec-import-databases, you'll learn about getting data into R from databases.
- In @sec-rectangle-data, you'll learn how to work with hierarchical data that includes deeply nested lists, as is often created we your raw data is in JSON.
- In @sec-import-webscrape, you'll learn about harvesting data off the web and getting it into R.
- We'll close up the part with a brief discussion on other types of data and pointers for how to get them into R in @sec-import-other.