Skip to content

Instantly share code, notes, and snippets.

View declann's full-sized avatar
👋

Declan Naughton declann

👋
View GitHub Profile
@declann
declann / spec.json
Last active December 19, 2021 18:34
indented tree (requires vega-hierarchy patch)
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "An indented tree, depends on this change to vega-hierarchy: https://github.com/declann/vega/commit/a651ff36cd3f0897054aa1b236f82e701db62432",
"width": 200,
"height": 1600,
"padding": 5,
"signals": [
{
"name": "labels", "value": true,
@declann
declann / spec.json
Created December 19, 2021 18:36
another old indented tree (requires vega-hierarchy patch)
{
"$schema": "https://vega.github.io/schema/vega/v4.json",
"width": 300,
"height": 250,
"padding": 5,
"signals": [
{
"name": "labels", "value": true,
@declann
declann / spec.json
Created February 3, 2022 02:04
testtt
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Though Vega-Lite supports only one scale per axes, one can create a parallel coordinate plot by folding variables, using `joinaggregate` to normalize their values and using ticks and rules to manually create axes.",
"data": {
"url": "data/penguins.json"
},
"width": 600,
"height": 300,
"transform": [
{"filter": "datum['Beak Length (mm)']"},
@declann
declann / spec.json
Created February 3, 2022 02:10
Vega-Lite spec from Thu Feb 03 2022
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A simple bar chart with embedded data.",
"data": {
"values": [
{"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
{"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
{"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
]
},
@declann
declann / manualspec.json
Created February 3, 2022 02:16
MANUALLY created gist of spec
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"name": "projection"},
"width": 800,
"transform": [
{
"fold": [
"cases_deaths_link_smoothed",
"cases_smoothed",
"deaths_smoothed"
@declann
declann / spec.json
Created February 3, 2022 02:24
test gist from vega editor
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"name": "projection"},
"width": 800,
"transform": [
{
"fold": [
"cases_deaths_link_smoothed",
"cases_smoothed",
"deaths_smoothed"
@declann
declann / spec.json
Created February 4, 2022 19:31
Vega-Lite spec from Fri Feb 04 2022
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"name": "projection"},
"width": 800,
"transform": [
{
"fold": [
"cases_deaths_link_smoothed",
"cases_smoothed",
"deaths_smoothed"
@declann
declann / spec.json
Created February 4, 2022 19:33
Vega-Lite spec from Fri Feb 04 2022
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"name": "projection"},
"width": 800,
"transform": [
{
"fold": [
"cases_deaths_link_smoothed",
"cases_smoothed",
"deaths_smoothed"
@declann
declann / spec.json
Created February 4, 2022 19:34
teartesa
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"name": "projection"},
"width": 800,
"transform": [
{
"fold": [
"cases_deaths_link_smoothed",
"cases_smoothed",
"deaths_smoothed"

What do I mean by view models?

Preamble: Resolution is a common pain point where it comes to present/visualise model results. We often want to summarise numbers (and drilldown, calculang: show your workings). These patterns are not unique. Therefore we should facilitate these patterns to be applied generally to calculang models, and to empower UI inspection and discovery.

A view model may add summary inputs for formulae (+new formulae) and/or for reporting outputs.

Even where other modelling inputs are locked, these inputs may be free for a dynamic UI to alter, therefore enabling drill-down type patterns.