Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
fadas.dedav4s_sjs1_3.0.9.2.source-code.SimpleRegression.json Maven / Gradle / Ivy
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A basic scatter plot example depicting automobile statistics.",
"padding": 5,
"data": [
{
"name": "source",
"values": [
{"x": 1, "y": 2},
{"x": 3, "y": 4},
{"x": 0.5, "y": 5},
{"x": 3.14159, "y": 1}
]
}
,
{
"name": "trend",
"source": "source",
"transform": [
{
"type": "regression",
"method": "linear",
"order": 1,
"extent": {"signal": "domain('x')"},
"x": "x",
"y": "y",
"as": ["u", "v"]
}
]
}
],
"scales": [
{
"name": "x",
"type": "linear",
"round": true,
"nice": true,
"zero": true,
"domain": {"data": "source", "field": "x"},
"range": "width"
},
{
"name": "y",
"type": "linear",
"round": true,
"nice": true,
"zero": true,
"domain": {"data": "source", "field": "y"},
"range": "height"
}
],
"axes": [
{
"scale": "x",
"grid": true,
"domain": false,
"orient": "bottom",
"tickCount": 5,
"title": "x"
},
{
"scale": "y",
"grid": true,
"domain": false,
"orient": "left",
"titlePadding": 5,
"title": "y"
}
],
"marks": [
{
"name": "marks",
"type": "symbol",
"from": {"data": "source"},
"encode": {
"update": {
"x": {"scale": "x", "field": "x"},
"y": {"scale": "y", "field": "y"},
"size": {"value": 12},
"shape": {"value": "circle"},
"strokeWidth": {"value": 2},
"opacity": {"value": 1},
"stroke": {"value": "black"},
"fill": {"value": "transparent"}
}
}
},
{
"type": "line",
"from": {"data": "trend"},
"encode": {
"enter": {
"x": {"scale": "x", "field": "u"},
"y": {"scale": "y", "field": "v"},
"stroke": {"value": "firebrick"}
}
}
}
],
"signals": [
{
"name": "height",
"init": "isFinite(containerSize()[1]) ? containerSize()[1] : 200",
"on": [
{
"update": "isFinite(containerSize()[1]) ? containerSize()[1] : 200",
"events": "window:resize"
}
]
},
{
"name": "width",
"init": "isFinite(containerSize()[0]) ? containerSize()[0] : 200",
"on": [
{
"update": "isFinite(containerSize()[0]) ? containerSize()[0] : 200",
"events": "window:resize"
}
]
}
],
"autosize": {"type": "fit", "resize": true, "contains": "padding"}
}