Skip to main content

Package provides a simple widget-based framework for interactive visualization of algorithms

Project description

Interactive visualization

Binder

This repository contains a framework for iteractive visualization of algorithms based on widgets in jupyter notebook. Here are some examples of animations generated by the framework. The code is provided in overview notebook

Text animations

Here's an example of quicksort algorithm using text state representation

Quicksort

Matplotlib animations

Using matplotlib one can visualize some plane algorithm, for example EM algorithm for Old Faithfull eruption data

em

or domino coloring based on 5-coloring algorithm for planar graphs

coloring

or convex hull construction

convex_hull

Graphviz

Using graphviz one can visualize basic graph algorithms, here's an example of Dijkstra algorithm

dijkstra

Requirements and installation

A proper installation on debian-based systems is

cat apt.txt | xargs sudo apt-get install
pip install interactive-visualization

For other linux-based OS use the appropriate package manager to install packages listed in apt.txt which currently contains graphviz and latex needed for proper visualization in notebooks. Note that there also might be problems with ipywidgets in jupyter lab, check the docs for installation instructions.

Creating an interactive animation using the framework

See manual for more reference.

Examples

Eng

Covid-19

Some basic parse and analysis of global Covid-19 data from Johns Hopkins University.

Rus

Замощене доминошками

Рассматривается задача покрытия фигур на плоскости, состоящиех из квадратных клеток одинакового размера и два её программных решения: с помощью динамического программирования по профилю и с помощью нахождения максимального паросочетания. Бонусом идет раскраска планарного графа в 5 цветов (не протестировано).

Обходы на графах

Разобраны обходы в глубину и ширину, а так же их базовые применения.

Кратчайшие пути на графах

Основные алгоритмы для задачи о крайших путях от одной вершины до всех остальных. Все алгоритмы представлены как модификации "сканирующего метода".

Префиксное дерево

Префиксное дерево, префикс-функцию, алгоритм Ахо-Корасик и их применения в марковских моделях для обработки текста.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

interactive-visualization-0.1.4.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

interactive_visualization-0.1.4-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page