FRosner / spawncamping-dds

Data-Driven Spark allows quick data exploration based on Apache Spark.
Other
28 stars 15 forks source link

Rework Z scale of heatmap #268

Closed FRosner closed 8 years ago

FRosner commented 8 years ago

Current Situation

Currently, the Z scale is represented entirely by the front-end. After #253 is done, it will be represented by lower and upper bound.

Problem

It is difficult to select an appropriate scale for a given lower and upper bound on the UI side, because there we cannot know what the numbers visualized mean. E.g. mutual information needs only two colors from lower to upper bound, while pearson correlation requires -1, 0 and +1 as different color points.

Proposed solution

Instead of explicitly setting the lower and upper bound we'd rather pass a sequence of Z reference points (which at minimum have to be 2, lower and upper bound). This way the UI can simply select an appropriate color scale that respects the given reference points (but at least lower and upper bound).

case class Heatmap(title: String,
                   content: Seq[Seq[Double]],
                   rowNames: Seq[String],
                   colNames: Seq[String],
                   zReferencePoints: Seq[Double]) extends Servable {

  require(zReferencePoints.size >= 2, "zReferencePoints needs to contain at least min and max z")

}