Published
Edited
Mar 20, 2018
1 star
Insert cell
Insert cell
healthy = d3.csv("https://raw.githubusercontent.com/Geographie-cites/h24/master/docs/OpinionModel/healthy.csv")
Insert cell
Insert cell
Insert cell
vegalite({
data: {values: healthy,
"transform": [
{"filter": {"field": "datum.evolution$samples > 9" }}]},
repeat: {
row: [ "healthyDietReward","maxProbaToSwitch","inertiaCoefficient","interpersonalInfluence","deltaAverageOpinion","deltaHealth"],
column: ["deltaHealth","deltaAverageOpinion","interpersonalInfluence","inertiaCoefficient","maxProbaToSwitch","healthyDietReward"]
},
spec: {
selection: {
grid: {
type: "interval", "bind": "scales"
}
},
mark: "point",
encoding: {
x: {"field": {"repeat": "column"}, "type": "quantitative"},
y: {"field": {"repeat": "row"}, "type": "quantitative"},
color: {
condition: {"test": "datum.interpersonalInfluence > 0.9 & datum.maxProbaToSwitch < 0.2 & datum.inertiaCoefficient < 0.2 ", "value": "orange"},

value: "black"
}
}
}
})
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more