Create a matrix of buttons suitable for quick comparisons

tile_matrix(
  data,
  values,
  txt,
  icon,
  former,
  target = 100,
  thresholdHigh = 90,
  thresholdLow = 50,
  cols = 4,
  title = NULL,
  roundVal = 1,
  textModifier = "h1"
)

Arguments

data

a dataframe containing the data you would like to plot

values

a Vector containing values for each tile, contained in the dataframe `data`

txt

Vector containing titles for each tile, contained in the datframe `data`

icon

Optional glyphicon that should be displayed from https://getbootstrap.com/docs/3.3/components/ you need only supply the name of thing you want, like "check"... not the full "gyphicon-check"

former

optional vector containing former values (to show change from last), contained in the datframe `data`

target

Optional target that the value should be compared against. Use with thresholdHigh and THresholdLow

thresholdHigh

Optional edge between \"green\" and \"orange\" from 0-100 as a percent of target. IE, this value represents the RATIO of the VALUE to the target that, if above or equal to the thresholdHigh will show as green, and if not, as orange. Use w/ target and thresholdLow.

thresholdLow

Optional border between \"orange\" and \"red\" from 0-100 as a percent of target. IE, this value represents the RATIO of the VALUE to the target that, if above or equal to the ThresholdLow will show as orange, and if not, as red. Use w/ target and thresholdHigh.

cols

Number of columns that the matrix should tile around. Defaults to 4

title

The title the matrix should have.

roundVal

Number of decimals that Value will be rounded to. Defaults to 1

textModifier

Optional css category of "large" text. In this case, the icon, value and unit. Default=h1

Value

Returns a list object containing the matrix of buttons

Examples

finisher(title = "Tile Matrix", divs = tile_matrix(
  data = head(iris),
  values = Sepal.Length,
  txt = Species
))

  
    

Tile Matrix