Skip to main content
100%

Sequence explorer - visitor flow

✓ Published0🌍 Public
EEE2dev
Last edited Feb 19, 2019
Created on Feb 19, 2019

This example shows a sequence explorer visualization that tracks visitor flow through events, using a Sankey-style diagram where nodes represent event steps and paths represent transitions between them. It demonstrates how to include free-floating nodes by adding an invisible dummy event, here named a space, which appears as a hidden node on the y-axis. The code uses the D3 v4 library with a custom `sequenceExplorer` plugin, loading data from a JSON file where each link specifies source and target event positions. The `eventOrder` API arranges the visible events (C, B, A) while the dummy event is pushed to the top, and CSS rules hide its nodes and paths. A dummy path with a large value ensures proportional scaling of all other nodes and paths.

AI-generated description

Sequence explorer

This example illustrates how to add nodes without paths.

You basically do four things:

  • In your data file (JSON or csv), data is specified as a collection of paths. For the nodes you want free flowing (no path) you create an "artificial" path to a dummy node, with the name " ". So the label on the axis is invisible.

  • with sequenceExplorer.eventOrder([...]) you specify the order of the events along the Y axis. Put your dummy event " " to the top (last element in array)

  • add css to make nodes for the dummy event " " invisible as well as all paths leading to these nodes. (a " " (space) in the event name is substituted to "_" underscore so you can address it with CSS classes.

  • to have a nice scaling of your nodes/paths, you can add a dummy path from the event " " to the event " " which will be invisible. But if the value of the node is the largest overall, the remaining nodes/ paths are scaled accordingly.

Link to sequence explorer on github.

forked from <a href='http://bl.ocks.org/EE2dev/'>EE2dev</a>'s block: <a href='http://bl.ocks.org/EE2dev/6b68884490d70aa0092b351e33741d96'>Sequence explorer - single chart (with JSON file)</a>

mit Licensed

Similar vizzes

Loading thumbnail…

Sequence explorer - single chart (with JSON file)

This example demonstrates a single-chart sequence explorer visualization built with D3 v4, loaded from an external JSON file. The chart visualizes sequential event flows, with events ordered along the y-axis using the `eventOrder` method (home, product, search, account, other) and the x-axis labeled as "visit" via the `sequenceName` setting. The JSON data defines a directed graph of transitions between events, with values representing the volume of each step. The visualization is instantiated by calling `sequenceExplorer.chart("sequence1.json")` and rendered into a div in the body. This approach highlights the sequence explorer's ability to depict multi-step event pathways, similar to a sunburst but in a linear, flow-based layout, making it easy to compare pros and cons against alternative visualization methods for the same dataset. The data is derived from Kerry Rodden's sunburst example, and the chart is configured to reorder event categories on the y-axis and customize tooltip labels. The single chart version keeps all event sequences in one view, useful for tracking navigation flows or funnel analysis.This example demonstrates how to create a **single-chart sequence explorer** using D3 v4 and data loaded from an external JSON file. The chart visualizes sequential categorical data—here, sequences of website events such as "home", "product", "search", and "account"—as a Sankey-style flow diagram. Each row represents a step in the sequence, and the width of the links corresponds to the number of visits, making it easy to identify common paths and drop-off points. The code shows how to initialize the chart with a JSON file, customize the event order on the y-axis, and rename the x-axis for tooltips. The data is derived from Kerry Rodden’s sunburst example, allowing for a direct comparison between the two visualization approaches for the same dataset.

EEE2dev
83% match