Skip to content

Instantly share code, notes, and snippets.

@aditeyapandey
Created November 6, 2021 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aditeyapandey/e7bd29f60d534b34dc5c19311539a000 to your computer and use it in GitHub Desktop.
Save aditeyapandey/e7bd29f60d534b34dc5c19311539a000 to your computer and use it in GitHub Desktop.
Prospect Farms Fig 2.2 from Sat Nov 06 2021
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"Time": "Week 0", "Male": 27, "Female": 29},
{"Time": "Week 1", "Male": 21.5, "Female": 23},
{"Time": "Week 2", "Male": 21, "Female": 24},
{"Time": "Week 3", "Male": 20, "Female": 22},
{"Time": "Week 4", "Male": 18, "Female": 20.5}
]
},
"title": "<Insert a Title>",
"width": "300",
"repeat": {"layer": ["Male", "Female"]},
"spec": {
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "Time", "type": "nominal", "axis": {"labelAngle": "0"}},
"y": {
"field": {"repeat": "layer"},
"type": "quantitative",
"title": "Mean of PROMIS Sleep Score",
"scale": {"domain": [0, 40]}
},
"color": {"datum": {"repeat": "layer"}, "type": "nominal"}
}
},
"config": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment