sjvisualizer is a data visualization and animation library for Python.
GitHub_catalogue.mp4
Please find the catalogue example here to run the above animation. sjvisualizer currently supports the following chart types:
- Bar races
- Animated pie charts
- Animated stacked bar charts
- Animated line charts
More chart types to follow!
There are two ways of learning sjvisualizer:
If you find sjvisualizer useful, please consider starring โญ the project on GitHub!
sjvisualizer is now available on pypi! Simply use pip to install it:
pip install sjvisualizer
sjvisualizer is a free and open-source data animation library, please include the following attribution in any publications you use it in.
Made with sjvisualizer, the open-source data animation library for Python
from sjvisualizer import Canvas
from sjvisualizer import DataHandler
from sjvisualizer import PieRace
import time
import json
def main(fps = 60, duration = 0.35):
number_of_frames = duration*60*fps
# load data from Excel file
df = DataHandler.DataHandler(excel_file="<Path to EXCEL DATA FILE>", number_of_frames=number_of_frames).df
# create canvas object, we will use this to draw our elements to
canvas = Canvas.canvas()
# add bar chart
bar_chart = PieRace.pie_plot(canvas=canvas.canvas, df=df)
canvas.add_sub_plot(bar_chart)
# add static text
canvas.add_title("TITLE", color=(0,132,255))
canvas.add_sub_title("SUB-TITLE", color=(0,132,255))
# add time indication
canvas.add_time(df=df, time_indicator="month")
canvas.play(fps=fps)
if __name__ == "__main__":
main()
If you like this project, please consider buying me a cup of coffee on buymeacoffee.
Contributions are always welcome! Here are some ways to get involved:
Create an issue to report a bug or suggest a new feature. Fork the repository and create a new branch to work on. Submit a pull request to request a merge of your changes. Please make sure to write clear commit messages.
sjvisualizer is released under the MIT License. See the LICENSE file for more details.
If you have any questions or suggestions regarding sjvisualizer, post it on my forum.