Skip to contents

Draws the Gantt of a mapped course: one row per course objective, one bar per session that addresses it, laid out along the term. Where a Sankey says how much of each objective is served and by what, this says when – an objective met only in week 1, one taught in three separated bursts, and one carried evenly across the term have the same ribbon and different bars.

Usage

plot_gantt(
  x,
  threshold = NULL,
  group = "band",
  node_labels = c("text", "id"),
  palette = NULL,
  title = NULL,
  card = c("bottomleft", "bottomright", "topleft", "topright", "none"),
  filename = NULL,
  width = 1200,
  height = 700,
  verbosity = 1L,
  ...
)

Arguments

x

CurriculumMapping object, from map_curriculum().

threshold

Numeric [0, 1]: Minimum strength for a session to count as addressing an objective. NULL uses the threshold the run was made with.

group

Character: Column of as_gantt() to color bars by, or NULL for one color. "band", the default, carries the strength of the support: the rows already name the objectives, so a legend keyed by objective repeats them at length while saying nothing the y-axis does not. "label" colors by objective in the hues sankey_palette() uses, for a figure meant to be read beside a Sankey; "label_band" carries both, at the cost of a legend entry per objective per band. "alignment" colors by the scoring system's own label, "covered" reduces it to met/unmet.

node_labels

Character {"text", "id"}: What to label rows with.

palette

Character: Bar colors, in the order the groups appear. NULL builds them from the same hues sankey_palette() gives the criteria, so an objective is one color across every figure of a run, with the uncovered marker outside the ramp in red.

title

Character: Chart title. NULL builds one from the course name and term.

card

Character {"bottomleft", "bottomright", "topleft", "topright", "none"}: Corner for a small card naming the scoring system, what one rating means and where the alignment threshold was drawn. "none" omits it.

filename

Character: Path to write the drawing to, or NULL to return it without writing. The extension picks the format; .svg is supported.

width

Numeric: Figure width in pixels, used when writing.

height

Numeric: Figure height in pixels, used when writing.

verbosity

Integer [0, Inf): Verbosity level.

...

Additional arguments passed to rtemis.draw::draw_gantt(), e.g. palette, theme, bar_height.

Value

htmlwidget: The drawing, invisibly where filename was written.

Details

The run's own threshold is used unless another is given, so the picture agrees with the verdict print() and report_curriculum() report. A course objective no session reaches keeps its row, marked: a row that vanishes is the finding a reader most needs.

Requires the rtemis.draw package, and filename additionally requires a node binary on the PATH – SVG is rendered server-side, which is what turns an interactive widget into a figure.

Author

EDG

Examples

if (FALSE) { # \dontrun{
  cm <- map_curriculum(course, llmconfig = llmconfig)
  plot_gantt(cm)
  plot_gantt(cm, threshold = 0.6, filename = "epi207_gantt.svg")
} # }