heatmap: Heatmap data file

View source: R/class-plotdata-heatmap.R

heatmapR Documentation

Heatmap data file

Description

This function returns the name of a json file containing plot-ready data with one row per group (per panel). Column 'table' contains a nested data.table of z-values for plotting. This table has a column for each x-axis entry and a row for each y-axis entry. Columns 'group' and 'panel' specify the group the series data belongs to. There are two ways to calculate z-values for the heatmap.
1) 'collection' of numeric variables vs single categorical
2) single numeric vs single categorical on a 'series' of dates where yAxisVariable = categorical, xAxisVariable = date and zaxis = numeric

Usage

heatmap(
  data,
  variables,
  value = c("series", "collection"),
  sampleSizes = c(TRUE, FALSE),
  completeCases = c(TRUE, FALSE),
  evilMode = c("noVariables", "allVariables", "strataVariables")
)

Arguments

data

data.frame to make plot-ready data for

variables

veupathUtils VariableMetadataList

value

String indicating which of the three methods to use to calculate z-values ('collection', 'series')

sampleSizes

boolean indicating if sample sizes should be computed

completeCases

boolean indicating if complete cases should be computed

evilMode

String indicating how evil this plot is ('strataVariables', 'allVariables', 'noVariables')

verbose

boolean indicating if timed logging is desired

Value

character name of json file containing plot-ready data

Evil Mode

An 'evilMode' exists. It will do the following:
- when ‘strataVariables' it will return ’no data' as a regular value for strata vars but will discard such cases for the axes vars.
- when ‘allVariables' it will return ’no data' as a regular value for all variables.
- when 'noVariables' it will do the sensible thing and return complete cases only.
- not return statsTables
- allow smoothed means and agg values etc over axes values where we have no data for the strata vars
- return a total count of plotted incomplete cases
- represent missingness poorly, conflate the stories of completeness and missingness, mislead you and steal your soul


VEuPathDB/plot.data documentation built on Feb. 20, 2025, 6:33 p.m.