Python Data Visualization Transcripts
Lecture: Longhand overview
0:00 Now let me provide a quick cheat sheet on the long form API. This example the alt.chart mark bar and encode are the
0:10 same but once we get into passing in the X. And Y. Values we use alt.X. And have a lot more flex.
0:20 The ability for passing in the type other and other types of data transformation or information That's useful for the plot.
0:28 So here's a summary of the shorthand and the long form we've shown how you can pass an X Equals name or pass in alt.X with the name parameter.
0:41 We can also tell the type of variable either using the colon and the shorthand Q
0:47 Or the type quantitative. And then we can also do certain aggregate functions on
0:55 our columns. In this example we could sum the name by using the word some and telling it the name is using the name column or we can pass in the
1:05 aggregate sum and the type. What I find is that the shorthand is best for
1:11 quick exploratory analysis to understand your data and what you might want your visualization to look
1:16 like. And then as you get further along and want to fine tune it you
1:20 can use the long form to have more granular control of your visualization and I encourage
1:27 you to print this out and keep this as a handy cheat sheet for you when you are working with altair on your own data sets.