What is a Bubble Plot?
Bubble Plot is basically a scatter plot between two variables/data columns where in place of the data points, there are bubbles/circles of varying sizes indicating the third variable. The third variable can be of a quantitative, ordinal, or nominal type, but the best type to be used in bubble plot is the ordinal type, i.e. data having a specific ordering. The legend shows which circle size corresponds to which data value.
A bubble plot can help us see the relationship between two variables with respect to a third variable. The bigger the bubble, the bigger value of data it corresponds to.
How To Make Bubble plot with Altair in Python?
Prerequisite: Introduction to Altair in Python
Altair is a simple and easy to use statistical visualization library for python. It contains many types of built-in plots and various options to modify the properties and generate other plots. Bubble Plot is a very useful visualization for bivariate analysis of data with respect to a third variable. It is not readily available in the Altair library but can be made by doing some simple modifications to the scatter plot.