ggextreme - Bar Chart Races and Interactive Plots for Clinical Research
Presentation quality charts built on 'ggplot2' that the
package itself does not provide. The bar chart race
interpolates values on a uniform time grid, ranks every frame
on its own values and eases bars into new positions, so a
reordering field stays readable. Frames are ordinary 'ggplot2'
objects laid out on a fixed pixel grid, which keeps the axis
and label column from drifting between them, and are encoded to
GIF or MP4. Circular images, such as the bundled country flags,
can be placed at the end of each bar. Causal diagrams are drawn
as directed acyclic graphs whose nodes and arrows each carry a
rationale and references, shown on hover and opened with
clickable links on click, through 'ggiraph'; the same diagram
is also available as a static 'ggplot2' object. Network plots
for network meta-analysis are drawn from arm level data, with
the baseline characteristics and outcomes of every arm shown
side by side on click. Forest plots for 'metafor' and 'meta'
fits carry each study's record and risk of bias traffic lights,
and replay a cumulative meta-analysis as an animation; funnel
plots shade where each study would be significant and carry the
pooled estimate without it, trim and fill and the tests for
small-study effects; league tables for 'netmeta' fits show the
direct and indirect evidence behind every estimate.
Kaplan-Meier plots read survival and the hazard ratio at any
time under the pointer, beside a risk table and proportional
hazards tests, and swimmer plots give each patient a lane with
their responses, progression and death. Nomograms of regression
models, from linear and generalized linear models to mixed,
Cox, parametric survival, ordinal and multinomial models, have
a handle per predictor and compute each prediction with its
confidence interval in the page. Choropleth maps of the world
or of any 'sf' map step or play through the years, with several
measures side by side for the same year. Causal diagrams can
also show which paths between an exposure and an outcome an
adjustment set leaves open, by the backdoor criterion;
Kaplan-Meier plots give the restricted mean survival time up to
a horizon the reader can move; league tables and network plots
show where each network estimate's evidence comes from; and
swimmer plots can carry a waterfall of best change and each
patient's course beside the lanes. Four explorers put a
threshold or an assumption in the reader's hands: the cutoff of
a diagnostic test, with what it means for 1,000 people at any
prevalence; the strength of unmeasured confounding, with
E-values; the choices of a multiverse of analyses; and the
threshold that defines a responder. Plots after CINeMA judge
the confidence in each estimate of a network meta-analysis in
six domains, with every judgment's reason and source, and show
what lies behind them: each study's contribution, the estimates
against a movable range of little difference, direct against
indirect evidence, and a league table and a network marked with
the judgments.