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: 7 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-06T04:34:41.000Z (over 5 years ago)
- Last Synced: 2025-01-31T20:11:14.549Z (over 1 year 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
[](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 PlotNetwork
network = 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

Example2: A large project

**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:

> `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
```