Instructor Preface |
|
xiii | |
Teaching Resources |
|
xv | |
Introduction: Data Science, Many Skills |
|
xvii | |
What Is Data Science? |
|
xviii | |
The Steps in Doing Data Science |
|
xix | |
The Skills Needed to Do Data Science |
|
xx | |
Identifying Data Problems |
|
xxii | |
Additional Introductory Thoughts |
|
xxv | |
Case Study Overview: Customer Churn in the Airline Industry |
|
xxvii | |
Net Promoter Score |
|
xxviii | |
Southeast and Its Regional Airline Partners |
|
xxviii | |
The Data Available |
|
xxix | |
Attribute Names |
|
xxix | |
Chapter Challenges |
|
xxxii | |
Sources |
|
xxxii | |
|
Chapter 1 Begin at the Beginning With R |
|
|
1 | (20) |
|
|
3 | (1) |
|
|
4 | (1) |
|
Creating and Using Vectors |
|
|
5 | (3) |
|
|
8 | (2) |
|
|
10 | (1) |
|
Using an Integrated Development Environment |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
13 | (4) |
|
Case Study: Calculating NPS |
|
|
17 | (2) |
|
|
19 | (1) |
|
|
19 | (1) |
|
R Functions Used in This Chapter |
|
|
19 | (2) |
|
Chapter 2 Rows and Columns |
|
|
21 | (18) |
|
|
24 | (3) |
|
|
27 | (4) |
|
Accessing Columns in a Dataframe |
|
|
31 | (3) |
|
Case Study: Calculating NPS Using a Dataframe |
|
|
34 | (3) |
|
|
37 | (1) |
|
|
37 | (1) |
|
R Functions Used in This Chapter |
|
|
38 | (1) |
|
|
39 | (22) |
|
|
40 | (4) |
|
Removing Rows and Columns |
|
|
44 | (2) |
|
Renaming Rows and Columns |
|
|
46 | (1) |
|
|
47 | (2) |
|
Sorting and Subsetting Dataframes |
|
|
49 | (2) |
|
Tidyverse: An Introduction and How to Install the Package |
|
|
51 | (2) |
|
Sorting and Subsetting Dataframes Using Tidyverse |
|
|
53 | (2) |
|
Case Study: Reading, Cleaning, and Exploring a Survey Dataset |
|
|
55 | (4) |
|
|
59 | (1) |
|
|
60 | (1) |
|
R Functions Used in This Chapter |
|
|
60 | (1) |
|
Chapter A What's My' Function? |
|
|
61 | (18) |
|
Why Create and Use Functions? |
|
|
62 | (1) |
|
|
63 | (5) |
|
|
68 | (2) |
|
Installing a Package to Access a Function |
|
|
70 | (2) |
|
Case Study: Creating and Using a Calculate NPS Function |
|
|
72 | (4) |
|
|
76 | (1) |
|
|
76 | (1) |
|
R Functions Used in This Chapter |
|
|
77 | (2) |
|
Chapter 5 Beer, Farms, Peas, and the Use of Statistics |
|
|
79 | (18) |
|
|
80 | (2) |
|
|
82 | (1) |
|
Understanding Descriptive Statistics |
|
|
82 | (2) |
|
Using Descriptive Statistics |
|
|
84 | (4) |
|
Using Histograms to Understand a Distribution |
|
|
88 | (3) |
|
|
91 | (1) |
|
Case Study: Exploring LTR Distributions |
|
|
92 | (3) |
|
|
95 | (1) |
|
|
95 | (1) |
|
R Functions Used in This Chapter |
|
|
96 | (1) |
|
Chapter 6 Sample in a Jar |
|
|
97 | (22) |
|
|
100 | (1) |
|
|
101 | (2) |
|
Law of Large Numbers and the Central Limit Theorem |
|
|
103 | (4) |
|
|
107 | (5) |
|
Case Study: Analyzing the Impact of a New Treatment |
|
|
112 | (4) |
|
|
116 | (1) |
|
|
116 | (1) |
|
R Functions Used in This Chapter |
|
|
117 | (2) |
|
|
119 | (34) |
|
Importing Data Using RStudio |
|
|
121 | (3) |
|
|
124 | (5) |
|
Working with Data From External Databases |
|
|
129 | (1) |
|
|
130 | (5) |
|
Comparing SQL and R/Tidyverse for Accessing a Dataset |
|
|
135 | (4) |
|
|
139 | (6) |
|
Case Study: Reading, Cleaning, and Exploring a Survey Dataset |
|
|
145 | (5) |
|
|
150 | (1) |
|
|
151 | (1) |
|
R Functions Used in This Chapter |
|
|
151 | (2) |
|
Chapter 8 Pictures Versus Numbers |
|
|
153 | (28) |
|
|
155 | (2) |
|
|
157 | (1) |
|
Using the ggplot2 Package |
|
|
158 | (8) |
|
More-Advanced Visualizations |
|
|
166 | (5) |
|
Case Study: Visualizing Key Attributes Related to NPS |
|
|
171 | (8) |
|
|
179 | (1) |
|
|
179 | (1) |
|
R Functions Used in This Chapter |
|
|
180 | (1) |
|
|
181 | (26) |
|
Creating Map Visualizations With ggplot2 |
|
|
183 | (9) |
|
|
192 | (6) |
|
Zooming Into a Subset of a Map |
|
|
198 | (2) |
|
Case Study: Explore NPS by State and City |
|
|
200 | (4) |
|
|
204 | (1) |
|
|
204 | (1) |
|
R Functions Used in This Chapter |
|
|
205 | (2) |
|
Chapter 10 Lining Up Our Models |
|
|
207 | (32) |
|
|
208 | (1) |
|
Supervised and Unsupervised Machine Learning |
|
|
208 | (2) |
|
|
210 | (2) |
|
An Example--Car Maintenance |
|
|
212 | (9) |
|
|
221 | (2) |
|
Partitioning into Training and Cross Validation Datasets |
|
|
223 | (5) |
|
Using k-fold Cross Validation |
|
|
228 | (3) |
|
Case Study: Building a Linear Model Using Survey Data |
|
|
231 | (5) |
|
|
236 | (1) |
|
|
236 | (1) |
|
R Functions Used in This Chapter |
|
|
237 | (2) |
|
Chapter 11 What's Your Vector, Victor? |
|
|
239 | (38) |
|
|
240 | (1) |
|
|
240 | (7) |
|
Supervised Learning via Support Vector Machines |
|
|
247 | (3) |
|
Support Vector Machines in R |
|
|
250 | (11) |
|
Supervised Learning via Classification and Regression Trees |
|
|
261 | (5) |
|
Case Study: Building Supervised Models From the Survey |
|
|
266 | (8) |
|
|
274 | (1) |
|
|
274 | (1) |
|
R Functions Used in This Chapter |
|
|
275 | (2) |
|
Chapter 12 Hi Ho, Hi Ho--Data Mining We Go |
|
|
277 | (26) |
|
|
279 | (1) |
|
|
280 | (1) |
|
|
281 | (6) |
|
Exploring How the Association Rules Algorithm Works |
|
|
287 | (1) |
|
Building Association Rules in R |
|
|
288 | (7) |
|
Case Study: Exploring Association Rules Within the Survey |
|
|
295 | (5) |
|
|
300 | (1) |
|
|
301 | (1) |
|
R Functions Used in This Chapter |
|
|
301 | (2) |
|
Chapter 13 Word Perfect (Text Mining) |
|
|
303 | (32) |
|
|
305 | (2) |
|
Creating Word Clouds Using the Quanteda Package |
|
|
307 | (4) |
|
Exploring the Text via Sentiment Analysis |
|
|
311 | (3) |
|
|
314 | (4) |
|
Other Uses of Text Mining |
|
|
318 | (1) |
|
Case Study: Connecting Topics to NPS |
|
|
319 | (13) |
|
|
332 | (1) |
|
|
332 | (1) |
|
R Functions Used in This Chapter |
|
|
333 | (2) |
|
Chapter 14 Shiny Web Apps |
|
|
335 | (18) |
|
Creating Web Applications in R |
|
|
336 | (5) |
|
Deploying the Application |
|
|
341 | (6) |
|
Case Study: Visualizing NPS by Key Attributes |
|
|
347 | (4) |
|
|
351 | (1) |
|
|
351 | (1) |
|
R Functions Used in This Chapter |
|
|
351 | (2) |
|
Chapter 15 Time for a Deep Dive |
|
|
353 | (32) |
|
The Impact of Deep Learning |
|
|
354 | (1) |
|
Deep Learning Is Supervised Learning |
|
|
355 | (1) |
|
How Does Deep Learning Work? |
|
|
356 | (2) |
|
Deep Learning in R--An Example |
|
|
358 | (7) |
|
Deep Learning in R--An Image Analysis Example |
|
|
365 | (9) |
|
Deep Learning in R--Using a Prebuilt Model |
|
|
374 | (4) |
|
Case Study: Building Neural Networks From the Survey |
|
|
378 | (3) |
|
|
381 | (1) |
|
|
382 | (1) |
|
R Functions Used in This Chapter |
|
|
383 | (2) |
Index |
|
385 | |