WEBVTT

1
00:00:00.120 --> 00:00:02.600
<v Speaker 1>Welcome to the deep dive, where we take your chosen

2
00:00:02.640 --> 00:00:06.879
<v Speaker 1>sources and well distill them down to the essential insights. Right.

3
00:00:07.160 --> 00:00:09.199
<v Speaker 1>Think of us as your shirt cut to understanding what

4
00:00:09.240 --> 00:00:09.839
<v Speaker 1>really matters.

5
00:00:09.919 --> 00:00:11.119
<v Speaker 2>Yeah, cutting through the noise.

6
00:00:11.560 --> 00:00:14.880
<v Speaker 1>Today we're plunging into the world of Python data visualization,

7
00:00:15.480 --> 00:00:21.239
<v Speaker 1>guided by Ashwun Pajankar's book Practical Python Data Visualization, specifically for.

8
00:00:21.280 --> 00:00:24.719
<v Speaker 2>You, the learner, exactly, the learner, someone looking for that

9
00:00:24.760 --> 00:00:28.679
<v Speaker 2>efficient path to knowledge, those aha moments without getting you know,

10
00:00:28.760 --> 00:00:32.479
<v Speaker 2>bogged down. So our mission today is to explore pajon

11
00:00:32.560 --> 00:00:35.359
<v Speaker 2>Car's book, focusing on how it gets you from zero

12
00:00:35.799 --> 00:00:40.200
<v Speaker 2>to visualizing data effectively in Python. Okay, we'll be highlighting

13
00:00:40.240 --> 00:00:44.240
<v Speaker 2>the key concepts and practical steps from those initial chapters.

14
00:00:44.320 --> 00:00:46.520
<v Speaker 1>Okay, so where does pajon Car start. It's got to

15
00:00:46.560 --> 00:00:49.960
<v Speaker 1>be the foundation Python itself, right, yep? Chapter one. Now

16
00:00:49.960 --> 00:00:52.039
<v Speaker 1>Python's been around for a while, hasn't it. The book

17
00:00:52.079 --> 00:00:54.960
<v Speaker 1>mentions Guido van Rossum created it building on an older

18
00:00:55.039 --> 00:00:58.320
<v Speaker 1>language called ABC. That's right, first version way back in

19
00:00:58.399 --> 00:01:02.759
<v Speaker 1>ninety one. And it's interesting they even retired Python too

20
00:01:03.079 --> 00:01:05.719
<v Speaker 1>fairly recently. Shows it's still evolving.

21
00:01:05.640 --> 00:01:09.359
<v Speaker 2>Yeah, constantly. And what's fascinating about that evolution are the

22
00:01:09.599 --> 00:01:13.239
<v Speaker 2>Python Enhancement Proposals or PEPs PEPs okay. I think of

23
00:01:13.239 --> 00:01:17.359
<v Speaker 2>these as community driven proposals for how Python should grow

24
00:01:17.359 --> 00:01:21.200
<v Speaker 2>and improve. Pajankar highlights PK twenty The Zen of Python.

25
00:01:21.359 --> 00:01:24.599
<v Speaker 1>Ah, The Zen of Python. I love that. It's almost

26
00:01:24.599 --> 00:01:27.599
<v Speaker 1>like a philosophy for coders. It really is principles like

27
00:01:28.000 --> 00:01:32.920
<v Speaker 1>beautiful is better than ugly and readability counts. You might think, Okay,

28
00:01:32.920 --> 00:01:35.599
<v Speaker 1>how does that relate to making charts, But it really does,

29
00:01:35.680 --> 00:01:39.280
<v Speaker 1>doesn't it clear, Well written code just makes the whole

30
00:01:39.359 --> 00:01:41.120
<v Speaker 1>visualization process.

31
00:01:40.680 --> 00:01:44.760
<v Speaker 2>Smoother, absolutely easier to understand later easier to fix. These

32
00:01:44.799 --> 00:01:48.359
<v Speaker 2>principles are fundamental to why Python is so well user

33
00:01:48.359 --> 00:01:51.040
<v Speaker 2>friendly and why it's become such a go to language

34
00:01:51.040 --> 00:01:54.120
<v Speaker 2>across so many fields. The book touches on this diversity,

35
00:01:54.159 --> 00:01:57.760
<v Speaker 2>web development, gui's scientific, computing.

36
00:01:57.400 --> 00:01:58.599
<v Speaker 1>Even system administration.

37
00:01:58.840 --> 00:02:02.680
<v Speaker 2>Right includes a link to Python success stories, which really

38
00:02:02.719 --> 00:02:06.200
<v Speaker 2>illustrates just how widely it's used to solve real world problems.

39
00:02:06.319 --> 00:02:08.759
<v Speaker 1>So you could be visualizing I don't know, financial.

40
00:02:08.360 --> 00:02:12.639
<v Speaker 2>Trends or or mapping information spread It's incredibly versatile.

41
00:02:12.759 --> 00:02:16.159
<v Speaker 1>Now for actually getting Python onto your computer, the book

42
00:02:16.280 --> 00:02:21.080
<v Speaker 1>walks through installation for different systems. For Windows, it involves

43
00:02:21.120 --> 00:02:24.080
<v Speaker 1>downloading from python dot org. And this is important, making

44
00:02:24.080 --> 00:02:26.360
<v Speaker 1>sure you add Python to your path. Ah.

45
00:02:26.479 --> 00:02:28.439
<v Speaker 2>Yes, the path variable crucial.

46
00:02:28.520 --> 00:02:31.039
<v Speaker 1>It basically tells your computer where to find pythons so

47
00:02:31.080 --> 00:02:33.080
<v Speaker 1>you can run it from the command line. Then you

48
00:02:33.199 --> 00:02:36.000
<v Speaker 1>verify it with Python dash V and PIP three dash v.

49
00:02:36.319 --> 00:02:39.599
<v Speaker 1>That PIP three is your package installer, right, we'll need that.

50
00:02:39.680 --> 00:02:43.639
<v Speaker 2>Definitely for installing all the visualization libraries later. And for

51
00:02:43.800 --> 00:02:47.879
<v Speaker 2>Linux users like Ubuntu, Pujankar notes Python three and PIP

52
00:02:47.960 --> 00:02:49.680
<v Speaker 2>three are often already installed.

53
00:02:49.800 --> 00:02:50.319
<v Speaker 1>Convenient.

54
00:02:50.400 --> 00:02:52.719
<v Speaker 2>Yeah, just check with Python three dash V and PIP

55
00:02:52.719 --> 00:02:56.000
<v Speaker 2>three dash V. Knowing you have those tools ready is

56
00:02:56.000 --> 00:02:56.479
<v Speaker 2>step one.

57
00:02:56.639 --> 00:03:01.120
<v Speaker 1>Okay, tools ready. Then Pagencar introduces Python's different modes. There's

58
00:03:01.280 --> 00:03:02.439
<v Speaker 1>interactive mode.

59
00:03:02.240 --> 00:03:05.919
<v Speaker 2>Where you type code get instant results good for quick tests.

60
00:03:05.719 --> 00:03:07.960
<v Speaker 1>And script mode where you save your code and dot

61
00:03:08.000 --> 00:03:11.400
<v Speaker 1>wi files to run later more for actual programs exactly.

62
00:03:11.800 --> 00:03:14.719
<v Speaker 2>He also mentions IDL, which comes with Python.

63
00:03:14.639 --> 00:03:17.159
<v Speaker 1>Right, the Integrated Development and Learning Environment.

64
00:03:17.000 --> 00:03:20.039
<v Speaker 2>A simple editor to start writing and running. Python works

65
00:03:20.039 --> 00:03:22.080
<v Speaker 2>on Windows and Linux, and he shows.

66
00:03:21.840 --> 00:03:26.000
<v Speaker 1>That classic Hello World example. In both modes. It's a

67
00:03:26.039 --> 00:03:29.520
<v Speaker 1>small thing, but getting that first program to run always

68
00:03:29.560 --> 00:03:30.080
<v Speaker 1>feels good.

69
00:03:30.159 --> 00:03:34.240
<v Speaker 2>It does that solid Python foundation, then leads us straight

70
00:03:34.240 --> 00:03:36.199
<v Speaker 2>into chapter two and Jupiter Notebook.

71
00:03:36.400 --> 00:03:39.960
<v Speaker 1>Ah, Jupiter, okay, so way Jupiter. What's the advantage over

72
00:03:40.120 --> 00:03:41.960
<v Speaker 1>just the basic interactive mode.

73
00:03:42.039 --> 00:03:44.520
<v Speaker 2>Well, if you've ever been frustrated running code line by

74
00:03:44.560 --> 00:03:47.400
<v Speaker 2>line and you make a mistake and can't easily go back,

75
00:03:47.479 --> 00:03:49.319
<v Speaker 2>or you want to save your results with the code,

76
00:03:49.680 --> 00:03:50.919
<v Speaker 2>Jupiter is a game.

77
00:03:50.800 --> 00:03:53.000
<v Speaker 1>Changer, right. It fixes those issues.

78
00:03:53.080 --> 00:03:55.639
<v Speaker 2>The gen car describes it as a server program. You

79
00:03:55.719 --> 00:03:57.759
<v Speaker 2>run it and it lets you create these interactive notebooks

80
00:03:57.879 --> 00:04:00.719
<v Speaker 2>right in your web browser. Okay, in the browser interesting

81
00:04:00.840 --> 00:04:04.120
<v Speaker 2>hugely popular in research and data science because you can

82
00:04:04.199 --> 00:04:09.159
<v Speaker 2>mix your code the output, charts and tables, and even

83
00:04:09.199 --> 00:04:11.800
<v Speaker 2>text explanations all in one document.

84
00:04:11.919 --> 00:04:14.280
<v Speaker 1>So it's like a dynamic report where the analysis and

85
00:04:14.319 --> 00:04:15.360
<v Speaker 1>results live together.

86
00:04:15.479 --> 00:04:19.759
<v Speaker 2>Precisely. Setting it up is pretty straightforward. PIP three Install.

87
00:04:19.480 --> 00:04:21.319
<v Speaker 1>Jupiter using that PIT three again.

88
00:04:21.439 --> 00:04:23.959
<v Speaker 2>Yep. Then you launch it from your command line with

89
00:04:24.040 --> 00:04:26.839
<v Speaker 2>jupi notebook. It usually pops open in your browser at

90
00:04:26.879 --> 00:04:28.879
<v Speaker 2>localhost dot eight eight eight eight.

91
00:04:29.040 --> 00:04:30.079
<v Speaker 1>And there's sometimes a token.

92
00:04:30.279 --> 00:04:33.319
<v Speaker 2>Yeah, Pajuancar mentions the token it's just a security measure.

93
00:04:33.399 --> 00:04:36.160
<v Speaker 2>Make sure only you access your notebooks. Nothing to worry

94
00:04:36.160 --> 00:04:37.319
<v Speaker 2>about usually gotcha.

95
00:04:37.519 --> 00:04:39.160
<v Speaker 1>He gives a quick tour of the interface too.

96
00:04:39.319 --> 00:04:42.680
<v Speaker 2>He does the files tab for navigating, running tab to

97
00:04:42.680 --> 00:04:45.839
<v Speaker 2>see active notebooks, clusters for more advanced stuff.

98
00:04:46.000 --> 00:04:49.600
<v Speaker 1>But the core is creating a new Python three notebook.

99
00:04:49.800 --> 00:04:52.120
<v Speaker 2>Right and inside that you have these things.

100
00:04:51.920 --> 00:04:55.319
<v Speaker 1>Called cells cells. Yeah, I remember first using those. It

101
00:04:55.600 --> 00:04:57.480
<v Speaker 1>felt much more organized for trying.

102
00:04:57.240 --> 00:05:00.399
<v Speaker 2>Things out, definitely, And Pajankar points out the different types

103
00:05:00.959 --> 00:05:03.920
<v Speaker 2>code cells for your Python and markdown.

104
00:05:03.439 --> 00:05:05.800
<v Speaker 1>Cell arcdown for formatting text.

105
00:05:05.720 --> 00:05:09.759
<v Speaker 2>Exactly, for adding headings, notes, lists, making your notebook readable.

106
00:05:09.759 --> 00:05:12.319
<v Speaker 2>He shows a quick example, and these notebooks save as

107
00:05:12.360 --> 00:05:13.920
<v Speaker 2>ipomanbi files.

108
00:05:13.560 --> 00:05:16.160
<v Speaker 1>Dot ipmb okay keeps everything for.

109
00:05:16.120 --> 00:05:20.399
<v Speaker 2>A project together exactly, code, output, notes all in one place.

110
00:05:20.720 --> 00:05:23.639
<v Speaker 1>Okay, so we have Python setup, we have this interactive

111
00:05:23.720 --> 00:05:27.279
<v Speaker 1>Jupiter environment. Chapter three must be where the visualization starts, right.

112
00:05:27.399 --> 00:05:30.639
<v Speaker 2>It is first taste of visualization with a library called Leather.

113
00:05:30.959 --> 00:05:32.040
<v Speaker 1>Leather never heard of it.

114
00:05:32.199 --> 00:05:35.920
<v Speaker 2>Pajancar introduces it as a really user friendly way to

115
00:05:36.000 --> 00:05:38.639
<v Speaker 2>make basic charts quickly, simple syntax.

116
00:05:38.959 --> 00:05:39.720
<v Speaker 1>How do you get it?

117
00:05:39.920 --> 00:05:43.360
<v Speaker 2>You guessed it? PIP three install Leather huh? Okay, and

118
00:05:43.439 --> 00:05:46.439
<v Speaker 2>what's neat here is. Pajankar shows you can run operating

119
00:05:46.480 --> 00:05:50.800
<v Speaker 2>system commands directly from inside Jupiter using an exclamation mark

120
00:05:50.839 --> 00:05:53.120
<v Speaker 2>before the command. So you could do dot PIP three,

121
00:05:53.279 --> 00:05:56.519
<v Speaker 2>install leather, write in a cell or dull less to

122
00:05:56.759 --> 00:05:58.519
<v Speaker 2>list files. Pretty handy.

123
00:05:58.800 --> 00:06:02.439
<v Speaker 1>That is handy, let's jump around. He also mentions indentation right,

124
00:06:02.439 --> 00:06:04.160
<v Speaker 1>that's super important in Python, crucial.

125
00:06:04.199 --> 00:06:08.439
<v Speaker 2>He highlights it specifically. Unlike languages using curly braces, Python

126
00:06:08.560 --> 00:06:12.519
<v Speaker 2>uses white space indentation to structure cod blocks.

127
00:06:12.240 --> 00:06:14.439
<v Speaker 1>So it's not just for looks. It actually tells Python

128
00:06:14.480 --> 00:06:16.120
<v Speaker 1>how the code fits together exactly.

129
00:06:16.240 --> 00:06:17.959
<v Speaker 2>Get it wrong, you get errors.

130
00:06:18.040 --> 00:06:21.399
<v Speaker 1>Good warning. Okay. So plotting with letter how does that work?

131
00:06:21.600 --> 00:06:25.079
<v Speaker 2>The Junker demonstrates defining your data points and Leather is

132
00:06:25.160 --> 00:06:28.199
<v Speaker 2>quite flexible. Accepts data in a few formats like lists

133
00:06:28.199 --> 00:06:28.680
<v Speaker 2>of pairs.

134
00:06:28.800 --> 00:06:29.120
<v Speaker 1>Okay.

135
00:06:29.319 --> 00:06:32.319
<v Speaker 2>Then you create a chart object. Then you add things

136
00:06:32.319 --> 00:06:37.000
<v Speaker 2>to it like dots using chart dot ad dots makes sense. Finally,

137
00:06:37.079 --> 00:06:38.920
<v Speaker 2>to see it or save it, you use chart dot

138
00:06:38.959 --> 00:06:43.360
<v Speaker 2>to SVG. It outputs a scalable mector graphic file SVG.

139
00:06:43.560 --> 00:06:46.480
<v Speaker 1>Okay, so it's a pretty direct path. Uh, data chart

140
00:06:46.480 --> 00:06:48.839
<v Speaker 1>object ad elements output very direct.

141
00:06:48.879 --> 00:06:52.600
<v Speaker 2>He also shows tweaking the look, dot color size, and

142
00:06:52.639 --> 00:06:55.000
<v Speaker 2>plotting multiple sets of data on one chart.

143
00:06:55.199 --> 00:06:58.199
<v Speaker 1>Does leather handle colors automatically for multiple sets?

144
00:06:58.279 --> 00:07:01.759
<v Speaker 2>It does? Yeah, picks different default colors which helps distinguish them.

145
00:07:01.879 --> 00:07:04.360
<v Speaker 1>Nice. What else can leather do besides dots?

146
00:07:04.800 --> 00:07:08.759
<v Speaker 2>Pajunkar introduces lines with adline bar charts with AD bars

147
00:07:08.879 --> 00:07:11.839
<v Speaker 2>good for text categories, and column charts with AD columns.

148
00:07:11.959 --> 00:07:13.680
<v Speaker 1>So the basic chart types.

149
00:07:13.360 --> 00:07:16.519
<v Speaker 2>The fundamentals, Yeah, and shows simple ways to customize those two.

150
00:07:16.759 --> 00:07:19.680
<v Speaker 1>What about axes and scales as leather handled that it does?

151
00:07:19.720 --> 00:07:22.720
<v Speaker 2>He explains, it automatically figures out the right scale ordinal

152
00:07:22.720 --> 00:07:26.040
<v Speaker 2>for text, linear for numbers, temporal for dates, but you

153
00:07:26.079 --> 00:07:28.800
<v Speaker 2>can also manually set limits if you need more control,

154
00:07:28.839 --> 00:07:30.319
<v Speaker 2>say for the II axis range.

155
00:07:30.439 --> 00:07:31.920
<v Speaker 1>Okay, any other styling.

156
00:07:32.199 --> 00:07:36.160
<v Speaker 2>The chapter wraps up touching on styling options, setting specific

157
00:07:36.240 --> 00:07:39.800
<v Speaker 2>tick values on axes, changing the overall look with themes

158
00:07:39.879 --> 00:07:43.199
<v Speaker 2>via leather dot theme themes okay, and even a cool

159
00:07:43.240 --> 00:07:46.560
<v Speaker 2>example of making data point colors change based on their

160
00:07:46.600 --> 00:07:49.879
<v Speaker 2>position using a custom function, a little touch of dynamic viz.

161
00:07:50.040 --> 00:07:53.079
<v Speaker 1>Wow. Okay, So leather seems like a good starting point

162
00:07:53.079 --> 00:07:53.920
<v Speaker 1>for simple stuff.

163
00:07:54.160 --> 00:07:57.839
<v Speaker 2>That's the takeaway. Great entry point. But as Pajenkra points out,

164
00:07:57.839 --> 00:08:01.319
<v Speaker 2>for more complex, highly customized charts, you'll need the broader

165
00:08:01.399 --> 00:08:03.680
<v Speaker 2>scientific Python ecosystem.

166
00:08:03.079 --> 00:08:06.639
<v Speaker 1>Which brings us it chapter four the Powerhouse chapter exactly.

167
00:08:06.759 --> 00:08:10.959
<v Speaker 2>Chapter four introduces the SCIPI ecosystem. It's this collection of

168
00:08:11.040 --> 00:08:14.040
<v Speaker 2>libraries built for math, science, engineering, and Python.

169
00:08:14.120 --> 00:08:15.759
<v Speaker 1>Okay, so what's in this ecosystem.

170
00:08:15.959 --> 00:08:20.560
<v Speaker 2>Pajenkra lists the core players, Python itself obviously, numb PI

171
00:08:20.680 --> 00:08:22.319
<v Speaker 2>for numerical computing NUMBPI.

172
00:08:22.439 --> 00:08:23.519
<v Speaker 1>Heard a lot about that one.

173
00:08:23.319 --> 00:08:26.319
<v Speaker 2>The SIPE library itself, which has tons of mathematical routines,

174
00:08:26.720 --> 00:08:29.920
<v Speaker 2>and matt plotlib for more advanced plotting matte plotlib.

175
00:08:30.160 --> 00:08:32.799
<v Speaker 1>Okay, so that's the step up from Letter definitely.

176
00:08:33.000 --> 00:08:37.639
<v Speaker 2>He also mentions other key libraries pandas for data analysis.

177
00:08:37.000 --> 00:08:39.519
<v Speaker 1>Like working with tables, ah Pantas.

178
00:08:39.120 --> 00:08:43.120
<v Speaker 2>SIMPI for symbolic math, psychic image for image processing, psyche

179
00:08:43.159 --> 00:08:45.080
<v Speaker 2>learn for machine learning. It's a whole toolkit.

180
00:08:45.240 --> 00:08:47.000
<v Speaker 1>Wow. Quite the ecosystem, and.

181
00:08:46.919 --> 00:08:50.159
<v Speaker 2>He reminds us Jupiter notebook is often the interactive environment

182
00:08:50.159 --> 00:08:51.519
<v Speaker 2>where you use all these together.

183
00:08:51.720 --> 00:08:54.240
<v Speaker 1>Makes sense, So the chapter dies into numb PI.

184
00:08:54.559 --> 00:08:57.279
<v Speaker 2>It focuses on numb PI and its core data structure.

185
00:08:57.559 --> 00:09:00.480
<v Speaker 2>The underay n dimensional array deray.

186
00:09:00.559 --> 00:09:01.519
<v Speaker 1>What is that exactly?

187
00:09:01.679 --> 00:09:06.799
<v Speaker 2>Pajunker explains, it's like a super efficient container for numerical data. Importantly,

188
00:09:06.960 --> 00:09:09.639
<v Speaker 2>all items in an under ray have the same data.

189
00:09:09.440 --> 00:09:11.840
<v Speaker 1>Type, ah, same type. Why is that important?

190
00:09:12.039 --> 00:09:16.600
<v Speaker 2>Speed? Yeah, That uniformity makes calculations incredibly fast compared to

191
00:09:16.639 --> 00:09:17.879
<v Speaker 2>standard Python lists.

192
00:09:18.039 --> 00:09:19.399
<v Speaker 1>Got it? How do you make one?

193
00:09:19.440 --> 00:09:22.720
<v Speaker 2>He shows creating them from Python lists using np dot array.

194
00:09:23.120 --> 00:09:25.320
<v Speaker 2>You can also specify the data type using d.

195
00:09:25.360 --> 00:09:27.720
<v Speaker 1>Type okay, and accessing.

196
00:09:27.399 --> 00:09:32.159
<v Speaker 2>Elements standard indexing using square brackets, both positive indices starting

197
00:09:32.159 --> 00:09:35.559
<v Speaker 2>from zero and negative indices counting from the end, like.

198
00:09:35.600 --> 00:09:38.200
<v Speaker 1>Myra's eer for the first, myra one for the last.

199
00:09:38.600 --> 00:09:41.840
<v Speaker 2>Exactly, and he points out, try to access something that

200
00:09:41.879 --> 00:09:43.480
<v Speaker 2>isn't there, you get an index error.

201
00:09:43.559 --> 00:09:46.919
<v Speaker 1>Good to know. What about more dimensions like tables?

202
00:09:47.039 --> 00:09:49.919
<v Speaker 2>Yet he moves on to two d arrays like matrices

203
00:09:50.039 --> 00:09:52.879
<v Speaker 2>or tables, and even three d arrays. Shows how indexing

204
00:09:52.919 --> 00:09:55.840
<v Speaker 2>works there too, to get specific elements or entire rows or.

205
00:09:55.759 --> 00:09:57.799
<v Speaker 1>Columns, slicing and dicing the data.

206
00:09:57.840 --> 00:10:01.320
<v Speaker 2>Pretty much. That ability to sele elect and manipulate parts

207
00:10:01.320 --> 00:10:04.080
<v Speaker 2>of your data easily is a key numb Pie strength.

208
00:10:04.159 --> 00:10:06.480
<v Speaker 1>What else about injuries properties.

209
00:10:06.159 --> 00:10:10.200
<v Speaker 2>Briefly runs through useful properties indem for number of dimensions,

210
00:10:10.240 --> 00:10:11.519
<v Speaker 2>shape for the size of each.

211
00:10:11.399 --> 00:10:14.320
<v Speaker 1>Dimension like rows and columns in two D, right.

212
00:10:14.240 --> 00:10:16.879
<v Speaker 2>D type for the data type again, size for total elements,

213
00:10:16.919 --> 00:10:18.960
<v Speaker 2>invites for memory usage, and t for the.

214
00:10:18.879 --> 00:10:21.320
<v Speaker 1>Transpos transpose flips, rose and columns.

215
00:10:21.440 --> 00:10:24.399
<v Speaker 2>Yep, just useful ways to understand the structure of your array.

216
00:10:24.559 --> 00:10:25.960
<v Speaker 1>Anything else in the numpie chapter.

217
00:10:26.159 --> 00:10:29.759
<v Speaker 2>It finishes by listing some handy built in NUMPI constants

218
00:10:30.159 --> 00:10:32.840
<v Speaker 2>np dot an f or infinity, np dot n n

219
00:10:33.000 --> 00:10:34.559
<v Speaker 2>n for not a number.

220
00:10:34.360 --> 00:10:35.919
<v Speaker 1>You see nana lot in real data.

221
00:10:36.039 --> 00:10:39.360
<v Speaker 2>Very common and mathematical constants like np dot t i

222
00:10:39.480 --> 00:10:41.399
<v Speaker 2>and npe useful for calculation.

223
00:10:41.559 --> 00:10:44.159
<v Speaker 1>Okay, so chapter four gives us numb Pi for handling

224
00:10:44.159 --> 00:10:47.519
<v Speaker 1>the numbers efficiently. Chapter five must be putting it together

225
00:10:47.559 --> 00:10:49.120
<v Speaker 1>with mattplotlib for visualization.

226
00:10:49.360 --> 00:10:52.720
<v Speaker 2>You got it. Chapter five data visualization with numb Pi

227
00:10:52.840 --> 00:10:53.720
<v Speaker 2>and matt Plotlib.

228
00:10:54.039 --> 00:10:55.840
<v Speaker 1>Finally, Matt plotlip.

229
00:10:55.399 --> 00:10:59.240
<v Speaker 2>Pajanker introduces it as a fundamental plotting library in the

230
00:10:59.279 --> 00:11:02.840
<v Speaker 2>siepi world. Actually inspired by Matt Labs plotting.

231
00:11:02.960 --> 00:11:03.279
<v Speaker 1>Ah.

232
00:11:03.320 --> 00:11:08.120
<v Speaker 2>Okay, installation kit three, install matt plotlib standard stuff and

233
00:11:08.240 --> 00:11:12.519
<v Speaker 2>using it in code typically import mattplotlib dot pieplot as PLTKA.

234
00:11:12.639 --> 00:11:15.960
<v Speaker 2>Giving it that short name PLT is convention. And if

235
00:11:15.960 --> 00:11:19.919
<v Speaker 2>you're in Jupiter, that magic command percent matt plotlib inline

236
00:11:20.120 --> 00:11:20.600
<v Speaker 2>is key.

237
00:11:20.759 --> 00:11:22.120
<v Speaker 1>What that again tells.

238
00:11:21.919 --> 00:11:24.279
<v Speaker 2>Jupiter to display your plots right there in the notebook

239
00:11:24.320 --> 00:11:26.320
<v Speaker 2>output below the code cell very convenient.

240
00:11:26.480 --> 00:11:27.960
<v Speaker 1>Right and import numpi two.

241
00:11:28.080 --> 00:11:31.879
<v Speaker 2>Oh yeah important NumPy as np. Mattplotlib works hand in

242
00:11:31.919 --> 00:11:33.000
<v Speaker 2>glove with numpi erase.

243
00:11:33.080 --> 00:11:36.200
<v Speaker 1>Okay, Import's done. How do we create data to plot?

244
00:11:36.200 --> 00:11:37.840
<v Speaker 1>He mentioned numpike creation routines.

245
00:11:37.879 --> 00:11:41.240
<v Speaker 2>He did first up is np dot arrange creates evenly

246
00:11:41.279 --> 00:11:42.679
<v Speaker 2>spaced numbers and arrange like.

247
00:11:42.720 --> 00:11:45.279
<v Speaker 1>Zero, one, two three or zero point five to one

248
00:11:45.279 --> 00:11:46.559
<v Speaker 1>point zero exactly.

249
00:11:46.600 --> 00:11:48.399
<v Speaker 2>You have to give it the stop value, but start

250
00:11:48.399 --> 00:11:51.679
<v Speaker 2>and step size are optional. He shows examples, including making

251
00:11:51.879 --> 00:11:54.200
<v Speaker 2>x values for a simple y x plot.

252
00:11:54.279 --> 00:11:55.879
<v Speaker 1>Okay, arrange what else np.

253
00:11:56.039 --> 00:11:58.639
<v Speaker 2>Dot limb space similar, but instead of step size you

254
00:11:58.679 --> 00:12:00.720
<v Speaker 2>give it start, stop and how many points you want

255
00:12:00.759 --> 00:12:03.279
<v Speaker 2>in between evenly spaced ah.

256
00:12:03.159 --> 00:12:06.000
<v Speaker 1>Useful if you need exactly, say, one hundred points across

257
00:12:06.000 --> 00:12:07.120
<v Speaker 1>a range precisely.

258
00:12:07.440 --> 00:12:09.799
<v Speaker 2>Pudge on car shows an example, and how to turn

259
00:12:09.840 --> 00:12:12.720
<v Speaker 2>off plot axes with plt dot axsis just to see

260
00:12:12.720 --> 00:12:13.759
<v Speaker 2>the generated.

261
00:12:13.360 --> 00:12:15.039
<v Speaker 1>Points interesting any others.

262
00:12:15.320 --> 00:12:18.720
<v Speaker 2>Briefly mentions np dot log space and np dot gm

263
00:12:18.799 --> 00:12:22.759
<v Speaker 2>space for logarithmically or geometrically spaced values. Useful for certain

264
00:12:22.799 --> 00:12:25.440
<v Speaker 2>plots like log scales, shows their output visually.

265
00:12:25.600 --> 00:12:28.320
<v Speaker 1>Good to know they exist. So we have data, How

266
00:12:28.320 --> 00:12:28.919
<v Speaker 1>do we plot it?

267
00:12:29.039 --> 00:12:32.279
<v Speaker 2>The core function is PLT dot plot. He shows using

268
00:12:32.279 --> 00:12:35.320
<v Speaker 2>it with both Python lists and numbpi arrays to create

269
00:12:35.399 --> 00:12:38.919
<v Speaker 2>single line plots. Demonstrates a simple curve while by two.

270
00:12:39.080 --> 00:12:42.240
<v Speaker 1>Okay, PLT dot plot. How about multiple lines on one chart?

271
00:12:42.320 --> 00:12:45.279
<v Speaker 2>Two ways either call plt dot plot multiple times for

272
00:12:45.320 --> 00:12:47.840
<v Speaker 2>each line, or you can sometimes provide multiple y value

273
00:12:47.919 --> 00:12:50.879
<v Speaker 2>rays to a single PLT dot plot. Mattplot lib handles

274
00:12:50.879 --> 00:12:52.039
<v Speaker 2>the different colors automatically.

275
00:12:52.200 --> 00:12:54.960
<v Speaker 1>Nice, But plots need labels and stuff right absolutely.

276
00:12:55.000 --> 00:12:58.120
<v Speaker 2>Pa gen car covers the essentials adding a grid PLT

277
00:12:58.240 --> 00:13:01.519
<v Speaker 2>dot grid true. Saving the plot PLT dot save fig,

278
00:13:02.159 --> 00:13:03.639
<v Speaker 2>myplot dot png.

279
00:13:03.559 --> 00:13:06.240
<v Speaker 1>Save fig important. What about axis limits.

280
00:13:05.879 --> 00:13:08.440
<v Speaker 2>PLT dot axis for setting all limits at once, or

281
00:13:08.559 --> 00:13:10.840
<v Speaker 2>p l t dot XLM and p lt dot XLM

282
00:13:10.879 --> 00:13:13.960
<v Speaker 2>for individual control over the x and y ranges. Good

283
00:13:14.279 --> 00:13:16.799
<v Speaker 2>titles and axis labels PLT dot title p l T

284
00:13:16.960 --> 00:13:20.240
<v Speaker 2>dot rabel and p l T dot label really crucial

285
00:13:20.320 --> 00:13:21.759
<v Speaker 2>for making plots understandable.

286
00:13:21.840 --> 00:13:25.240
<v Speaker 1>Definitely need those. What about legends If you have multiple lines.

287
00:13:25.200 --> 00:13:28.039
<v Speaker 2>Use the label argument inside p l T dot plot

288
00:13:28.120 --> 00:13:30.399
<v Speaker 2>for each line like p l T dot plot x

289
00:13:30.519 --> 00:13:33.120
<v Speaker 2>y one label data set one, then call PLT dot

290
00:13:33.200 --> 00:13:34.600
<v Speaker 2>legend to display it, and.

291
00:13:34.600 --> 00:13:36.679
<v Speaker 1>You can control where the legend appears.

292
00:13:36.679 --> 00:13:39.360
<v Speaker 2>Using the lock argument in PLT dot legend like upper

293
00:13:39.440 --> 00:13:41.840
<v Speaker 2>left or best to let matplot lib decide.

294
00:13:41.879 --> 00:13:44.159
<v Speaker 1>Okay, making it informative, Now making it look good.

295
00:13:44.320 --> 00:13:47.320
<v Speaker 2>Colors lines big part of chapter five. He details changing

296
00:13:47.360 --> 00:13:49.879
<v Speaker 2>colors with short codes like R for red, G, green,

297
00:13:50.000 --> 00:13:54.519
<v Speaker 2>b blue, simple codes, changing line styles solid, dah, dash, dash, dash,

298
00:13:54.559 --> 00:13:57.639
<v Speaker 2>dot is, adding markers to data points, et cetera. Lots

299
00:13:57.639 --> 00:14:00.600
<v Speaker 2>of options. You can combine these format strings like row

300
00:14:00.639 --> 00:14:03.240
<v Speaker 2>for red, circle markers dash line.

301
00:14:03.480 --> 00:14:05.679
<v Speaker 1>Combines color marker and lin style.

302
00:14:05.480 --> 00:14:09.559
<v Speaker 2>Hmm efficient Yeah. And then he shows more detailed control

303
00:14:09.759 --> 00:14:13.840
<v Speaker 2>using keyword arguments in PLT dot plot like what things

304
00:14:13.879 --> 00:14:17.840
<v Speaker 2>like colored red line style dashed line with two marcro

305
00:14:18.080 --> 00:14:22.559
<v Speaker 2>markerface color blue marker size ten, much finer control.

306
00:14:22.720 --> 00:14:26.879
<v Speaker 1>Wow, lots of options there. Anything else on customization.

307
00:14:26.639 --> 00:14:29.279
<v Speaker 2>Finishes with customizing the tick marks the actual number shown

308
00:14:29.320 --> 00:14:31.919
<v Speaker 2>on the axes. Using PLT dot x sticks and PLT

309
00:14:32.039 --> 00:14:33.879
<v Speaker 2>dot tics, you can set the positions and even the

310
00:14:34.000 --> 00:14:35.679
<v Speaker 2>labels for the ticks.

311
00:14:35.480 --> 00:14:38.399
<v Speaker 1>So really fine grain control over how the axes look exactly.

312
00:14:38.480 --> 00:14:41.759
<v Speaker 2>Matt plotlib gives you that power building on NUMPI data.

313
00:14:41.799 --> 00:14:44.679
<v Speaker 1>So looking back at these initial chapters of practical Python

314
00:14:44.799 --> 00:14:47.759
<v Speaker 1>data visualization, we've covered quite a bit of ground.

315
00:14:47.879 --> 00:14:50.720
<v Speaker 2>We really have, from just getting Python running, setting up

316
00:14:50.759 --> 00:14:53.879
<v Speaker 2>that interactive Jupiter environment, yeah, to a first taste of

317
00:14:54.000 --> 00:14:57.360
<v Speaker 2>plotting with leather, and then diving into the core tools

318
00:14:57.720 --> 00:15:00.559
<v Speaker 2>numbpi for the numbers and matt plotlib for them the pictures.

319
00:15:00.879 --> 00:15:04.519
<v Speaker 1>Absolutely, and it's quite striking how even these early chapters

320
00:15:04.799 --> 00:15:07.879
<v Speaker 1>give you a solid toolkit. You're not just looking at data,

321
00:15:07.879 --> 00:15:10.519
<v Speaker 1>you're equipped to actually bring into life visually.

322
00:15:10.840 --> 00:15:15.360
<v Speaker 2>Going from raw numbers to creating and customizing fundamental charts.

323
00:15:15.440 --> 00:15:17.440
<v Speaker 2>It's a powerful first step.

324
00:15:17.559 --> 00:15:20.679
<v Speaker 1>It really makes you think, doesn't it. How could this ability,

325
00:15:20.759 --> 00:15:24.360
<v Speaker 1>even with these basic forms of visualization, change how you

326
00:15:24.919 --> 00:15:27.679
<v Speaker 1>understand or communicate information in your own field?

327
00:15:28.240 --> 00:15:31.919
<v Speaker 2>Yeah? Consider the data you see regularly, could using PLT

328
00:15:32.039 --> 00:15:35.480
<v Speaker 2>dot plot or even simple leather charts reveal patterns or

329
00:15:35.480 --> 00:15:39.799
<v Speaker 2>insights you just haven't noticed before. Turning numbers into stories.

330
00:15:39.559 --> 00:15:42.679
<v Speaker 1>Definitely food for thought, and as pajunker shows, there are

331
00:15:42.720 --> 00:15:45.639
<v Speaker 1>pathways for going Deever, those PEP docs, the full map

332
00:15:45.639 --> 00:15:47.360
<v Speaker 1>plot lib documentation.

333
00:15:46.919 --> 00:15:49.639
<v Speaker 2>You mentioned, there's a whole universe of more advanced techniques,

334
00:15:49.679 --> 00:15:52.000
<v Speaker 2>different libraries, specialized charts out there.

335
00:15:52.159 --> 00:15:54.480
<v Speaker 1>Perhaps in future deep dives we could explore some of

336
00:15:54.480 --> 00:15:58.840
<v Speaker 1>those more advanced tools or look at specific real world applications.

337
00:15:58.240 --> 00:16:01.279
<v Speaker 2>That'll be interesting. The possibility to these with Python visualization

338
00:16:01.399 --> 00:16:02.759
<v Speaker 2>are well pretty exciting.
