Plot functions do not check the shape of their input

Open
#1,273 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
r

Research direction

Start by reading the implementations of plot_wis(), plot_heatmap(), get_coverage(), and plot_pairwise_comparisons() in the package, then inspect their existing tests. The report identifies several independent plotting and cleanup problems, including duplicated score rows, coverage grouping, heatmap scales and labels, and unused code. Done means each reported behavior is addressed and covered by tests; the issue does not name specific files or test commands.

Written by the indexing model from the issue text.

Description

CLAUDE: - [ ] plot_wis() and plot_heatmap() silently draw unsummarised scores. On raw score() output plot_wis() stacks all rows (bars show sums, not means) and plot_heatmap() overplots 887 tiles in 7 cells. Suggestion: warn or abort when the rows are not unique for the plotted dimensions.

  • Coverage plots zigzag when get_coverage(by = ) has more columns than the colour variable and no facet is added.
  • plot_heatmap(): the colour scale is centred at 0 for every metric, so non-negative metrics show nearly identical shades; labels are printed unrounded. Related to #826.
  • plot_pairwise_comparisons() has unused code (levels <- ..., a second match.arg()).

Found during a full review of the package (version 2.3.0.9000, main at 779d7d68).

Dominant language
R
Stars
67
Forks
24
Avg merge
1h 24m
Merged PRs (30d)
2

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from epiforecasts/scoringutils

All issues in epiforecasts/scoringutils

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.