# Kedro-Viz
<br />
<p align="center">
![Kedro-Viz Pipeline Visualisation](https://raw.githubusercontent.com/kedro-org/kedro-viz/main/.github/img/banner.png)
</p>
<p align="center">
โจ <em> Data Science Pipelines. Beautifully Designed</em> โจ
<br />
Live Demo: <a href="https://demo.kedro.org/" target="_blank">https://demo.kedro.org/</a>
</p>
<br />
[![CircleCI](https://circleci.com/gh/kedro-org/kedro-viz/tree/main.svg?style=shield)](https://circleci.com/gh/kedro-org/kedro-viz/tree/main)
[![Documentation](https://readthedocs.org/projects/kedro/badge/?version=stable)](https://docs.kedro.org/en/stable/visualisation/)
[![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11-orange.svg)](https://pypi.org/project/kedro-viz/)
[![PyPI version](https://img.shields.io/pypi/v/kedro-viz.svg?color=yellow)](https://pypi.org/project/kedro-viz/)
[![Downloads](https://static.pepy.tech/badge/kedro-viz/week)](https://pepy.tech/project/kedro-viz)
[![npm version](https://img.shields.io/npm/v/@quantumblack/kedro-viz.svg?color=cc3534)](https://badge.fury.io/js/%40quantumblack%2Fkedro-viz)
[![License](https://img.shields.io/badge/license-Apache%202.0-3da639.svg)](https://opensource.org/licenses/Apache-2.0)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Slack Organisation](https://img.shields.io/badge/slack-chat-blueviolet.svg?label=Kedro%20Slack&logo=slack)](https://slack.kedro.org)
## Introduction
Kedro-Viz is an interactive development tool for building data science pipelines with [Kedro](https://github.com/kedro-org/kedro). Kedro-Viz also allows users to view and compare different runs in the Kedro project.
## Features
- โจ Complete visualisation of a Kedro project and its pipelines
- ๐จ Supports light & dark themes out of the box
- ๐ Scales to big pipelines with hundreds of nodes
- ๐ Highly interactive, filterable and searchable
- ๐ฌ Focus mode for modular pipeline visualisation
- ๐ Rich metadata side panel to display parameters, plots, etc.
- ๐ Supports all types of [Plotly charts](https://plotly.com/javascript/)
- โป๏ธ Autoreload on code change
- ๐งช Supports tracking and comparing runs in a Kedro project
- ๐ฉ Many more to come
## Installation
There are two ways you can use Kedro-Viz:
- As a [Kedro plugin](https://docs.kedro.org/en/stable/extend_kedro/plugins.html) (the most common way).
To install Kedro-Viz as a Kedro plugin:
```bash
pip install kedro-viz
```
- As a standalone React component (for embedding Kedro-Viz in your web application).
To install the standalone React component:
```bash
npm install @quantumblack/kedro-viz
```
## Usage
#### Compatibility with Kedro
Ensure your Kedro-Viz and Kedro versions are compatible by referencing the following table:
| Kedro-Viz version | Kedro version |
| ----------------- | ----------------- |
| >=4.7 | >=0.17.5 |
| >=3.8.0, <4.7 | >=0.16.6, <0.17.5 |
| <3.8.0 | <0.16.6 |
For **Python 3.6** users, the last supported version of Kedro-Viz is **3.16.0**
### CLI Usage
To launch Kedro-Viz from the command line as a Kedro plugin, use the following command from the root folder of your Kedro project:
```bash
kedro viz run
```
A browser tab opens automatically to serve the visualisation at `http://127.0.0.1:4141/`.
Kedro-Viz also supports the following additional arguments on the command line:
```bash
Usage: kedro viz run [OPTIONS]
Visualise a Kedro pipeline using Kedro-Viz.
Options:
--host TEXT Host that viz will listen to. Defaults to
localhost.
--port INTEGER TCP port that viz will listen to. Defaults to
4141.
--browser / --no-browser Whether to open viz interface in the default
browser or not. Browser will only be opened if
host is localhost. Defaults to True.
--load-file FILE Path to load kedro-viz data from a directory
--save-file FILE Path to save kedro-viz data to a directory
--pipeline TEXT Name of the registered pipeline to visualise. If not
set, the default pipeline is visualised
-e, --env TEXT Kedro configuration environment. If not specified,
catalog config in `local` will be used
--autoreload Autoreload viz server when a Python or YAML file change in
the Kedro project
--ignore-plugins A flag to ignore all installed plugins in the Kedro Project
--params TEXT Specify extra parameters that you want to pass to
the context initializer. Items must be separated
by comma, keys - by colon, example:
param1:value1,param2:value2. Each parameter is
split by the first comma, so parameter values are
allowed to contain colons, parameter keys are not.
To pass a nested dictionary as parameter, separate
keys by '.', example: param_group.param1:value1.
-h, --help Show this message and exit.
```
To deploy Kedro-Viz from the command line as a Kedro plugin, use the following command from the root folder of your Kedro project:
```bash
kedro viz deploy
```
```bash
Usage: kedro viz deploy [OPTIONS]
Deploy and host Kedro Viz on AWS S3.
Options:
--region TEXT AWS region where your S3 bucket is located [required]
--bucket-name TEXT AWS S3 bucket name where Kedro Viz will be hosted
[required]
-h, --help Show this message and exit.
```
To create a build directory of your local Kedro-Viz instance with static data from the command line, use the following command from the root folder of your Kedro project:
```bash
kedro viz build
```
### Experiment Tracking usage
To enable [experiment tracking](https://docs.kedro.org/en/stable/experiment_tracking/index.html) in Kedro-Viz, you need to add the Kedro-Viz `SQLiteStore` to your Kedro project.
This can be done by adding the below code to `settings.py` in the `src` folder of your Kedro project.
```python
from kedro_viz.integrations.kedro.sqlite_store import SQLiteStore
from pathlib import Path
SESSION_STORE_CLASS = SQLiteStore
SESSION_STORE_ARGS = {"path": str(Path(__file__).parents[2] / "data")}
```
Once the above set-up is complete, tracking datasets can be used to track relevant data for Kedro runs. More information on how to use tracking datasets can be found in the [experiment tracking documentation](https://docs.kedro.org/en/stable/experiment_tracking/index.html)
**Notes:**
- Experiment Tracking is only available for Kedro-Viz >= 4.0.2 and Kedro >= 0.17.5
- Prior to Kedro 0.17.6, when using tracking datasets, you will have to explicitly mark the datasets as `versioned` for it to show up properly in Kedro-Viz experiment tracking tab. From Kedro >= 0.17.6, this is done automatically:
```yaml
train_evaluation.r2_score_linear_regression:
type: tracking.MetricsDataset
filepath: ${base_location}/09_tracking/linear_score.json
versioned: true
```
### Standalone React component usage
To use Kedro-Viz as a standalone React component, you can follow the example below. However, please note that Kedro-Viz does not support server-side rendering (SSR). If you're using Next.js or another SSR framework, you should be aware of this limitation.
```javascript
import KedroViz from '@quantumblack/kedro-viz';
import '@quantumblack/kedro-viz/lib/styles/styles.min.css';
const MyApp = () => <KedroViz data={json} />;
```
To use with NextJS:
```javascript
import '@quantumblack/kedro-viz/lib/styles/styles.min.css';
import dynamic from 'next/dynamic';
const NoSSRKedro = dynamic(() => import('@quantumblack/kedro-viz'), {
ssr: false,
});
const MyApp = () => <NoSSRKedro data={json} />;
```
The JSON can be obtained by running:
```bash
kedro viz run --save-file=filename
```
We also recommend wrapping the `Kedro-Viz` component with a parent HTML/JSX element that has a specified height (as seen in the above example) in order for Kedro-Viz to be styled properly.
**_Our documentation contains [additional examples on how to visualise with Kedro-Viz.](https://docs.kedro.org/en/stable/visualisation/index.html)_**
## Feature Flags
Kedro-Viz uses features flags to roll out some experimental features. The following flags are currently in use:
| Flag | Description |
| ------------------ | --------------------------------------------------------------------------------------- |
| sizewarning | From release v3.9.1. Show a warning before rendering very large graphs (default `true`) |
| expandAllPipelines | From release v4.3.2. Expand all modular pipelines on first load (default `false`) |
To enable or disable a flag, click on the settings icon in the toolbar and toggle the flag on/off.
Kedro-Viz also logs a message in your browser's [developer console](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools#The_JavaScript_console) to show the available flags and their values as currently set on your machine.
## Maintainers
Kedro-Viz is maintained by the [Kedro team](https://docs.kedro.org/en/stable/contribution/technical_steering_committee.html#kedro-maintainers) and a number of [contributors from across the world](https://github.com/kedro-org/Kedro-Viz/contributors).
## Contribution
If you want to contribute to Kedro-Viz, please check out our [contributing guide](./CONTRIBUTING.md).
## License
Kedro-Viz is licensed under the [Apache 2.0](https://github.com/kedro-org/kedro-viz/blob/main/LICENSE.md) License.
## Citation
If you're an academic, Kedro-Viz can also help you, for example, as a tool to visualise how your publication's pipeline is structured. Find our citation reference on [Zenodo](https://doi.org/10.5281/zenodo.4277218).
Raw data
{
"_id": null,
"home_page": "https://github.com/kedro-org/kedro-viz",
"name": "kedro-viz",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "pipelines,machine learning,data pipelines,data science,data engineering,visualisation",
"author": "Kedro",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/0f/aa/75d36bf7f9ed84ac87ecac244cad0e0739c7c803c2a6cef2cc7251f48163/kedro-viz-8.0.0.tar.gz",
"platform": null,
"description": "# Kedro-Viz\n\n<br />\n<p align=\"center\">\n\n![Kedro-Viz Pipeline Visualisation](https://raw.githubusercontent.com/kedro-org/kedro-viz/main/.github/img/banner.png)\n\n</p>\n\n<p align=\"center\">\n\u2728 <em> Data Science Pipelines. Beautifully Designed</em> \u2728\n<br />\nLive Demo: <a href=\"https://demo.kedro.org/\" target=\"_blank\">https://demo.kedro.org/</a>\n</p>\n\n<br />\n\n[![CircleCI](https://circleci.com/gh/kedro-org/kedro-viz/tree/main.svg?style=shield)](https://circleci.com/gh/kedro-org/kedro-viz/tree/main)\n[![Documentation](https://readthedocs.org/projects/kedro/badge/?version=stable)](https://docs.kedro.org/en/stable/visualisation/)\n[![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11-orange.svg)](https://pypi.org/project/kedro-viz/)\n[![PyPI version](https://img.shields.io/pypi/v/kedro-viz.svg?color=yellow)](https://pypi.org/project/kedro-viz/)\n[![Downloads](https://static.pepy.tech/badge/kedro-viz/week)](https://pepy.tech/project/kedro-viz)\n[![npm version](https://img.shields.io/npm/v/@quantumblack/kedro-viz.svg?color=cc3534)](https://badge.fury.io/js/%40quantumblack%2Fkedro-viz)\n[![License](https://img.shields.io/badge/license-Apache%202.0-3da639.svg)](https://opensource.org/licenses/Apache-2.0)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Slack Organisation](https://img.shields.io/badge/slack-chat-blueviolet.svg?label=Kedro%20Slack&logo=slack)](https://slack.kedro.org)\n\n## Introduction\n\nKedro-Viz is an interactive development tool for building data science pipelines with [Kedro](https://github.com/kedro-org/kedro). Kedro-Viz also allows users to view and compare different runs in the Kedro project.\n\n## Features\n\n- \u2728 Complete visualisation of a Kedro project and its pipelines\n- \ud83c\udfa8 Supports light & dark themes out of the box\n- \ud83d\ude80 Scales to big pipelines with hundreds of nodes\n- \ud83d\udd0e Highly interactive, filterable and searchable\n- \ud83d\udd2c Focus mode for modular pipeline visualisation\n- \ud83d\udcca Rich metadata side panel to display parameters, plots, etc.\n- \ud83d\udcca Supports all types of [Plotly charts](https://plotly.com/javascript/)\n- \u267b\ufe0f Autoreload on code change\n- \ud83e\uddea Supports tracking and comparing runs in a Kedro project\n- \ud83c\udfa9 Many more to come\n\n## Installation\n\nThere are two ways you can use Kedro-Viz:\n\n- As a [Kedro plugin](https://docs.kedro.org/en/stable/extend_kedro/plugins.html) (the most common way).\n\n To install Kedro-Viz as a Kedro plugin:\n\n ```bash\n pip install kedro-viz\n ```\n\n- As a standalone React component (for embedding Kedro-Viz in your web application).\n\n To install the standalone React component:\n\n ```bash\n npm install @quantumblack/kedro-viz\n ```\n\n## Usage\n\n#### Compatibility with Kedro\n\nEnsure your Kedro-Viz and Kedro versions are compatible by referencing the following table:\n\n| Kedro-Viz version | Kedro version |\n| ----------------- | ----------------- |\n| >=4.7 | >=0.17.5 |\n| >=3.8.0, <4.7 | >=0.16.6, <0.17.5 |\n| <3.8.0 | <0.16.6 |\n\nFor **Python 3.6** users, the last supported version of Kedro-Viz is **3.16.0**\n\n### CLI Usage\n\nTo launch Kedro-Viz from the command line as a Kedro plugin, use the following command from the root folder of your Kedro project:\n\n```bash\nkedro viz run\n```\n\nA browser tab opens automatically to serve the visualisation at `http://127.0.0.1:4141/`.\n\nKedro-Viz also supports the following additional arguments on the command line:\n\n```bash\nUsage: kedro viz run [OPTIONS]\n\n Visualise a Kedro pipeline using Kedro-Viz.\n\nOptions:\n --host TEXT Host that viz will listen to. Defaults to\n localhost.\n\n --port INTEGER TCP port that viz will listen to. Defaults to\n 4141.\n\n --browser / --no-browser Whether to open viz interface in the default\n browser or not. Browser will only be opened if\n host is localhost. Defaults to True.\n\n --load-file FILE Path to load kedro-viz data from a directory\n --save-file FILE Path to save kedro-viz data to a directory \n --pipeline TEXT Name of the registered pipeline to visualise. If not\n set, the default pipeline is visualised\n\n -e, --env TEXT Kedro configuration environment. If not specified,\n catalog config in `local` will be used\n\n --autoreload Autoreload viz server when a Python or YAML file change in\n the Kedro project\n\n --ignore-plugins A flag to ignore all installed plugins in the Kedro Project\n \n --params TEXT Specify extra parameters that you want to pass to\n the context initializer. Items must be separated\n by comma, keys - by colon, example:\n param1:value1,param2:value2. Each parameter is\n split by the first comma, so parameter values are\n allowed to contain colons, parameter keys are not.\n To pass a nested dictionary as parameter, separate\n keys by '.', example: param_group.param1:value1.\n\n -h, --help Show this message and exit.\n```\n\nTo deploy Kedro-Viz from the command line as a Kedro plugin, use the following command from the root folder of your Kedro project:\n\n```bash\nkedro viz deploy\n```\n\n```bash\nUsage: kedro viz deploy [OPTIONS]\n\n Deploy and host Kedro Viz on AWS S3.\n\nOptions:\n --region TEXT AWS region where your S3 bucket is located [required]\n --bucket-name TEXT AWS S3 bucket name where Kedro Viz will be hosted\n [required]\n -h, --help Show this message and exit.\n```\n\nTo create a build directory of your local Kedro-Viz instance with static data from the command line, use the following command from the root folder of your Kedro project:\n\n```bash\nkedro viz build\n```\n\n### Experiment Tracking usage\n\nTo enable [experiment tracking](https://docs.kedro.org/en/stable/experiment_tracking/index.html) in Kedro-Viz, you need to add the Kedro-Viz `SQLiteStore` to your Kedro project.\n\nThis can be done by adding the below code to `settings.py` in the `src` folder of your Kedro project.\n\n```python\nfrom kedro_viz.integrations.kedro.sqlite_store import SQLiteStore\nfrom pathlib import Path\nSESSION_STORE_CLASS = SQLiteStore\nSESSION_STORE_ARGS = {\"path\": str(Path(__file__).parents[2] / \"data\")}\n```\n\nOnce the above set-up is complete, tracking datasets can be used to track relevant data for Kedro runs. More information on how to use tracking datasets can be found in the [experiment tracking documentation](https://docs.kedro.org/en/stable/experiment_tracking/index.html)\n\n**Notes:**\n\n- Experiment Tracking is only available for Kedro-Viz >= 4.0.2 and Kedro >= 0.17.5\n- Prior to Kedro 0.17.6, when using tracking datasets, you will have to explicitly mark the datasets as `versioned` for it to show up properly in Kedro-Viz experiment tracking tab. From Kedro >= 0.17.6, this is done automatically:\n\n```yaml\ntrain_evaluation.r2_score_linear_regression:\n type: tracking.MetricsDataset\n filepath: ${base_location}/09_tracking/linear_score.json\n versioned: true\n```\n\n### Standalone React component usage\n\nTo use Kedro-Viz as a standalone React component, you can follow the example below. However, please note that Kedro-Viz does not support server-side rendering (SSR). If you're using Next.js or another SSR framework, you should be aware of this limitation.\n\n```javascript\nimport KedroViz from '@quantumblack/kedro-viz';\nimport '@quantumblack/kedro-viz/lib/styles/styles.min.css';\n\nconst MyApp = () => <KedroViz data={json} />;\n```\n\nTo use with NextJS:\n\n```javascript\nimport '@quantumblack/kedro-viz/lib/styles/styles.min.css';\nimport dynamic from 'next/dynamic';\n\nconst NoSSRKedro = dynamic(() => import('@quantumblack/kedro-viz'), {\n ssr: false,\n});\n\nconst MyApp = () => <NoSSRKedro data={json} />;\n```\n\nThe JSON can be obtained by running:\n\n```bash\nkedro viz run --save-file=filename\n```\n\nWe also recommend wrapping the `Kedro-Viz` component with a parent HTML/JSX element that has a specified height (as seen in the above example) in order for Kedro-Viz to be styled properly.\n\n**_Our documentation contains [additional examples on how to visualise with Kedro-Viz.](https://docs.kedro.org/en/stable/visualisation/index.html)_**\n\n## Feature Flags\n\nKedro-Viz uses features flags to roll out some experimental features. The following flags are currently in use:\n\n| Flag | Description |\n| ------------------ | --------------------------------------------------------------------------------------- |\n| sizewarning | From release v3.9.1. Show a warning before rendering very large graphs (default `true`) |\n| expandAllPipelines | From release v4.3.2. Expand all modular pipelines on first load (default `false`) |\n\nTo enable or disable a flag, click on the settings icon in the toolbar and toggle the flag on/off.\n\nKedro-Viz also logs a message in your browser's [developer console](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools#The_JavaScript_console) to show the available flags and their values as currently set on your machine.\n\n## Maintainers\n\nKedro-Viz is maintained by the [Kedro team](https://docs.kedro.org/en/stable/contribution/technical_steering_committee.html#kedro-maintainers) and a number of [contributors from across the world](https://github.com/kedro-org/Kedro-Viz/contributors).\n\n## Contribution\n\nIf you want to contribute to Kedro-Viz, please check out our [contributing guide](./CONTRIBUTING.md).\n\n## License\n\nKedro-Viz is licensed under the [Apache 2.0](https://github.com/kedro-org/kedro-viz/blob/main/LICENSE.md) License.\n\n## Citation\n\nIf you're an academic, Kedro-Viz can also help you, for example, as a tool to visualise how your publication's pipeline is structured. Find our citation reference on [Zenodo](https://doi.org/10.5281/zenodo.4277218).\n",
"bugtrack_url": null,
"license": "Apache Software License (Apache 2.0)",
"summary": "Kedro-Viz helps visualise Kedro data and analytics pipelines",
"version": "8.0.0",
"project_urls": {
"Homepage": "https://github.com/kedro-org/kedro-viz"
},
"split_keywords": [
"pipelines",
"machine learning",
"data pipelines",
"data science",
"data engineering",
"visualisation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1f0069b112a59d4457d39270e18cedce13f3a238738a93ade0e9b356fcf70c96",
"md5": "d1be4676b94265a0b38120a42b22d623",
"sha256": "acb9d9f3b69e50c0078a298fb67a4322322290958b95c4e493d78988a679079c"
},
"downloads": -1,
"filename": "kedro_viz-8.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d1be4676b94265a0b38120a42b22d623",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 1629757,
"upload_time": "2024-03-04T14:48:48",
"upload_time_iso_8601": "2024-03-04T14:48:48.635414Z",
"url": "https://files.pythonhosted.org/packages/1f/00/69b112a59d4457d39270e18cedce13f3a238738a93ade0e9b356fcf70c96/kedro_viz-8.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0faa75d36bf7f9ed84ac87ecac244cad0e0739c7c803c2a6cef2cc7251f48163",
"md5": "388f36ec80ddc3d2175dfcc9b9270933",
"sha256": "ddad970b6b99edd96e0f88cda2ef4793519dd4214c0c30430a198082b8035322"
},
"downloads": -1,
"filename": "kedro-viz-8.0.0.tar.gz",
"has_sig": false,
"md5_digest": "388f36ec80ddc3d2175dfcc9b9270933",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1610585,
"upload_time": "2024-03-04T14:48:50",
"upload_time_iso_8601": "2024-03-04T14:48:50.967137Z",
"url": "https://files.pythonhosted.org/packages/0f/aa/75d36bf7f9ed84ac87ecac244cad0e0739c7c803c2a6cef2cc7251f48163/kedro-viz-8.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-04 14:48:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kedro-org",
"github_project": "kedro-viz",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"circle": true,
"lcname": "kedro-viz"
}