Skip to content

Instantly share code, notes, and snippets.

@aditeyapandey
Created November 6, 2021 21:18
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/53d5c6da8b1ecaf195ce4a84e0eb7bfd to your computer and use it in GitHub Desktop.
Save aditeyapandey/53d5c6da8b1ecaf195ce4a84e0eb7bfd to your computer and use it in GitHub Desktop.
Prospect Farm 2.3 from Sat Nov 06 2021
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{
"Time": "Week 0",
"1500mg Extra Strength": 29,
"750mg Regular Strength": 27,
"legendTitle": "1500mg Extra Strength"
},
{
"Time": "Week 1",
"1500mg Extra Strength": 23,
"750mg Regular Strength": 21.5,
"legendTitle": "750mg Regular Strength"
},
{
"Time": "Week 2",
"1500mg Extra Strength": 24,
"750mg Regular Strength": 24.5,
"legendTitle": "750mg Regular Strength"
},
{
"Time": "Week 3",
"1500mg Extra Strength": 22,
"750mg Regular Strength": 20,
"legendTitle": "750mg Regular Strength"
},
{
"Time": "Week 4",
"1500mg Extra Strength": 19,
"750mg Regular Strength": 20,
"legendTitle": "750mg Regular Strength"
}
]
},
"title": "<Insert a Title>",
"width": "300",
"layer": [
{
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "Time", "type": "nominal", "axis": {"labelAngle": "0"}},
"y": {
"field": "1500mg Extra Strength",
"type": "quantitative",
"scale": {"domain": [0, 40]},
"title": "Mean of PROMIS Sleep Score"
},
"color": {"value": "#006400"}
}
},
{
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"field": "Time", "type": "nominal"},
"y": {"field": "750mg Regular Strength", "type": "quantitative"},
"color": {"value": "#c71585"}
}
},
{
"mark": {"type": "text"},
"encoding": {
"fill": {
"field": "legendTitle",
"scale": {"range": ["#006400", "#c71585"]},
"legend": {"title": null, "symbolType": "circle"}
}
}
}
],
"config": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment