Skip to main content

Kedro-Viz helps visualise Kedro data and analytics pipelines

Project description

Kedro-Viz

CircleCI npm version Python Version PyPI version License DOI code style: prettier

Kedro-Viz shows you how your Kedro data pipelines are structured.

With Kedro-Viz you can:

  • See how your datasets and Python functions (nodes) are resolved in Kedro so that you can understand how your data pipeline is built
  • Get a clear picture when you have lots of datasets and nodes by using tags to visualise sub-pipelines
  • Search for nodes and datasets

Kedro-Viz Pipeline Visualisation

This project was bootstrapped with Create React App, for which more complete documentation is available on the project website.

How do I install and use Kedro-Viz?

For in-depth development and usage notes, see the Contribution Guidelines.

It's likely that Kedro-Viz>=3.8.0 will not work with projects created with older versions of Kedro<=0.16.6. Please migrate your project to Kedro>=0.17.0 before installation of the latest version of Kedro-Viz.

As a Kedro Python plugin

Kedro-Viz is available as a Python plugin named kedro-viz.

The following conditions must be true in order to visualise your pipeline:

  • Your project directory must be available to the Kedro-Viz plugin.
  • You must be using a Kedro project structure with a complete Data Catalog, nodes and pipeline structure.

To install it:

pip install kedro-viz

This will install kedro as a dependency, and add kedro viz as an additional CLI command.

Kedro CLI command

To visualise your pipeline, go to your project root directory and install the project-specific dependencies by running:

kedro install

This will install the dependencies specified in requirements.txt in your Kedro environment (see the Kedro documentation for how to set up your Python virtual environment).

Finally, run the following command from the project directory to visualise your pipeline:

kedro viz

This command will run kedro_viz.server on http://127.0.0.1:4141/ which cannot be accessed from another machine.

Kedro-Viz has a number of options to customise running the visualisation:

CLI command Description
--host Host that viz will listen to. Defaults to 127.0.0.1.
--port TCP port that viz will listen to. Defaults to 4141.
--browser/--no-browser Whether to open viz interface in the default browser or not.
--load-file Path to load the pipeline JSON file
--save-file Path to save the pipeline JSON file
--pipeline Name of the modular pipeline to visualise. If not set, the default pipeline is visualised.
--env, -e Kedro configuration environment. If not specified, catalog config in local will be used.

As a JavaScript React component

Kedro-Viz is also available as an npm package named @quantumblack/kedro-viz. To install it:

npm install @quantumblack/kedro-viz

Then include it in your React application:

import KedroViz from '@quantumblack/kedro-viz';

const MyApp = () => <KedroViz data={json} />;

As a JavaScript React component, the project is designed to be used in two different ways:

  1. Standalone application

    Run npm run build to generate a production build as a full-page app. The built app will be placed in the /build directory. Data for the chart should be placed in /public/api/main because this directory is marked gitignore.

  2. React component

    Kedro-Viz can be used as a React component that can be imported into other applications. Publishing the package will run npm run lib, which compiles the source code in /src, and places it in the /lib directory.

    The React component exposes props that can be used to supply data and customise its behaviour. For information about the props, their expected prop-types and default values, see /src/components/app/index.js. For examples of the expected data input format, see the mock data examples in /src/utils/data, and compare the resulting demo.

Flags

The following flags are available to toggle experimental features:

  • oldgraph - From release v3.8.0. Display old version of graph (dagre algorithm) without improved graphing algorithm. (default false)
  • newparams - From release v3.12.0. Disable parameters on page load and highlight parameter connections.
  • sizewarning - From release v3.9.1. Show a warning before rendering very large graphs. (default true)
  • modularpipeline - From release v3.11.0. Enables filtering of nodes by modular pipelines. Note that selecting both modular pipeline and tag filters will only return nodes that belongs to both categories. (default false).

Note that newgraph has been removed from v3.8.0 onwards and is now the default functionality. Should there be issues with your project, see the oldgraph flag above.

Setting flags

To enable or disable a flagged feature, add the flag as a parameter with the value true or false to the end of the URL in your browser when running Kedro-Viz, e.g.

http://localhost:4141/?data=demo&oldgraph=true

The setting you provide persists for all sessions on your machine, until you change it.

Viewing flags

Kedro-Viz will log a message in your browser's developer console regarding the available flags and their values as currently set on your machine.

What licence do you use?

Kedro-Viz is licensed under the Apache 2.0 License.

How can I cite Kedro-Viz?

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.

↑↑↓↓←→←→BA

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

kedro-viz-3.12.0.tar.gz (2.9 MB view details)

Uploaded Source

Built Distributions

kedro_viz-3.12.0-py3.8.egg (9.3 MB view details)

Uploaded Source

kedro_viz-3.12.0-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file kedro-viz-3.12.0.tar.gz.

File metadata

  • Download URL: kedro-viz-3.12.0.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10

File hashes

Hashes for kedro-viz-3.12.0.tar.gz
Algorithm Hash digest
SHA256 25aae071b483009409327c5689c7d38e51d368e7f66c2b1b1f368b329e1b21e3
MD5 7b3b1a7097aca9772259f8fe650bfd04
BLAKE2b-256 7af732db26027bef00925a72380a7da0dbfd6b1a0e354a40819f353bd1c137c8

See more details on using hashes here.

File details

Details for the file kedro_viz-3.12.0-py3.8.egg.

File metadata

  • Download URL: kedro_viz-3.12.0-py3.8.egg
  • Upload date:
  • Size: 9.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10

File hashes

Hashes for kedro_viz-3.12.0-py3.8.egg
Algorithm Hash digest
SHA256 410839ff6b0de7f2737d1be4dff5d325f225baf353dc373940c1d64f3548bf98
MD5 da3522d30ae7bf2bdf5bac150a8da270
BLAKE2b-256 0eac22a4f4d9d6308d7809f886789187de3dee3045ffad88ec2bfe9726ee54a4

See more details on using hashes here.

File details

Details for the file kedro_viz-3.12.0-py3-none-any.whl.

File metadata

  • Download URL: kedro_viz-3.12.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10

File hashes

Hashes for kedro_viz-3.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93f05f0336dbb6589ef12d06be3486e1416d81d6ee9aaa7767d63219e603c2c8
MD5 260c0257f46cdc5b229824556e4cef60
BLAKE2b-256 bcd7679892aa52190e54c254a3309635267b2ffd266f04eac7c1fb87f5e28452

See more details on using hashes here.

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