Package: kedro-viz
Kedro-Viz✨Data Science Pipelines. Beautifully Designed✨Live Demo:https://demo.kedro.org/IntroductionKedro-Viz is an interactive development tool for building data science pipelines withKedro. 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 ofPlotly charts♻️ Autoreload on code change🧪 Supports tracking and comparing runs in a Kedro project🎩 Many more to comeInstallationThere are two ways you can use Kedro-Viz:As aKedro plugin(the most common way).To install Kedro-Viz as a Kedro plugin:pipinstallkedro-vizAs a standalone React component (for embedding Kedro-Viz in your web application).To install the standalone React component:npminstall@quantumblack/kedro-vizUsageCompatibility with KedroEnsure your Kedro-Viz and Kedro versions are compatible by referencing the following table:Kedro-Viz versionKedro version>=4.7>=0.17.5>=3.8.0, <4.7>=0.16.6, <0.17.5<3.8.0<0.16.6ForPython 3.6users, the last supported version of Kedro-Viz is3.16.0CLI UsageTo launch Kedro-Viz from the command line as a Kedro plugin, use the following command from the root folder of your Kedro project:kedrovizrunA browser tab opens automatically to serve the visualisation athttp://127.0.0.1:4141/.Kedro-Viz also supports the following additional arguments on the command line:Usage:kedrovizrun[OPTIONS]VisualiseaKedropipelineusingKedro-Viz.

Options:--hostTEXTHostthatvizwilllistento.Defaultstolocalhost.--portINTEGERTCPportthatvizwilllistento.Defaultsto4141.--browser/--no-browserWhethertoopenvizinterfaceinthedefaultbrowserornot.Browserwillonlybeopenedifhostislocalhost.DefaultstoTrue.--load-fileFILEPathtoloadkedro-vizdatafromadirectory--save-fileFILEPathtosavekedro-vizdatatoadirectory--pipelineTEXTNameoftheregisteredpipelinetovisualise.Ifnotset,thedefaultpipelineisvisualised-e,--envTEXTKedroconfigurationenvironment.Ifnotspecified,catalogconfigin`local`willbeused--autoreloadAutoreloadvizserverwhenaPythonorYAMLfilechangeintheKedroproject--ignore-pluginsAflagtoignoreallinstalledpluginsintheKedroProject--paramsTEXTSpecifyextraparametersthatyouwanttopasstothecontextinitializer.Itemsmustbeseparatedbycomma,keys-bycolon,example:param1:value1,param2:value2.Eachparameterissplitbythefirstcomma,soparametervaluesareallowedtocontaincolons,parameterkeysarenot.Topassanesteddictionaryasparameter,separatekeysby'.',example:param_group.param1:value1.-h,--helpShowthismessageandexit.To deploy Kedro-Viz from the command line as a Kedro plugin, use the following command from the root folder of your Kedro project:kedrovizdeployUsage:kedrovizdeploy[OPTIONS]DeployandhostKedroVizonAWSS3.

Options:--regionTEXTAWSregionwhereyourS3bucketislocated[required]--bucket-nameTEXTAWSS3bucketnamewhereKedroVizwillbehosted[required]-h,--helpShowthismessageandexit.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:kedrovizbuildExperiment Tracking usageTo enableexperiment trackingin Kedro-Viz, you need to add the Kedro-VizSQLiteStoreto your Kedro project.This can be done by adding the below code tosettings.pyin thesrcfolder of your Kedro project.fromkedro_viz.integrations.kedro.sqlite_storeimportSQLiteStorefrompathlibimportPathSESSION_STORE_CLASS=SQLiteStoreSESSION_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 theexperiment tracking documentationNotes:Experiment Tracking is only available for Kedro-Viz >= 4.0.2 and Kedro >= 0.17.5Prior to Kedro 0.17.6, when using tracking datasets, you will have to explicitly mark the datasets asversionedfor it to show up properly in Kedro-Viz experiment tracking tab. From Kedro >= 0.17.6, this is done automatically:train_evaluation.r2_score_linear_regression:type:tracking.MetricsDatasetfilepath:${base_location}/09_tracking/linear_score.jsonversioned:trueStandalone React component usageTo 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.importKedroVizfrom'@quantumblack/kedro-viz';import'@quantumblack/kedro-viz/lib/styles/styles.min.css';constMyApp=()=><KedroVizdata={json}/>;To use with NextJS:import'@quantumblack/kedro-viz/lib/styles/styles.min.css';importdynamicfrom'next/dynamic';constNoSSRKedro=dynamic(()=>import('@quantumblack/kedro-viz'),{ssr:false,});constMyApp=()=><NoSSRKedrodata={json}/>;The JSON can be obtained by running:kedrovizrun--save-file=filenameWe also recommend wrapping theKedro-Vizcomponent 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 containsadditional examples on how to visualise with Kedro-Viz.Feature FlagsKedro-Viz uses features flags to roll out some experimental features. The following flags are currently in use:FlagDescriptionsizewarningFrom release v3.9.1. Show a warning before rendering very large graphs (defaulttrue)expandAllPipelinesFrom release v4.3.2. Expand all modular pipelines on first load (defaultfalse)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'sdeveloper consoleto show the available flags and their values as currently set on your machine.MaintainersKedro-Viz is maintained by theKedro teamand a number ofcontributors from across the world.ContributionIf you want to contribute to Kedro-Viz, please check out ourcontributing guide.LicenseKedro-Viz is licensed under theApache 2.0License.CitationIf 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 onZenodo.