1
00:00:00,360 --> 00:00:00,630
Hi.

2
00:00:00,630 --> 00:00:02,380
Welcome to today's exercise.

3
00:00:02,400 --> 00:00:06,660
For this exercise, you need to build a data app.

4
00:00:06,870 --> 00:00:10,680
The data for the app, you can find them in the lecture resources.

5
00:00:10,680 --> 00:00:13,200
So please download the CSB file from there.

6
00:00:13,380 --> 00:00:18,570
And if you open it in a spreadsheet program, it should look something like this.

7
00:00:22,620 --> 00:00:24,510
So let me zoom in a little bit.

8
00:00:24,600 --> 00:00:33,060
And we have several columns, the country column here, and that's the happiness index of each country.

9
00:00:34,540 --> 00:00:39,610
So the higher the value, the more happy the people of that country are.

10
00:00:39,640 --> 00:00:46,990
Then we have the GDP per capita, and then we have the index of social support, life expectancy.

11
00:00:46,990 --> 00:00:55,270
That's also an index of when we have the freedom to make life choices, generosity and corruption.

12
00:00:56,690 --> 00:00:58,040
For corruption.

13
00:00:58,040 --> 00:01:02,750
The lower the value, the more corruption there is in that particular country.

14
00:01:04,370 --> 00:01:09,350
So these are the doesn't know what you have to build is this app.

15
00:01:09,800 --> 00:01:16,540
So this will be an app where the users can plot different variables against each other.

16
00:01:16,550 --> 00:01:20,700
For example, currently by default when the app loads.

17
00:01:20,720 --> 00:01:24,200
GDP by GDP is plotted.

18
00:01:24,350 --> 00:01:27,740
And so that's basically the same column.

19
00:01:27,740 --> 00:01:29,270
That's this column.

20
00:01:29,300 --> 00:01:37,160
Therefore, we get this scatterplot, but the user can choose to plot, for example, GDP along the

21
00:01:37,160 --> 00:01:44,120
x axis and happiness along the Y axis once they choose happiness in this select box.

22
00:01:44,240 --> 00:01:49,650
So both these are selected boxes, then this plot is generated.

23
00:01:49,670 --> 00:01:55,940
So in each select box you can place three different values.

24
00:01:55,940 --> 00:01:58,550
You can place more if you like, but three is fine.

25
00:01:58,850 --> 00:02:02,630
So if they choose generosity, then you've got this.

26
00:02:03,400 --> 00:02:09,910
So GDP along the x axis and generosity indicator along the Y axis.

27
00:02:11,430 --> 00:02:13,440
And that's all we have.

28
00:02:13,440 --> 00:02:16,530
So that's a title widget I select box.

29
00:02:16,530 --> 00:02:24,450
I select box I title here, which also changes dynamically when we change these selections.

30
00:02:24,450 --> 00:02:30,600
So GDP, unhappiness, and then we have the plot here And now let me give you some hints.

31
00:02:30,630 --> 00:02:37,170
If you don't want to get these things, you can pause the video now and try to solve this app on your

32
00:02:37,170 --> 00:02:37,620
own.

33
00:02:37,620 --> 00:02:43,980
If you have trouble, then please come back to this minute of the video and play the video and listen

34
00:02:43,980 --> 00:02:46,020
to what I'll say now.

35
00:02:46,890 --> 00:02:48,740
So these are my hands.

36
00:02:48,750 --> 00:02:53,850
Number one is you can use the match case.

37
00:02:53,850 --> 00:03:00,930
BLOCK You remember we have covered match case in the basic sections of the course, and perhaps you

38
00:03:00,930 --> 00:03:06,090
will need to match case blocks, not just one, because we have to select boxes.

39
00:03:06,090 --> 00:03:07,560
That was the first hint.

40
00:03:08,310 --> 00:03:10,920
The second hint is above the plot here.

41
00:03:10,920 --> 00:03:15,240
So you learned already how to make a line plot.

42
00:03:15,420 --> 00:03:21,870
This here obviously is not a line plot, so perhaps you can try to find the correct plot using Dear

43
00:03:22,230 --> 00:03:25,170
X, as I showed you in the previous videos.

44
00:03:26,670 --> 00:03:31,230
If you don't find it, then the correct plot is a scatterplot.

45
00:03:31,560 --> 00:03:40,710
That was the second hint and the 13th is that you can use a data frame and you can serve the columns

46
00:03:40,710 --> 00:03:43,710
of the data frame for the axis here.

47
00:03:44,400 --> 00:03:48,390
So these are some hints, some general ideas, some help.

48
00:03:48,570 --> 00:03:50,100
This is a tough exercise.

49
00:03:50,100 --> 00:03:56,760
So please keep that in mind and it's very likely that you will not be able to complete it 100%, which

50
00:03:56,760 --> 00:03:58,020
is completely fine.

51
00:03:58,260 --> 00:03:59,730
So with that, thanks a lot.

52
00:03:59,760 --> 00:04:00,240
See you later.

