Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hergetto/kino_libgraph
Libgraph integration with Livebook
https://github.com/hergetto/kino_libgraph
data-structures diagram elixir graphs kino livebook network visjs
Last synced: about 1 month ago
JSON representation
Libgraph integration with Livebook
- Host: GitHub
- URL: https://github.com/hergetto/kino_libgraph
- Owner: hergetto
- License: apache-2.0
- Created: 2024-08-19T20:49:46.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-25T11:28:35.000Z (3 months ago)
- Last Synced: 2024-09-30T09:01:36.101Z (about 2 months ago)
- Topics: data-structures, diagram, elixir, graphs, kino, livebook, network, visjs
- Language: Elixir
- Homepage: https://hex.pm/packages/kino_libgraph
- Size: 209 KB
- Stars: 9
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# KinoLibgraph
[![Docs](https://img.shields.io/badge/hex.pm-docs-8e7ce6.svg)](https://hexdocs.pm/kino_libgraph)
[![build](https://github.com/hergetto/kino_libgraph/actions/workflows/branch-workflow.yml/badge.svg)](https://github.com/hergetto/kino_libgraph/actions/workflows/branch-workflow.yml)[Libgraph](https://github.com/bitwalker/libgraph) integration with [Kino](https://github.com/livebook-dev/kino) for [Livebook](https://github.com/livebook-dev/livebook) using [vis-network](https://github.com/visjs/vis-network).
## Installation
To use KinoLibgraph with Livebook, you only have to run `Mix.install/2`:
```elixir
Mix.install([
{:kino_libgraph, "~> 0.1.0"}
])
```## Example
```elixir
directed_graph =
Graph.new()
|> Graph.add_edges([
{:b, :c, weight: -2},
{:a, :b, weight: 1},
{:c, :d, weight: 3},
{:b, :d, weight: 4}
])
```Outputs:
![Graph](assets/image.png)