Toggle navigation
Home
▼ Details
Products and pricing
Chart gallery
User stories
Text analytics
CDC NAMCS Library
Blog
Tutorials
Contact
Sign in
Post Editor
← All blog posts
View post
Save
<p>Flow diagrams can be a good way to visualize relationships between variables, like progression of treatment regimens by line of therapy.</p> <p>One type of flow diagram is the <a href="https://en.wikipedia.org/wiki/Sankey_diagram">Sankey diagram</a> where the width of the arrows is proportional to quantity. Here's how to create one in Protobi...</p> <p><img src="/images/blog/2018-08-31-sankey/flow-mfr-color.png" style="margin: 0 auto; width:480px; max-width:480px; display: block;vertical-align:top"></p> <!--more--> <h2 id="create-a-group-of-categorical-variables">Create a group of categorical variables</h2> <p>There are a few ways to create Sankey Diagrams in Protobi. One way is from an ordinary crosstab. Another is to identify a sequence of categorical variables and place them into a distinct group. </p> <p>For instance, for a patient chart audit you might choose first-line, second-line and third-line treatment regimens. For this example we'll use three variables from an industrial survey screener: Region, Industry and Role:</p> <p><img src="/images/blog/2018-08-31-sankey/flow-mfr-group.png" style="margin: 0 auto; width:600px; max-width:600px; display: block;vertical-align:top"></p> <p>A simple way to create a group is to press the "+" tab to create a new tab, and hold the shift key while dragging elements from the tree into the new tab.</p> <h2 id="set-chart-type">Set chart type</h2> <p>Press the square edit icon to bring up the chart dialog, and choose "Sankey":</p> <p><img src="/images/blog/2018-08-31-sankey/flow-gg-dialog.png" style="margin: 0 auto; width:360px; max-width:360px; display: block;vertical-align:top"></p> <h2 id="resize-and-organize">Resize and organize</h2> <p>Voilá, you now have a new flow diagram. You can drag the blue resize handle to resize the chart. You can drag the squares to re-order them vertically.</p> <p><img src="/images/blog/2018-08-31-sankey/flow-mfr-bw-selected.png" style="margin: 0 auto; width:480px; max-width:480px; display: block;vertical-align:top"></p> <p>If the parent group has a format specified that applies to all the child elements, Protobi will choose initial colors automatically from the default theme. Here however we created a new group, and can choose the colors explicitly.</p> <p>Press the square edit icon and choose "Edit JSON..." from the context menu. Create a new entry <code>"colors": { "key": "color", ...}</code> to specify colors for each child value.</p> <p><img src="/images/blog/2018-08-31-sankey/flow-mfr-json.png" style="margin: 0 auto; width:480px; max-width:480px; display: block;vertical-align:top"></p> <h2 id="finished-diagram">Finished diagram</h2> <p>Below is the finished diagram: <br/><br/> <img src="/images/blog/2018-08-31-sankey/flow-mfr-color.png" style="margin: 0 auto; width:480px; max-width:480px; display: block;vertical-align:top"></p> <p>Here we can visually see a few interesting features:</p> <ul> <li>respondents in "Healthcare" are exclusively from North America</li> <li>respondents from China are most often in "Manufacturing"</li> <li>sales people are most often in "Retail Trade"</li> </ul>
Date
Status
Published
Draft
Slug
edit
Thumbnail
Categories
Manage
Release
Features
Datasets
Surveys
Tips
NAMCS
Applications
Crosstab
Tutorial
Design
Concepts
Segmentation
Examples
Blog Test Category
Delete
Convert to MD