-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently only for quantitative and XY comparisons
- Loading branch information
Showing
10 changed files
with
65 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
BoxPlot←{ | ||
⍝ ⍵ ←→ APL matrix with headers | ||
⍝ ⍺ ←→ Optional existing HTML document (WIP -- prob need a full param ns) | ||
⍺←⊢ | ||
⍺←##.Utils.Alpha'' | ||
ns←##.Spec.New'' | ||
ns.description←'vertical box plot' | ||
ns.width←800 | ||
ns.height←400 | ||
m←⍎'mark'ns.⎕NS'' | ||
s←##.Spec.GetSpecNS ns | ||
s.description←'vertical box plot' | ||
s.width←800 | ||
s.height←400 | ||
m←⍎'mark's.⎕NS'' | ||
m.type←'boxplot' | ||
m.extent←'min-max' | ||
ns←ns ##.Spec.PackageArgs↓⍉⍵ | ||
_←ns ##.Spec.PackData ⍵ | ||
_←##.Spec.AddColor ns | ||
ns←ns ##.Spec.InjectData ⍵ | ||
j←##.Spec.ToJson ns | ||
⍺ ##.Html.Render j | ||
⍺.HtmlRendererObj ##.Html.Render ns | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
HeatMap←{ | ||
⍝ ⍵ ←→ APL matrix with headers | ||
⍝ ⍺ ←→ Optional parameter namespace | ||
⍺←##.Utils.Alpha '' | ||
⍺←##.Utils.Alpha'' | ||
ns←##.Spec.New ⍺.SpecOverride | ||
ns.description←'Grid heat map' | ||
ns.width←800 | ||
ns.height←400 | ||
m←⍎'mark'ns.⎕NS'' | ||
m.type←'rect' | ||
_←ns ##.Spec.PackageArgs↓⍉⍵ | ||
_←'z'##.Spec.AddColor ns | ||
a←⍎'config.axis'ns.⎕NS'' | ||
a.grid←'true' | ||
a.tickBand←'extent' | ||
ns←ns ##.Spec.InjectData ⍵ | ||
j←##.Spec.ToJson ns | ||
⍺.HtmlRendererObj ##.Html.Render j | ||
_←ns ##.Spec.PackData ⍵ | ||
_←'z'##.Spec.AddColor ns | ||
⍺.HtmlRendererObj ##.Html.Render ns | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Matrix←{ | ||
⍝ Operator -- all combinations of ⍵ | ||
⍝ Limited to 2D comparisons currently | ||
⍝ AND type of quantitative for now | ||
⍝ ⍺ ←→ Optional ParamNS | ||
⍝ ⍺⍺ ←→ Plot fn | ||
⍝ ⍵ ←→ Data | ||
⍺←##.Utils.Alpha'' | ||
o←⍺.SpecOverride | ||
r←⍎'repeat'o.⎕NS'' | ||
h←,1↑⍵ | ||
r.row←h | ||
r.column←⌽h | ||
s←⍎'spec' o.⎕NS '' | ||
e←⍎'encoding's.⎕NS'' | ||
_←'xy'{ | ||
t←⍎⍺ e.⎕NS'' | ||
t.type←'quantitative' | ||
f←⍎'field't.⎕NS'' | ||
f.repeat←⍵ ⋄ 0 | ||
}¨'column' 'row' | ||
⍺ ⍺⍺ ⍵ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Render←{ | ||
⍝ ⍺ ←→ HR object, creates one if none passed in | ||
⍝ ⍵ ←→ JSON string of the spec | ||
⍝ ⍵ ←→ NS of the entire spec | ||
j←##.Spec.ToJson ⍵ | ||
⍺←NewHtmlRender'' | ||
⍺ InjectJson ⍵ | ||
⍺ InjectJson j | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
GetSpecNS←{ | ||
⍝ VL specs require nesting certain properties under spec sometimes -- but not always. Argh! | ||
9=⍵.⎕NC 'spec':⍵.spec | ||
⍵ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
InitEncoding←{ | ||
⍝ ⍵ ←→ ns | ||
9=⍵.⎕NC 'encoding':⍵ ⍝ For now | ||
e←⍎'encoding'⍵.⎕NS'' | ||
s←⍎'size'e.⎕NS'' | ||
s.value←90 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PackData←{ | ||
⍝ ⍺ ←→ master spec ns | ||
⍝ ⍵ ←→ data | ||
e←⊃9≠⍺.⎕NC'spec.encoding.x' | ||
⍝ ↑Hmm, done for Matrix op, definitly need to discuss cons of this approach: | ||
⍝ e.g.: partial x spec done outside of Mat op? | ||
_←⍺ PackageArgs(⍣e)↓⍉⍵ | ||
_←⍺ InjectData ⍵ | ||
0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters