Animated Plots¶
General¶
Let’s begin by importing the dataset module of vastorbit. It provides a range of datasets for both training and exploring vastorbit’s capabilities.
import vastorbit.datasets as vod
Let’s leverage the various datasets to generate different types of animated plots.
import vastorbit.datasets as vod
# Population Growth Dataset - Ideal for BAR Race | Animated PIE
pop_growth = vod.load_pop_growth()
# Gap Minder Dataset - Ideal for Animated Bubble
gapminder = vod.load_gapminder()
# Commodities Dataset - Ideal for Animated Time Series
commodities = vod.load_commodities()
vastorbit’s animated charts, including bar races, bubble animations, pie chart transitions, and time series animations, add a dynamic dimension to data visualization. These animated visualizations allow for the dynamic presentation of data trends, changes, and relationships, making complex information easily comprehensible and engaging. Whether tracking evolving data over time, showcasing multi-dimensional insights, or highlighting shifts in proportions, vastorbit’s animated charts transform data into captivating narratives for enhanced data exploration and communication.
Hint
We will utilize various datasets within vastorbit, which are abundant and accessible through the dataset module. These datasets cater to a wide range of use cases, providing versatile options for data analysis and experimentation.
We can switch to using the matplotlib module.
vo.set_option("plotting_lib", "matplotlib")
vastorbit’s animated plots add dynamic storytelling to data visualization.
pop_growth.animated_bar(
ts = "year",
columns = ["city", "population"],
by = "continent",
start_date = 1970,
end_date = 1980,
)
fig = pop_growth.animated_pie(
ts = "year",
columns = ["city", "population"],
by = "continent",
start_date = 1970,
end_date = 1980,
)
fig = gapminder.animated_scatter(
ts = "year",
columns = ["lifeExp", "gdpPercap", "country", "pop"],
by = "continent",
limit_labels=10,
limit_over=100
)
fig = commodities.animated_plot(ts = "date")
Chart Customization¶
vastorbit empowers users with a high degree of flexibility when it comes to tailoring the visual aspects of their plots. This customization extends to essential elements such as color schemes, text labels, and plot sizes, as well as a wide range of other attributes that can be fine-tuned to align with specific design preferences and analytical requirements. Whether you want to make your visualizations more visually appealing or need to convey specific insights with precision, vastorbit’s customization options enable you to craft graphics that suit your exact needs.
Note
As animated plots encompass various chart types, including line, pie, and scatter plots, customization options may vary between these graphics. For detailed guidance on tailoring your visualization, please consult the corresponding section in the Chart Gallery.