Code Monkey home page Code Monkey logo

danim's Introduction

Danim

Animation Tools for Data visualization, based on Manim of 3blue1brown

This is Data Animation Tool that creates gif or mp4 video of animated data.

A tool that let your data talk!

Here are some achieved features of this tools: (will add more in the future)

1.Bubble chart animation:

Animate the bubble chart, the effects is as follows: this gif may load for a while...

*DATA source: gapminder & UN

In bubble chart animation, you can have personalized settings:

(1) The Creation settings:

there are three options in creation:

directly show everything(option 1)

Show each bubble, but its color is given randomly(option 2)

Show each bubble by its color group(option 3)

Change the creation settings in BubbleChartAnimation.py: Line 4

class BubbleChartAnimation(Scene):
    def construct(self):
        self.AllContriesComparison()

to

class BubbleChartAnimation(Scene):
    def construct(self):
        self.AllContriesComparison(start_option = "3")

default is option 2

(2) hight light option: if in the middle of progression, you want to stop and hightlight some bubbles, you can choose to use Get_Hightlight_Animation() method, detailed code is in line 142 of BubbleChartAnimation.py

You can achieve this function by unannotate the code in Line 142-155 in BubbleChartAnimation.py

2.Distribution chart animation:

You can have multiple choices:

Show the distribution

See how it changes through time

Stack different distributions together

the effects is as follows: again... please be patient, this gif may load for a while...

*DATA source: gapminder & UN

3.A lot more to come....

There are many ideas that I'm currently developing,

3b1b/manim is really a very powerful tool.

Feel free to contact me if you have any good ideas, welcome to contribute!

Installation

Danim is based on Python and manim,

so you need to install python3.7 and 3b1b/manim

The installation guide for 3b1b/manim is at (https://github.com/3b1b/manim)

System requirements are cairo, ffmpeg, sox, latex (optional, if you want to use LaTeX).

Once you have done manim installation, download the danim file and release the file in the "Danim" folder to the manim.

Go to the manim folder and run the following code

python -m manim Danim/BubbleChart/BubbleChartAnimation.py BubbleChartAnimation -p

you will have your first Bubble Chart Video created.

Customize your own bubble chart animation:

You can change the data in DATA/X.csv and DATA/Y.csv and DATA/R.csv

You can change the axes settings in BubbleChart/bubble_constants.py

danim's People

Contributors

graviton1221 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

danim's Issues

can't run Danim example

1- extracted Danim dist into manim\Danim

pycache/
BubbleChart/
Contry.py
DATA/
demo1.py
demo2.py
Distribution.py
image/
LICENSE
README.md

2- inside manim we run

python -m manim Danim/BubbleChart/BubbleChartAnimation.py BubbleChartAnimation -p

we got this error

\python.exe: No module named manim

3- tried to run using manimgl

manimgl Danim/BubbleChart/BubbleChartAnimation.py BubbleChartAnimation -p

got this error

Traceback (most recent call last):
  File "d:\hossam\bin\python\wpy64-3920\python-3.9.2.amd64\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "d:\hossam\bin\python\wpy64-3920\python-3.9.2.amd64\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\hossam\bin\python\WPy64-3920\python-3.9.2.amd64\Scripts\manimgl.exe\__main__.py", line 7, in <module>
  File "d:\hossam\bin\python\wpy64-3920\python-3.9.2.amd64\lib\site-packages\manimlib\__main__.py", line 21, in main
    config = manimlib.config.get_configuration(args)
  File "d:\hossam\bin\python\wpy64-3920\python-3.9.2.amd64\lib\site-packages\manimlib\config.py", line 300, in get_configuration
    module = get_module(args.file)
  File "d:\hossam\bin\python\wpy64-3920\python-3.9.2.amd64\lib\site-packages\manimlib\config.py", line 184, in get_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "Danim/BubbleChart/BubbleChartAnimation.py", line 2, in <module>
    from Danim.BubbleChart.BubbleChart import *
ModuleNotFoundError: No module named 'Danim'
  • Can you also add more detail for the installation process.

env

1- OS

>  ver
Microsoft Windows [Version 10.0.19042.1526]

2- Python

>  python -V
Python 3.9.2

3- manim

>  pip list |grep manimgl
manimgl                       1.6.1

docker下面运行错误

root@fd05c35b59b1:/manim# python -m manim Danim/BubbleChart/BubbleChartAnimation.py BubbleChartAnimation -p
Media will be written to ./media/. You can change this behavior with the --media_dir flag.

Traceback (most recent call last):
File "/manim/manimlib/extract_scene.py", line 155, in main
scene = SceneClass(**scene_kwargs)
File "/manim/manimlib/scene/scene.py", line 53, in init
self.construct()
File "Danim/BubbleChart/BubbleChartAnimation.py", line 6, in construct
self.AllContriesComparison()
File "Danim/BubbleChart/BubbleChartAnimation.py", line 15, in AllContriesComparison
X,Y,R,entity_names,T = data_digest()
File "/manim/Danim/BubbleChart/BCutils.py", line 46, in data_digest
df = pd.read_csv(path,encoding = encoding ,index_col = 0)
File "/usr/local/lib/python3.7/site-packages/pandas/io/parsers.py", line 685, in parser_f
return _read(filepath_or_buffer, kwds)
File "/usr/local/lib/python3.7/site-packages/pandas/io/parsers.py", line 457, in _read
parser = TextFileReader(fp_or_buf, **kwds)
File "/usr/local/lib/python3.7/site-packages/pandas/io/parsers.py", line 895, in init
self._make_engine(self.engine)
File "/usr/local/lib/python3.7/site-packages/pandas/io/parsers.py", line 1135, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "/usr/local/lib/python3.7/site-packages/pandas/io/parsers.py", line 1917, in init
self._reader = parsers.TextReader(src, **kwds)
File "pandas/_libs/parsers.pyx", line 382, in pandas._libs.parsers.TextReader.cinit
File "pandas/_libs/parsers.pyx", line 689, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File b'Danim\DATA/X.csv' does not exist: b'Danim\DATA/X.csv'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.