About#
ahlive is an open-source Python package that makes animating data simple, clean, and enjoyable!
motivation#
ahlive was developed because the author enjoyed seeing animated plots of data and wanted to make his own ones. There were already several Python packages that had animation capabilities, namely matplotlib, holoviews, easing, bar-chart-race, animaplot, etc.
These packages, unfortunately, didn’t include the author’s desired features, or the features existed but was too verbose/complex to use. In addition, these features either didn’t fit the packages’ development roadmap, required a major internal refactor, or some of the packages were not actively maintained. Thus, ahlive was born.
features#
Some of ahlive’s notable aspects include:
variety of charts with presets, e.g. bar chart
race
and griddedscan_x
built-in dynamic annotations, e.g.
state_labels
andinline_labels
various static annotations, e.g.
title
andcaption
easily accessible keywords, e.g.
figsize
andxmargins
vectorized and eased (smooth) interpolation, e.g.
interp
andease
moving x and y axes limits, e.g.
xlims
andylims
operators for joining plots, e.g.
*
and+
agile, sensible defaults, e.g. if under 5 frames, use
scatter
elseline
extensible customizability, e.g.
hooks
parallelized output, e.g.
num_workers
requirements#
ahlive requires the following packages to work:
package |
internal use case |
---|---|
param |
defining classes and docstrings |
numpy |
interpolating and easing data |
pandas |
wrangling data |
bottleneck |
speeding up computations |
xarray |
storing and manipulating data |
matplotlib |
drawing static images |
imageio |
creating animations |
For specific package versions see requirements.txt.
name origin#
This package was named “ahlive” as a result of the author’s enthusiasm for puns, and it took the author many long walks to satisfactorily derive the package’s name.
The package name has various meanings:
“ahlive” is a mispelling for “alive” and alive can mean not lifeless, not inanimate, or simply, animate, which happens to be the purpose of this package.
The first two letters “ah” as an interjection can sometimes mean eureka, e.g. “ah, I finally figured it out!” Hopefully, this package can help viewers gain insight from their data.
Additionally, “ah” as an interjection can be an exclamation of joy, e.g. “ah, this is so cool!” Hopefully, this package can bring joy to its viewers too.
Because developing this package was one of the author’s primary pastime during the COVID-19 pandemic, “ahlive” can also be considered a portmanteau, or a blend of two or more words’ meanings. The first two letters “ah” are the author’s initials and the last four letters is “live”: this package helped the author, Andrew Huang, live through the quarantine.
The author has previously considered naming the package “xlive”, “xvideo”, or “xmovie” because it followed the typical naming scheme for xarray-related packages e.g. xesmf, xskillscore, xgcm, etc. However, the author realized that these names might not be ideal if the user searched these keywords in a professional setting. Nonetheless, while “ahlive” was still being developed privately, another Python animation package named “xmovie” was released.
acknowledgements#
Besides the required packages, the author would like to give a shoutout to:
easing for sparking the idea of lively animations in Python
easing-functions for exemplifying scalar implementations of easing-functions
bar-chart-race for elucidating implementations of bar chart races
holoviews for inspiring much of ahlive’s syntax and ease of use
xskillscore for exhibiting how to integrate CI and how to release
And, to the author’s girlfriend, Shaojie H., for everything she does.