# flowrs-viz: where the code and the numbers came from flowrs-viz is Apache-2.0, like the rest of flowRS. It is new code; where it translates an algorithm from a permissively licensed library, the file says so and the licence is in `LICENSES/`. No GPL or AGPL code was read, ported or linked. | flowRS file | Came from | What was taken | Licence | |---|---|---|---| | `src/scale.rs` — `ticks`, `tick_increment`, `tick_step` | d3-array 3 (Mike Bostock) | The tick-step rule (1, 2, 5 × 10^k with the √50, √10, √2 thresholds) and its integer arithmetic | ISC (`LICENSES/d3-array-ISC.txt`) | | `src/scale.rs` — `nice_linear`, `nice_log`, `log_ticks`, band and point scales, `lerp` | d3-scale 4 (Mike Bostock) | `linear.nice`, `log.nice`/`log.ticks` for base 10, the band/point step and offset arithmetic, d3-interpolate's `a(1-t)+bt` | ISC (`LICENSES/d3-scale-ISC.txt`) | | `src/scale.rs` — `precision_fixed`, `tick_label` | d3-format 3 (Mike Bostock) | `precisionFixed` and the `,f` format with a true minus sign, as Vega labels linear axes | ISC (`LICENSES/d3-format-ISC.txt`) | | `src/scale.rs` — `Bins` | vega-statistics `bin` and vega-transforms `Bin` (UW Interactive Data Lab) | The bin-step search (base 10, divide by 5 and 2, `nice`) and the bin assignment with its 1e-14 epsilon | BSD-3-Clause (`LICENSES/Vega-BSD-3-Clause.txt`) | | `src/spec.rs`, `src/compile.rs` | Vega-Lite 6.5.0 (UW Interactive Data Lab) | The grammar's semantics, written from Vega-Lite's documentation and its compiled output: defaults (300 px continuous size, 20 px step, band paddings 0.1/0.05 for bars, 0/0 for rects, 0.25/0.125 for ticks), `zero` and `nice` rules, `bin_maxbins_N_field` naming, binned-bar spacing, zero-offset stacking ordered by the stacking fields descending, the invalid-value filter, and aggregate ops (Vega's incremental mean and deviation) | BSD-3-Clause (`LICENSES/Vega-Lite-BSD-3-Clause.txt`) | | `src/color.rs` | Björn Ottosson's OKLab (public domain / MIT); Machado, Oliveira and Fernandes (2009) CVD matrices (published) | The OKLab matrices; the severity-1.0 simulation matrices; the dataviz method's ΔE = OKLab distance × 100 | — | | `src/colormap.rs` — `validate_categorical` | The dataviz method's `validate_palette.js` (the validator dpb-plot's palette was checked with) | Its five checks and thresholds | — | | `src/lint.rs` | Draco 2 (CMU Data Interaction Group, MIT) | The ideas of its deterministic hard constraints (aggregating a category, bars off zero, log scales over zero, bars with two continuous axes, colour cardinality), written as plain Rust; no ASP code was ported. flowRS's own rules are new | — | | `src/faithful.rs`, `src/corpus.rs`, `src/gpu.rs`, `src/svg.rs`, `src/figure.rs` | New | The faithfulness check's second implementation, the corpus and its expectations, the scene builder, the SVG and PNG writers | — | | `corpus/charts.json` | Written here (`oracle` not involved): neuro and T&M figures over synthetic data | — | Apache-2.0 | | `src/luts.rs` (generated by `oracle/colormaps.py`) | See below | 256 entries per map | per map | ## The colormaps | Maps | Source | Licence | |---|---|---| | viridis, magma, inferno, plasma | BIDS/colormap (Nathaniel J. Smith, Stéfan van der Walt), as shipped in matplotlib 3.11.2 | CC0 1.0 (BIDS/colormap's licence) | | RdBu_r, Reds, Blues | ColorBrewer 2.0 (Cynthia A. Brewer, Mark Harrower, Pennsylvania State University), interpolated to 256 entries by matplotlib 3.11.2 | Apache-2.0 (`LICENSES/ColorBrewer-Apache-2.0.txt`) | | batlow, oslo, lajolla, devon, vik, berlin, broc | cmcrameri 1.10 (Callum Rollo): Fabio Crameri's Scientific colour maps 8.0.1, doi:10.5281/zenodo.1243862 | MIT (`LICENSES/cmcrameri-MIT.txt`) | | fire, kbc, gouldian, coolwarm | colorcet 3.2.1 (HoloViz), after Peter Kovesi's perceptually uniform maps | CC-BY-4.0 (`LICENSES/colorcet-CC-BY-4.0.txt`); `colormap::attributions()` carries the credit wherever they are offered | No rainbow map is offered (`colormap::RAINBOWS` names the ones a spec is refused for). ## Test data | File | Source | Licence | |---|---|---| | `fixtures/data/penguins.json` | vega-datasets 3.2.1 (`data/penguins.json`): Palmer Station Antarctica LTER, Allison Horst's palmerpenguins | CC0 1.0 | | `fixtures/data/anscombe.json` | vega-datasets 3.2.1: F. J. Anscombe (1973), Graphs in Statistical Analysis, The American Statistician 27(1):17-21 | Published data | | `fixtures/specs/bar.vl.json` | Vega-Lite's `examples/specs/bar.vl.json` | BSD-3-Clause | | the other `fixtures/specs/*.vl.json` | Written here; the neuro and T&M ones carry synthetic inline values | Apache-2.0 | | `fixtures/oracle/*.json` | Written by `oracle/vegalite.mjs` from Vega-Lite 6.5.0 and Vega 6.4.0 run on the specs above | — |