Visualizing Multiple Datasets with BubblePlot
The BubblePlot command can convey information about three dimensions of a multi-dimensional dataset using the horizontal axis, the vertical axis, and point (bubble) size. Moreover, if a dataset is a time series , BubblePlot can generate an animation that shows the movement of data points over a common period of time.
In the following example, datasets containing information on Gross Domestic Product at Power Purchasing Parity, Life Expectancy, and Population are retrieved for selected countries and visualized.
To begin, the DataSets and Statistics packages are loaded.
> |

|
List of countries with their 3-letter country codes.
List of Countries
The next three steps create Vectors containing datasets on GDP at PPP, Life Expectancy, and Population for each of the countries in the code edit region above. We can make use of the fact many data sources use a standardized 3-letter country code to represent a specific country while building the unique identifier for each dataset.
Note: This example downloads data for 540 datasets. This may take some time. It is possible to view the cached animation below without loading any data by clicking on the plot and using the animation toolbar controls.
Gross Domestic Product at Power Purchasing Parity Source: Open Data for Africa
> |
])])](/view.aspx?SI=154178/5fb8c936946a2e84869c5c295cd5b72a.gif)
|
Life Expectancy Source: Worldbank
> |
])])](/view.aspx?SI=154178/6d6ed6a508880ea10dce14ca1c63d153.gif)
|
Population Source: Worldbank
> |
])])](/view.aspx?SI=154178/37e94f8343793b9c6ddd41a42f2d8e60.gif)
|
The following is an animated BubblePlot of GDP at PPP vs Life Expectancy, where bubble sizes correspond to the population of listed countries. The current year can be seen below the legend. To play back the animation, click on the plot and use the animation toolbar controls.
> |
![BubblePlot(ds1, ds2, ds3, data_legend = ["GDP at PPP", "Life Expectancy", "Population"], bubble_legend = [indices(Countries, nolist, indexorder)], frames = 50, size = [1400, 1100], gridlines, font = ["Calibri", 14])](/view.aspx?SI=154178/5237c29c354c8f657f3cdefafe56ce30.gif)
|
|