Data Wrangling
Welcome
How to read this book
An evolving book
I Manipulation
1
Basics
1.1
dplyr basics
1.2
Filter rows with
filter()
1.2.1
Comparisons
1.2.2
Logical operators
1.3
Add new variables with
mutate()
1.4
Grouped summaries with
summarize()
1.5
Combining multiple operations with the pipe
2
Other single-table verbs
2.1
Select
2.2
Rename
2.3
Change column order
2.4
Transmute
2.5
Arrange
2.6
Distinct
2.7
Slice rows
2.8
Sample
3
Parsing
3.1
Delimited files
3.2
read_csv()
II Tidy data
4
Introduction
5
Basic pivoting
5.1
Longer
5.2
Wider
5.3
Missing values
6
Advanced pivoting
6.1
Longer
6.1.1
Types
6.1.2
Prefixes
6.1.3
Multiple values
6.2
Wider
6.2.1
Prefixes
6.2.2
Multiple values
6.2.3
id_cols
III Working with APIs
7
Introduction
8
API basics
8.1
What is an API?
8.2
Find your API
8.3
Craft your request
8.3.1
Base request
8.3.2
Parameters
8.4
Test your request
8.5
Read the data into R
8.5.1
JSON data
8.5.2
All formats
8.6
Next steps
9
U.S. Census Bureau
9.1
Census Bureau basics
9.1.1
Decennial census
9.1.2
ACS
9.1.3
Population estimates
9.1.4
Choosing data
9.2
tidycensus
9.2.1
Specify a dataset
9.2.2
Find variables
9.2.3
Get data
9.3
Population estimates
9.3.1
Choose data
9.3.2
Craft your request
9.3.3
Read the data into R
9.4
To learn more
10
Google Sheets
10.1
Reading
10.2
Writing
10.3
Finding sheets
10.4
Authentication
10.4.1
Interactive session
10.4.2
Non-interactive session
IV Web scraping
11
rvest
11.1
Web page basics
11.1.1
HTML
11.1.2
CSS
11.2
Scrape data with rvest
11.2.1
Read HTML
11.2.2
Find the CSS selector
11.2.3
Extract the table
References
Data Wrangling
References
Walker, Kyle. 2021.
Analyzing US Census Data: Methods, Maps, and Models in
R
.
https://walker-data.com/census-r/
.