Skip to content

Commit 3fa4f03

Browse files
committed
Update descriptions in solution files
1 parent 1aca02d commit 3fa4f03

File tree

7 files changed

+133
-7
lines changed

7 files changed

+133
-7
lines changed

Lesson 04/Activity01/activity01_solution.ipynb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Intelligent quotient\n",
8+
"In this activity, we will compare IQ scores among different test groups using Seaborn."
9+
]
10+
},
311
{
412
"cell_type": "code",
513
"execution_count": 1,
@@ -112,6 +120,13 @@
112120
" 'IQ score': group_a + group_b + group_c + group_d})"
113121
]
114122
},
123+
{
124+
"cell_type": "markdown",
125+
"metadata": {},
126+
"source": [
127+
"Create a box plot for each of the IQ scores of different test groups using Seaborn's boxplot function. Use the whitegrid style, set the context to talk, and remove all axes splines, except the one on the bottom. Add a title."
128+
]
129+
},
115130
{
116131
"cell_type": "code",
117132
"execution_count": 9,
@@ -168,7 +183,7 @@
168183
"name": "python",
169184
"nbconvert_exporter": "python",
170185
"pygments_lexer": "ipython3",
171-
"version": "3.7.1"
186+
"version": "3.6.6"
172187
}
173188
},
174189
"nbformat": 4,

Lesson 04/Activity02/activity02_solution.ipynb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Flight passengers across years and months\n",
8+
"In this activity, we will use a heatmap to find patterns in flight passenger data."
9+
]
10+
},
311
{
412
"cell_type": "code",
513
"execution_count": 1,
@@ -396,6 +404,13 @@
396404
"data"
397405
]
398406
},
407+
{
408+
"cell_type": "markdown",
409+
"metadata": {},
410+
"source": [
411+
"Use a heatmap to visualize the given data. The given dataset contains the monthly figures fpr flight passengers for multiple years. Use your own color map. Make sure that the lowest value is the darkest and the highest the brightest color."
412+
]
413+
},
399414
{
400415
"cell_type": "code",
401416
"execution_count": 6,
@@ -474,7 +489,7 @@
474489
"name": "python",
475490
"nbconvert_exporter": "python",
476491
"pygments_lexer": "ipython3",
477-
"version": "3.7.1"
492+
"version": "3.6.6"
478493
}
479494
},
480495
"nbformat": 4,

Lesson 04/Activity03/activity03_solution.ipynb

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Movie comparison revisited\n",
8+
"In this activity, we will use a bar plot to compare movie scores. You are given five movies with scores from Rotten Tomatoes. The Tomatometer is the percentage of approved Tomatometer critics who have given a positive review for the movie. The Audience Score is the percentage of users who have given a score of 3.5 or higher out of 5. Compare these two scores among the five movies."
9+
]
10+
},
311
{
412
"cell_type": "code",
513
"execution_count": 1,
@@ -13,6 +21,13 @@
1321
"import seaborn as sns"
1422
]
1523
},
24+
{
25+
"cell_type": "markdown",
26+
"metadata": {},
27+
"source": [
28+
"Use pandas to read the data located in the subfolder data and transform the data into a useable format for Seaborn's barplot function."
29+
]
30+
},
1631
{
1732
"cell_type": "code",
1833
"execution_count": 2,
@@ -242,6 +257,13 @@
242257
"movie_scores"
243258
]
244259
},
260+
{
261+
"cell_type": "markdown",
262+
"metadata": {},
263+
"source": [
264+
"Use Seaborn to create a visually-appealing bar plot comparing the two scores for all five movies."
265+
]
266+
},
245267
{
246268
"cell_type": "code",
247269
"execution_count": 6,
@@ -289,7 +311,7 @@
289311
"name": "python",
290312
"nbconvert_exporter": "python",
291313
"pygments_lexer": "ipython3",
292-
"version": "3.7.1"
314+
"version": "3.6.6"
293315
}
294316
},
295317
"nbformat": 4,

Lesson 04/Activity04/activity04_solution.ipynb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Violin plots\n",
8+
"In this activity, we will compare IQ scores among different test groups using violin plots."
9+
]
10+
},
311
{
412
"cell_type": "code",
513
"execution_count": 1,
@@ -202,6 +210,13 @@
202210
" 'IQ score': group_a + group_b + group_c + group_d})"
203211
]
204212
},
213+
{
214+
"cell_type": "markdown",
215+
"metadata": {},
216+
"source": [
217+
"Create a violin plot for each of the IQ scores of different test groups using Seaborn's violinplot function. Use the whitegrid style and remove all axes splines, except the one on the bottom. Add a title."
218+
]
219+
},
205220
{
206221
"cell_type": "code",
207222
"execution_count": 11,
@@ -265,7 +280,7 @@
265280
"name": "python",
266281
"nbconvert_exporter": "python",
267282
"pygments_lexer": "ipython3",
268-
"version": "3.7.1"
283+
"version": "3.6.6"
269284
}
270285
},
271286
"nbformat": 4,

Lesson 04/Activity05/activity05_solution.ipynb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Top 30 YouTube Channels\n",
8+
"In this activity FacetGrid is used to show the number of subscribers and the number of views for the top 30 YouTube channels."
9+
]
10+
},
311
{
412
"cell_type": "code",
513
"execution_count": 1,
@@ -194,6 +202,13 @@
194202
" 'Type': ['Subscribers'] * len(subs) + ['Views'] * len(views)})"
195203
]
196204
},
205+
{
206+
"cell_type": "markdown",
207+
"metadata": {},
208+
"source": [
209+
"Visualize the given data using a FacetGrid with two columns. The first column should show the number of subscribers for each YouTube channel, whereas the second column should show the number of views."
210+
]
211+
},
197212
{
198213
"cell_type": "code",
199214
"execution_count": 11,
@@ -249,7 +264,7 @@
249264
"name": "python",
250265
"nbconvert_exporter": "python",
251266
"pygments_lexer": "ipython3",
252-
"version": "3.7.1"
267+
"version": "3.6.6"
253268
}
254269
},
255270
"nbformat": 4,

Lesson 04/Activity06/activity06_solution.ipynb

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Linear regression\n",
8+
"In this activity, we will use a regression plot to visualize the linear relationships."
9+
]
10+
},
311
{
412
"cell_type": "code",
513
"execution_count": 1,
@@ -245,6 +253,13 @@
245253
"mydata.head()"
246254
]
247255
},
256+
{
257+
"cell_type": "markdown",
258+
"metadata": {},
259+
"source": [
260+
"The given dataset is not complete. Filter the data so you end up with samples containing a body mass and a maximum longevity. Only consider samples for the class Mammalia and a body mass below 200,000."
261+
]
262+
},
248263
{
249264
"cell_type": "code",
250265
"execution_count": 5,
@@ -257,6 +272,13 @@
257272
"data = data[np.isfinite(data[longevity]) & np.isfinite(data[mass]) & (data[mass] < 200000)]"
258273
]
259274
},
275+
{
276+
"cell_type": "markdown",
277+
"metadata": {},
278+
"source": [
279+
"Create a regression plot to visualize the linear relationship of the variables."
280+
]
281+
},
260282
{
261283
"cell_type": "code",
262284
"execution_count": 6,
@@ -315,7 +337,7 @@
315337
"name": "python",
316338
"nbconvert_exporter": "python",
317339
"pygments_lexer": "ipython3",
318-
"version": "3.7.1"
340+
"version": "3.6.6"
319341
}
320342
},
321343
"nbformat": 4,

Lesson 04/Activity07/activity07_solution.ipynb

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## Water usage revisited\n",
8+
"In this activity, we will use a tree map to visualize the water usage."
9+
]
10+
},
311
{
412
"cell_type": "code",
513
"execution_count": 2,
@@ -14,6 +22,13 @@
1422
"import squarify"
1523
]
1624
},
25+
{
26+
"cell_type": "markdown",
27+
"metadata": {},
28+
"source": [
29+
"Use pandas to read the data located in the subfolder data."
30+
]
31+
},
1732
{
1833
"cell_type": "code",
1934
"execution_count": 3,
@@ -107,6 +122,13 @@
107122
"mydata"
108123
]
109124
},
125+
{
126+
"cell_type": "markdown",
127+
"metadata": {},
128+
"source": [
129+
"Use a tree map to visualize the water usage. Show the percentages for each tile and add a title."
130+
]
131+
},
110132
{
111133
"cell_type": "code",
112134
"execution_count": 7,
@@ -162,7 +184,7 @@
162184
"name": "python",
163185
"nbconvert_exporter": "python",
164186
"pygments_lexer": "ipython3",
165-
"version": "3.6.4"
187+
"version": "3.6.6"
166188
}
167189
},
168190
"nbformat": 4,

0 commit comments

Comments
 (0)