Acknowledgments |
|
xv | |
Introduction |
|
xvii | |
What Is Data Analysis? |
|
xviii | |
Who Is This Book For? |
|
xviii | |
Conventions Used in This Book |
|
xviii | |
What This Book Covers |
|
xix | |
Part I Data Mining |
|
xix | |
Part II Data Analysis |
|
xx | |
Downloading and Installing Python |
|
xx | |
Installing on Windows |
|
xxi | |
Installing on macOS |
|
xxi | |
Getting Help When You're Stuck |
|
xxi | |
Summary |
|
xxiv | |
|
|
1 | (98) |
|
1 The Programming Languages You'll Need To Know |
|
|
3 | (24) |
|
|
4 | (10) |
|
|
4 | (2) |
|
|
6 | (6) |
|
|
12 | (2) |
|
|
14 | (11) |
|
|
14 | (1) |
|
Getting Started with Python |
|
|
14 | (2) |
|
|
16 | (1) |
|
|
17 | (1) |
|
Storing Values in Variables |
|
|
17 | (2) |
|
Storing Multiple Values in Lists |
|
|
19 | (1) |
|
|
20 | (1) |
|
Creating Your Own Functions |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
23 | (2) |
|
|
25 | (2) |
|
|
27 | (16) |
|
|
28 | (1) |
|
|
28 | (9) |
|
Getting a YouTube API Key |
|
|
31 | (1) |
|
Retrieving JSON Objects Using Your Credentials |
|
|
31 | (6) |
|
Answering a Research Question Using Data |
|
|
37 | (4) |
|
Refining the Data That Your API Returns |
|
|
41 | (1) |
|
|
41 | (2) |
|
|
43 | (20) |
|
Writing Your First Script |
|
|
44 | (1) |
|
|
44 | (2) |
|
|
46 | (1) |
|
|
46 | (2) |
|
Creating a URL-based API Call |
|
|
48 | (1) |
|
Storing Data in a Spreadsheet |
|
|
49 | (4) |
|
Converting JSON into a Dictionary |
|
|
51 | (1) |
|
|
51 | (2) |
|
Running the Finished Script |
|
|
53 | (2) |
|
Dealing with API Pagination |
|
|
55 | (2) |
|
Templates: How to Make Your Code Reusable |
|
|
57 | (4) |
|
Storing Values That Change in Variables |
|
|
57 | (1) |
|
Storing Code in a Reusable Function |
|
|
58 | (3) |
|
|
61 | (2) |
|
4 Scraping Your Own Facebook Data |
|
|
63 | (14) |
|
|
64 | (1) |
|
Downloading Your Facebook Data |
|
|
64 | (2) |
|
Reviewing the Data and Inspecting the Code |
|
|
66 | (4) |
|
Structuring Information as Data |
|
|
67 | (1) |
|
|
68 | (2) |
|
Analyzing HTML Code to Recognize Patterns |
|
|
70 | (2) |
|
Grabbing the Elements You Need |
|
|
70 | (1) |
|
|
71 | (1) |
|
Writing Data into a Spreadsheet |
|
|
72 | (3) |
|
|
72 | (2) |
|
|
74 | (1) |
|
|
75 | (1) |
|
|
76 | (1) |
|
|
77 | (22) |
|
|
78 | (5) |
|
Ethical Considerations for Data Scraping |
|
|
80 | (1) |
|
The Robots Exclusion Protocol |
|
|
80 | (2) |
|
|
82 | (1) |
|
Technical Considerations for Data Scraping |
|
|
82 | (1) |
|
Reasons for Scraping Data |
|
|
82 | (1) |
|
Scraping from a Live Website |
|
|
83 | (15) |
|
Analyzing the Page's Contents |
|
|
84 | (4) |
|
Storing the Page Content in Variables |
|
|
88 | (4) |
|
Making the Script Reusable |
|
|
92 | (2) |
|
Practicing Polite Scraping |
|
|
94 | (4) |
|
|
98 | (1) |
|
|
99 | (82) |
|
6 Introduction To Data Analysis |
|
|
101 | (22) |
|
The Process of Data Analysis |
|
|
102 | (1) |
|
|
103 | (1) |
|
Getting Started with Google Sheets |
|
|
104 | (2) |
|
Modifying and Formatting the Data |
|
|
106 | (4) |
|
|
110 | (4) |
|
Using Pivot Tables to Summarize Data |
|
|
110 | (2) |
|
Using Formulas to Do Math |
|
|
112 | (2) |
|
Sorting and Filtering the Data |
|
|
114 | (3) |
|
|
117 | (4) |
|
Other Ways to Use Google Sheets |
|
|
121 | (1) |
|
|
122 | (1) |
|
|
123 | (12) |
|
Understanding Our Bot Through Charts |
|
|
124 | (7) |
|
|
124 | (4) |
|
|
128 | (1) |
|
|
128 | (3) |
|
|
131 | (2) |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
133 | (2) |
|
8 Advanced Tools For Data Analysis |
|
|
135 | (16) |
|
|
136 | (6) |
|
Setting Up a Virtual Environment |
|
|
136 | (2) |
|
|
138 | (1) |
|
Installing Jupyter and Creating Your First Notebook |
|
|
139 | (1) |
|
|
140 | (2) |
|
|
142 | (7) |
|
Working with Series and Data Frames |
|
|
143 | (2) |
|
Reading and Exploring Large Data Files |
|
|
145 | (1) |
|
|
146 | (2) |
|
Viewing Specific Columns and Rows |
|
|
148 | (1) |
|
|
149 | (2) |
|
9 Finding Trends In Reddit Data |
|
|
151 | (12) |
|
Clarifying Our Research Objective |
|
|
152 | (1) |
|
|
152 | (1) |
|
Narrowing the Data's Scope |
|
|
153 | (4) |
|
Selecting Data from Specific Columns |
|
|
153 | (1) |
|
|
154 | (2) |
|
|
156 | (1) |
|
|
157 | (5) |
|
|
158 | (2) |
|
|
160 | (2) |
|
|
162 | (1) |
|
10 Measuring The Twitter Activity Of Political Actors |
|
|
163 | (14) |
|
|
164 | (4) |
|
Setting Up Your Environment |
|
|
164 | (1) |
|
Loading the Data into Your Notebook |
|
|
165 | (3) |
|
|
168 | (1) |
|
|
169 | (1) |
|
Formatting the Data as datetimes |
|
|
170 | (2) |
|
|
172 | (3) |
|
|
175 | (1) |
|
|
176 | (1) |
|
|
177 | (4) |
|
|
178 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
180 | (1) |
Index |
|
181 | |