Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamaziz/lookml_visualizer
Visualize LookML contents as a network diagram in an interactive Plotly figure.
https://github.com/iamaziz/lookml_visualizer
looker lookml networkx-graph plotly
Last synced: 2 months ago
JSON representation
Visualize LookML contents as a network diagram in an interactive Plotly figure.
- Host: GitHub
- URL: https://github.com/iamaziz/lookml_visualizer
- Owner: iamaziz
- Created: 2020-12-29T02:48:40.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-06T04:34:41.000Z (almost 4 years ago)
- Last Synced: 2024-08-06T10:13:04.246Z (5 months ago)
- Topics: looker, lookml, networkx-graph, plotly
- Language: Python
- Homepage:
- Size: 22.3 MB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LookML Network Visualizer
[![pypi package](https://img.shields.io/pypi/v/lookml_visualizer.svg)](https://pypi.org/project/lookml_visualizer/)
**TL;DR** Visualize [LookML](https://docs.looker.com/data-modeling/learning-lookml/what-is-lookml) contents as a network diagram in an interactive Plotly figure.
Built on top of `lookml-tools`'s [grapher](https://github.com/ww-tech/lookml-tools/blob/master/lkmltools/grapher/lookml_grapher.py). Requires NetworkX, graphviz, and Plotly.
### Getting Started
```python
from lookml_visualizer import PlotNetworknetwork = PlotNetwork(lkml_paths=['./my_lookml_project/*.lkml'])
```To save the interactive plot as an HTML file:
```python
network.fig.save_to_html(output_name='my_lookml_network.html')
```### Examples
Example1: A tiny project
![](./examples/lookml_visualizer_sample1.gif)
Example2: A large project
![](./examples/lookml_visualizer_sample2.gif)
**Plot layouts**
The network plot can have different layouts. The following example shows how to pass a different plot layout:
```python
network = PlotNetwork(paths, plot_layout='fdp')
```
which will display the same network in example 2 (above) in this layout:
![image](https://user-images.githubusercontent.com/3298308/103260846-2838b500-496d-11eb-9f01-ab15704983e6.png)> `plot_layout` options: 'dot', 'twopi', 'fdp', 'sfdp', 'circo'
### Install
```bash
$ pip install lookml_visualizer
```
Also, if not installed, need to install PyGraphviz```bash
$ brew install graphviz
```