9 Visualization
Sankey diagrams display relationships among objectives and assessment items. Gantt-style charts show where course objectives are addressed across ordered sessions. Both views use recorded alignment strength and retain indicators for uncovered objectives.
The examples use a completed CurriculumMapping object named cm and require rtemis.draw. Plotting does not call a model.
9.1 Alignment diagrams
plot_sankey(cm)
plot_sankey(cm, direction = "session_to_assessment")The course-to-session diagram places course objectives on the criterion side and session objectives on the candidate side. Ribbon widths encode retained alignment strength. The assessment direction requires an assessment mapping.
By default, the threshold is taken from cm@run. An explicit threshold changes the figure without changing the saved mapping or its consistency tables:
plot_sankey(
cm,
threshold = 0.6,
node_labels = "id",
candidate_fill = "neutral",
theme = "dark"
)candidate_fill = "mix", the default, blends criterion colors according to their support. "neutral" assigns candidates a neutral color. A scoring card identifies the rubric and threshold; card = "none" omits it.
9.1.1 Gap indicators
as_sankey() routes thresholded-away strength to an uncovered node. Criteria and candidates with no surviving links receive sentinel links so that they remain visible. A link drawn at the minimum width is a presence marker rather than a measured amount of missing learning. Summed strengths and ribbon widths are not proportions of a course objective attained by students.
For direct control of the drawing:
links <- as_sankey(cm@mapping, threshold = 0.5)
rtemis.draw::draw_sankey(
links,
palette = sankey_palette(cm@mapping, links)
)The links carry a node table in their "nodes" attribute. The palette function uses that table to keep colors associated with the displayed nodes.
9.2 Coverage across sessions
plot_gantt(cm)
plot_gantt(cm, group = "label")Each row represents a course objective. Bars mark sessions containing aligned objectives. Session order follows the mapping input; one axis unit represents one session, rather than calendar time or teaching hours.
group |
Color encoding |
|---|---|
"band" |
Alignment-strength bands; the default |
"label" |
Course objective |
"label_band" |
Course objective and strength band |
"alignment" |
Scoring-system label |
"covered" |
Coverage indicator |
An uncovered objective receives a marker at the start of the chart. Its width does not represent instructional duration.
tasks <- as_gantt(cm@mapping, threshold = 0.5)
head(tasks)
attr(tasks, "sessions")The task table contains session identifiers, strengths, counts of aligned objectives, grouping columns, and tooltip text. It can be passed to rtemis.draw::draw_gantt() for further customization.
9.3 Tables and matrices
edges <- as.data.frame(cm@mapping)
strength <- as.matrix(cm@mapping)The long edge table retains identifiers, source text, native values, strengths, and model-specific fields. The matrix provides a compact criterion-by-candidate view. Inspect missing scores separately from low alignment scores. A shaded alignment matrix is also included in the HTML report.
9.4 Exporting figures
plot_sankey(
cm,
filename = "alignment.svg",
width = 1600,
height = 1000
)
plot_gantt(cm, filename = "session_coverage.svg")SVG export requires the node executable used by rtemis.draw. Set dimensions and margins for the intended output size, and inspect long labels in the exported figure. Report the threshold when presenting a figure that uses a different threshold from the main analysis.