How Do I Build a Sankey Chart?
How to Build a Sankey Chart
If you want to analyze navigation patterns in your course, then you can show branching — and even abandonment — with a Sankey chart. How
to create — In an Advanced Graph Query widget, insert code like this…
{ "title": "Course Navigation",
"subtitle": "“Neural Networks and Deep Learning” Interactions",
"filter": {
"object.id": {
"$in": [
"https://www.coursera.org/specializations/deep-learning/1/interactions/1",
"https://www.coursera.org/specializations/deep-learning/1/interactions/2"]}},
"process": [{
"$paths": {
"stepValuePath": "object.definition.description.en-US",
"sessionPath": "context.registration"}}, {
"$pathsToNodes": {
"order": false}}, {
"$sankeyChart": {}}]}
The filter stage uses a logical IN to limit the
nodes to the selected objects, which the widget uses as the “value path”. As is typical with Sankey charts in the LRS, the “session path” follows the context
registration.
Here’s an example of a Sankey chart
widget for navigation between interactions in a lesson.
How to interpret — In the chart above, three times students responded to the “Neural networks" interaction first, then the “Backpropagation” interaction. Six times students responded in the opposite order.
You can customize this chart by adding MongoDB stages that $match length of branches and $sort last branches. You can also change the style by adding amCharts fields.
Related Articles
Why Doesn’t My Duration Chart Work?
Use meta.duration, Not result.duration If you’re trying to build a chart with duration as the metric and it’s not working, then the reason is probably that you’re trying to get values from result.duration. Use meta.duration instead. Statements encode ...
What Types of Charts Can I Make in the LRS?
In general, you can make charts in a custom dashboard using two methods: using our Chart Builder, or by programming our Veracity Query Language (VQL). Chart Builder Charts The Chart Builder and similar form-based wizards in the Veracity Learning LRS ...
How Do I Add Tooltips to a Timeseries Chart?
Timeseries charts are usually so dense that tooltips are hard to select, so they don't have them. However, if you really need them, then you can add them yourself. When you're filling-in the Chart Builder for a custom Timeseries chart, scroll down to ...
How Do I Add ‘Storytelling’ to a Dashboard?
If you only use the out-of-the-box dashboards, or have a custom dashboard with one widget, then you’re all set. But, if you decide to build a custom dashboard (or more) with many widgets, then you must consider the overall design. “Widgets” include ...
How Do I Show Percent of Students?
In a custom dashboard, you can easily build a bar chart that shows the number of unique students per course. Chart Builder with simulated data offered in the free Veracity Learning LRS. Problem But what if you want to show the number of unique ...