Python Data Visualization Transcripts
Chapter: Altair
Lecture: Types viz alterations

Login or purchase this course to watch this video and the rest of the course contents.
0:00 I'll go through some examples of how the different types can alter the presentation of your
0:05 colors and axes. So in this example an ordinal type is going to show different colors but there will be a gradient from low to high.
0:16 If we take the same values and use a nominal type, you can see that there are much more distinct separations in the colors and if we
0:26 use a quantitative type it's more of a gradient and so depending on the visualization or what you'd want to convey or what the data type is,
0:35 you can choose different values to influence the way altair interprets it. This also works for bar charts.
0:43 So we talked about the quantitative example in this case for a year where it thinks it's a just number and so it uses a commas and a little more of a
0:53 skinny bar. Then if we change the type to ordinal, then it removes those commas from the axis and makes those wider bar just solely based
1:04 on the different types of data. So this is a really important concept and altair is unique in the way that you
1:12 can specify this information and is very powerful for creating visualization that really support the type of underlying data that used in the visualization.


Talk Python's Mastodon Michael Kennedy's Mastodon