Last active
July 9, 2024 05:20
-
-
Save billybonks/c37147abe99783f7fc9d0255ea49e217 to your computer and use it in GitHub Desktop.
vega-examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega/v5.json", | |
"description": "A basic bar chart example, with value labels shown upon pointer hover.", | |
"width": 400, | |
"height": 200, | |
"padding": 5, | |
"data": [ | |
{ | |
"name": "table", | |
"values": [ | |
{"category": "A", "amount": 28}, | |
{"category": "B", "amount": 55}, | |
{"category": "C", "amount": 43}, | |
{"category": "D", "amount": 91}, | |
{"category": "E", "amount": 81}, | |
{"category": "F", "amount": 53}, | |
{"category": "G", "amount": 19}, | |
{"category": "H", "amount": 87} | |
], | |
"transform": [{"type": "identifier", "as": "_vgsid_"}] | |
}, | |
{ | |
"name": "hover_store", | |
"transform": [{"type": "collect", "sort": {"field": "_vgsid_"}}] | |
}, | |
], | |
"signals": [ | |
{ | |
"name": "hover_tuple", | |
"on": [ | |
{ | |
"events": [{"source": "scope", "type": "pointerover"}], | |
"update": "{unit: \"layer_0\", _vgsid_: datum[\"_vgsid_\"]}", | |
"force": true | |
}, | |
{"events": [{"source": "view", "type": "pointerout"}], "update": "null"} | |
] | |
}, | |
{ | |
"name": "hover_modify", | |
"on": [ | |
{ | |
"events": {"signal": "hover_tuple"}, | |
"update": "modify(\"hover_store\", hover_tuple, true, hover_tuple)" | |
} | |
] | |
} | |
], | |
"scales": [ | |
{ | |
"name": "xscale", | |
"type": "band", | |
"domain": {"data": "table", "field": "category"}, | |
"range": "width", | |
"padding": 0.05, | |
"round": true | |
}, | |
{ | |
"name": "yscale", | |
"domain": {"data": "table", "field": "amount"}, | |
"nice": true, | |
"range": "height" | |
} | |
], | |
"axes": [ | |
{ "orient": "bottom", "scale": "xscale" }, | |
{ "orient": "left", "scale": "yscale" } | |
], | |
"marks": [ | |
{ | |
"type": "rect", | |
"from": {"data":"table"}, | |
"encode": { | |
"enter": { | |
"x": {"scale": "xscale", "field": "category"}, | |
"width": {"scale": "xscale", "band": 1}, | |
"y": {"scale": "yscale", "field": "amount"}, | |
"y2": {"scale": "yscale", "value": 0} | |
}, | |
"update": { | |
"fill": {"value": "steelblue"} | |
} | |
} | |
}, | |
{ | |
"type": "rect", | |
"style": ["bar"], | |
"from": {"data":"table"}, | |
"encode": { | |
"update": { | |
"tooltip": { | |
"signal": "{\"Category\": datum[\"category\"], \"Count of Records\": format(datum[\"amount\"], \"\")}" | |
}, | |
"fill": {"value": "#eee"}, | |
"opacity": [ | |
{ | |
"test": "length(data(\"hover_store\")) && vlSelectionIdTest(\"hover_store\", datum)", | |
"value": 0.5 | |
}, | |
{"value": 0} | |
], | |
"x": {"scale": "xscale", "field": "category"}, | |
"width": {"scale": "xscale", "band": 1}, | |
"y": {"value": 0}, | |
"y2": {"field": {"group": "height"}} | |
} | |
} | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega/v5.json", | |
"data": [ | |
{ | |
"name": "source", | |
"values": [ | |
{ | |
"id": 1684, | |
"pull_request_id": 6, | |
"name": "draft", | |
"started_at": "2024-07-05T05:31:57.000Z", | |
"ended_at": "2024-07-05T05:33:05.000Z", | |
"created_at": "2024-07-07T03:25:40.263Z", | |
"updated_at": "2024-07-07T03:25:40.263Z", | |
"hours": "0.01888888888888888889", | |
"opened_at": "2024-07-05T05:33:00.000Z" | |
}, | |
{ | |
"id": 1681, | |
"pull_request_id": 4, | |
"name": "draft", | |
"started_at": "2024-07-06T06:10:31.000Z", | |
"ended_at": "2024-07-06T06:10:31.000Z", | |
"created_at": "2024-07-07T03:25:40.207Z", | |
"updated_at": "2024-07-07T03:25:40.207Z", | |
"hours": "0.0", | |
"opened_at": "2024-07-06T06:10:31.000Z" | |
}, | |
{ | |
"id": 1690, | |
"pull_request_id": 9, | |
"name": "draft", | |
"started_at": "2024-07-03T17:20:46.000Z", | |
"ended_at": "2024-07-03T17:20:47.000Z", | |
"created_at": "2024-07-07T03:25:41.010Z", | |
"updated_at": "2024-07-07T03:25:41.010Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T17:20:47.000Z" | |
}, | |
{ | |
"id": 1711, | |
"pull_request_id": 14, | |
"name": "draft", | |
"started_at": "2024-07-03T10:48:31.000Z", | |
"ended_at": "2024-07-03T10:48:32.000Z", | |
"created_at": "2024-07-07T03:25:41.680Z", | |
"updated_at": "2024-07-07T03:25:41.680Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T10:48:32.000Z" | |
}, | |
{ | |
"id": 1692, | |
"pull_request_id": 11, | |
"name": "draft", | |
"started_at": "2024-07-03T11:01:49.000Z", | |
"ended_at": "2024-07-03T11:02:37.000Z", | |
"created_at": "2024-07-07T03:25:41.043Z", | |
"updated_at": "2024-07-07T03:25:41.043Z", | |
"hours": "0.01333333333333333333", | |
"opened_at": "2024-07-03T11:02:32.000Z" | |
}, | |
{ | |
"id": 1695, | |
"pull_request_id": 10, | |
"name": "draft", | |
"started_at": "2024-07-03T12:13:11.000Z", | |
"ended_at": "2024-07-03T12:16:18.000Z", | |
"created_at": "2024-07-07T03:25:41.142Z", | |
"updated_at": "2024-07-07T03:25:41.142Z", | |
"hours": "0.05194444444444444444", | |
"opened_at": "2024-07-03T12:16:14.000Z" | |
}, | |
{ | |
"id": 1679, | |
"pull_request_id": 15, | |
"name": "draft", | |
"started_at": "2024-07-03T10:48:18.000Z", | |
"ended_at": null, | |
"created_at": "2024-07-07T03:25:40.109Z", | |
"updated_at": "2024-07-07T03:25:40.109Z", | |
"hours": null, | |
"opened_at": "2024-07-03T10:48:18.000Z" | |
}, | |
{ | |
"id": 1710, | |
"pull_request_id": 12, | |
"name": "draft", | |
"started_at": "2024-07-03T10:48:55.000Z", | |
"ended_at": "2024-07-03T10:48:56.000Z", | |
"created_at": "2024-07-07T03:25:41.662Z", | |
"updated_at": "2024-07-07T03:25:41.662Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T10:48:56.000Z" | |
}, | |
{ | |
"id": 1706, | |
"pull_request_id": 17, | |
"name": "draft", | |
"started_at": "2024-07-03T10:48:05.000Z", | |
"ended_at": "2024-07-03T10:48:06.000Z", | |
"created_at": "2024-07-07T03:25:41.539Z", | |
"updated_at": "2024-07-07T03:25:41.539Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T10:48:06.000Z" | |
}, | |
{ | |
"id": 1704, | |
"pull_request_id": 22, | |
"name": "draft", | |
"started_at": "2024-07-03T10:39:30.000Z", | |
"ended_at": "2024-07-03T10:40:11.000Z", | |
"created_at": "2024-07-07T03:25:41.440Z", | |
"updated_at": "2024-07-07T03:25:41.440Z", | |
"hours": "0.01138888888888888889", | |
"opened_at": "2024-07-03T10:40:11.000Z" | |
}, | |
{ | |
"id": 1714, | |
"pull_request_id": 19, | |
"name": "draft", | |
"started_at": "2024-07-03T10:47:37.000Z", | |
"ended_at": "2024-07-03T10:47:38.000Z", | |
"created_at": "2024-07-07T03:25:41.782Z", | |
"updated_at": "2024-07-07T03:25:41.782Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T10:47:38.000Z" | |
}, | |
{ | |
"id": 1719, | |
"pull_request_id": 16, | |
"name": "draft", | |
"started_at": "2024-07-03T10:48:13.000Z", | |
"ended_at": "2024-07-03T10:48:14.000Z", | |
"created_at": "2024-07-07T03:25:41.915Z", | |
"updated_at": "2024-07-07T03:25:41.915Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T10:48:14.000Z" | |
}, | |
{ | |
"id": 1716, | |
"pull_request_id": 18, | |
"name": "draft", | |
"started_at": "2024-07-03T10:47:53.000Z", | |
"ended_at": "2024-07-03T11:07:06.000Z", | |
"created_at": "2024-07-07T03:25:41.859Z", | |
"updated_at": "2024-07-07T03:25:41.859Z", | |
"hours": "0.32027777777777777778", | |
"opened_at": "2024-07-03T10:47:53.000Z" | |
}, | |
{ | |
"id": 1717, | |
"pull_request_id": 26, | |
"name": "draft", | |
"started_at": "2024-07-03T05:45:50.000Z", | |
"ended_at": "2024-07-03T05:45:51.000Z", | |
"created_at": "2024-07-07T03:25:41.878Z", | |
"updated_at": "2024-07-07T03:25:41.878Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T05:45:51.000Z" | |
}, | |
{ | |
"id": 1722, | |
"pull_request_id": 23, | |
"name": "draft", | |
"started_at": "2024-07-03T08:11:25.000Z", | |
"ended_at": "2024-07-03T08:19:02.000Z", | |
"created_at": "2024-07-07T03:25:42.071Z", | |
"updated_at": "2024-07-07T03:25:42.071Z", | |
"hours": "0.12694444444444444444", | |
"opened_at": "2024-07-03T08:19:01.000Z" | |
}, | |
{ | |
"id": 1727, | |
"pull_request_id": 21, | |
"name": "draft", | |
"started_at": "2024-07-03T10:47:21.000Z", | |
"ended_at": "2024-07-03T10:47:22.000Z", | |
"created_at": "2024-07-07T03:25:42.182Z", | |
"updated_at": "2024-07-07T03:25:42.182Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T10:47:22.000Z" | |
}, | |
{ | |
"id": 1723, | |
"pull_request_id": 20, | |
"name": "draft", | |
"started_at": "2024-07-03T10:47:24.000Z", | |
"ended_at": "2024-07-03T11:05:05.000Z", | |
"created_at": "2024-07-07T03:25:42.103Z", | |
"updated_at": "2024-07-07T03:25:42.103Z", | |
"hours": "0.29472222222222222222", | |
"opened_at": "2024-07-03T10:47:24.000Z" | |
}, | |
{ | |
"id": 1725, | |
"pull_request_id": 28, | |
"name": "draft", | |
"started_at": "2024-07-03T05:45:13.000Z", | |
"ended_at": "2024-07-03T05:45:14.000Z", | |
"created_at": "2024-07-07T03:25:42.143Z", | |
"updated_at": "2024-07-07T03:25:42.143Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T05:45:14.000Z" | |
}, | |
{ | |
"id": 1732, | |
"pull_request_id": 24, | |
"name": "draft", | |
"started_at": "2024-07-03T07:50:32.000Z", | |
"ended_at": "2024-07-03T08:18:44.000Z", | |
"created_at": "2024-07-07T03:25:42.293Z", | |
"updated_at": "2024-07-07T03:25:42.293Z", | |
"hours": "0.47", | |
"opened_at": "2024-07-03T08:18:44.000Z" | |
}, | |
{ | |
"id": 1737, | |
"pull_request_id": 25, | |
"name": "draft", | |
"started_at": "2024-07-03T06:01:06.000Z", | |
"ended_at": "2024-07-03T06:02:41.000Z", | |
"created_at": "2024-07-07T03:25:42.497Z", | |
"updated_at": "2024-07-07T03:25:42.497Z", | |
"hours": "0.02638888888888888889", | |
"opened_at": "2024-07-03T06:02:41.000Z" | |
}, | |
{ | |
"id": 1738, | |
"pull_request_id": 29, | |
"name": "draft", | |
"started_at": "2024-07-03T05:44:54.000Z", | |
"ended_at": "2024-07-03T05:46:39.000Z", | |
"created_at": "2024-07-07T03:25:42.516Z", | |
"updated_at": "2024-07-07T03:25:42.516Z", | |
"hours": "0.02916666666666666667", | |
"opened_at": "2024-07-03T05:44:55.000Z" | |
}, | |
{ | |
"id": 1742, | |
"pull_request_id": 36, | |
"name": "draft", | |
"started_at": "2024-06-30T08:45:25.000Z", | |
"ended_at": "2024-07-03T10:22:24.000Z", | |
"created_at": "2024-07-07T03:25:42.590Z", | |
"updated_at": "2024-07-07T03:25:42.590Z", | |
"hours": "73.6163888888888889", | |
"opened_at": "2024-06-30T08:45:25.000Z" | |
}, | |
{ | |
"id": 1736, | |
"pull_request_id": 27, | |
"name": "draft", | |
"started_at": "2024-07-03T05:45:32.000Z", | |
"ended_at": "2024-07-03T05:52:10.000Z", | |
"created_at": "2024-07-07T03:25:42.476Z", | |
"updated_at": "2024-07-07T03:25:42.476Z", | |
"hours": "0.11055555555555555556", | |
"opened_at": "2024-07-03T05:45:32.000Z" | |
}, | |
{ | |
"id": 1746, | |
"pull_request_id": 32, | |
"name": "draft", | |
"started_at": "2024-07-03T05:44:30.000Z", | |
"ended_at": null, | |
"created_at": "2024-07-07T03:25:42.756Z", | |
"updated_at": "2024-07-07T03:25:42.756Z", | |
"hours": null, | |
"opened_at": "2024-07-03T05:44:30.000Z" | |
}, | |
{ | |
"id": 1747, | |
"pull_request_id": 30, | |
"name": "draft", | |
"started_at": "2024-07-03T05:44:44.000Z", | |
"ended_at": "2024-07-03T06:11:23.000Z", | |
"created_at": "2024-07-07T03:25:42.772Z", | |
"updated_at": "2024-07-07T03:25:42.772Z", | |
"hours": "0.44416666666666666667", | |
"opened_at": "2024-07-03T05:44:44.000Z" | |
}, | |
{ | |
"id": 1749, | |
"pull_request_id": 31, | |
"name": "draft", | |
"started_at": "2024-07-03T05:44:34.000Z", | |
"ended_at": "2024-07-03T05:44:35.000Z", | |
"created_at": "2024-07-07T03:25:42.862Z", | |
"updated_at": "2024-07-07T03:25:42.862Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-03T05:44:35.000Z" | |
}, | |
{ | |
"id": 1751, | |
"pull_request_id": 33, | |
"name": "draft", | |
"started_at": "2024-07-03T05:38:39.000Z", | |
"ended_at": "2024-07-03T05:39:03.000Z", | |
"created_at": "2024-07-07T03:25:42.921Z", | |
"updated_at": "2024-07-07T03:25:42.921Z", | |
"hours": "0.00666666666666666667", | |
"opened_at": "2024-07-03T05:39:03.000Z" | |
}, | |
{ | |
"id": 1753, | |
"pull_request_id": 34, | |
"name": "draft", | |
"started_at": "2024-07-02T06:37:02.000Z", | |
"ended_at": "2024-07-02T10:00:02.000Z", | |
"created_at": "2024-07-07T03:25:43.002Z", | |
"updated_at": "2024-07-07T03:25:43.002Z", | |
"hours": "3.3833333333333333", | |
"opened_at": "2024-07-02T09:59:54.000Z" | |
}, | |
{ | |
"id": 1754, | |
"pull_request_id": 35, | |
"name": "draft", | |
"started_at": "2024-07-01T08:11:21.000Z", | |
"ended_at": "2024-07-01T08:20:32.000Z", | |
"created_at": "2024-07-07T03:25:43.027Z", | |
"updated_at": "2024-07-07T03:25:43.027Z", | |
"hours": "0.15305555555555555556", | |
"opened_at": "2024-07-01T08:20:32.000Z" | |
}, | |
{ | |
"id": 1758, | |
"pull_request_id": 39, | |
"name": "draft", | |
"started_at": "2024-06-28T06:31:40.000Z", | |
"ended_at": "2024-06-28T06:32:19.000Z", | |
"created_at": "2024-07-07T03:25:43.123Z", | |
"updated_at": "2024-07-07T03:25:43.123Z", | |
"hours": "0.01083333333333333333", | |
"opened_at": "2024-06-28T06:32:13.000Z" | |
}, | |
{ | |
"id": 1760, | |
"pull_request_id": 38, | |
"name": "draft", | |
"started_at": "2024-06-28T08:37:40.000Z", | |
"ended_at": "2024-06-28T08:39:53.000Z", | |
"created_at": "2024-07-07T03:25:43.162Z", | |
"updated_at": "2024-07-07T03:25:43.162Z", | |
"hours": "0.03694444444444444444", | |
"opened_at": "2024-06-28T08:39:53.000Z" | |
}, | |
{ | |
"id": 1768, | |
"pull_request_id": 37, | |
"name": "draft", | |
"started_at": "2024-06-30T06:46:07.000Z", | |
"ended_at": "2024-06-30T07:18:10.000Z", | |
"created_at": "2024-07-07T03:25:43.382Z", | |
"updated_at": "2024-07-07T03:25:43.382Z", | |
"hours": "0.53416666666666666667", | |
"opened_at": "2024-06-30T07:18:00.000Z" | |
}, | |
{ | |
"id": 1777, | |
"pull_request_id": 40, | |
"name": "draft", | |
"started_at": "2024-06-28T06:25:38.000Z", | |
"ended_at": "2024-06-28T06:26:01.000Z", | |
"created_at": "2024-07-07T03:25:43.613Z", | |
"updated_at": "2024-07-07T03:25:43.613Z", | |
"hours": "0.00638888888888888889", | |
"opened_at": "2024-06-28T06:25:57.000Z" | |
}, | |
{ | |
"id": 1691, | |
"pull_request_id": 13, | |
"name": "draft", | |
"started_at": "2024-07-03T10:48:45.000Z", | |
"ended_at": null, | |
"created_at": "2024-07-07T03:25:41.029Z", | |
"updated_at": "2024-07-07T03:25:41.029Z", | |
"hours": null, | |
"opened_at": "2024-07-03T10:48:45.000Z" | |
}, | |
{ | |
"id": 1770, | |
"pull_request_id": 5, | |
"name": "draft", | |
"started_at": "2024-07-05T11:04:27.000Z", | |
"ended_at": "2024-07-05T11:04:27.000Z", | |
"created_at": "2024-07-07T03:25:43.452Z", | |
"updated_at": "2024-07-07T03:25:43.452Z", | |
"hours": "0.0", | |
"opened_at": "2024-07-05T11:04:27.000Z" | |
}, | |
{ | |
"id": 1779, | |
"pull_request_id": 7, | |
"name": "draft", | |
"started_at": "2024-07-05T04:40:00.000Z", | |
"ended_at": "2024-07-05T04:46:30.000Z", | |
"created_at": "2024-07-07T03:25:43.674Z", | |
"updated_at": "2024-07-07T03:25:43.674Z", | |
"hours": "0.10833333333333333333", | |
"opened_at": "2024-07-05T04:46:27.000Z" | |
}, | |
{ | |
"id": 1774, | |
"pull_request_id": 67, | |
"name": "draft", | |
"started_at": "2024-06-15T08:19:51.000Z", | |
"ended_at": "2024-06-16T03:21:27.000Z", | |
"created_at": "2024-07-07T03:25:43.539Z", | |
"updated_at": "2024-07-07T03:25:43.539Z", | |
"hours": "19.0266666666666667", | |
"opened_at": "2024-06-16T03:20:53.000Z" | |
}, | |
{ | |
"id": 1784, | |
"pull_request_id": 8, | |
"name": "draft", | |
"started_at": "2024-07-04T17:49:17.000Z", | |
"ended_at": "2024-07-04T17:49:18.000Z", | |
"created_at": "2024-07-07T03:25:43.773Z", | |
"updated_at": "2024-07-07T03:25:43.773Z", | |
"hours": "0.00027777777777777778", | |
"opened_at": "2024-07-04T17:49:18.000Z" | |
}, | |
{ | |
"id": 1786, | |
"pull_request_id": 45, | |
"name": "draft", | |
"started_at": "2024-06-25T14:46:18.000Z", | |
"ended_at": "2024-06-25T14:46:55.000Z", | |
"created_at": "2024-07-07T03:25:43.845Z", | |
"updated_at": "2024-07-07T03:25:43.845Z", | |
"hours": "0.01027777777777777778", | |
"opened_at": "2024-06-25T14:46:55.000Z" | |
}, | |
{ | |
"id": 1789, | |
"pull_request_id": 53, | |
"name": "draft", | |
"started_at": "2024-06-24T08:23:14.000Z", | |
"ended_at": "2024-06-24T08:25:01.000Z", | |
"created_at": "2024-07-07T03:25:43.914Z", | |
"updated_at": "2024-07-07T03:25:43.914Z", | |
"hours": "0.02972222222222222222", | |
"opened_at": "2024-06-24T08:25:01.000Z" | |
}, | |
{ | |
"id": 1792, | |
"pull_request_id": 41, | |
"name": "draft", | |
"started_at": "2024-06-27T13:16:03.000Z", | |
"ended_at": "2024-06-27T13:16:03.000Z", | |
"created_at": "2024-07-07T03:25:43.975Z", | |
"updated_at": "2024-07-07T03:25:43.975Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-27T13:16:03.000Z" | |
}, | |
{ | |
"id": 1795, | |
"pull_request_id": 43, | |
"name": "draft", | |
"started_at": "2024-06-26T07:16:26.000Z", | |
"ended_at": "2024-06-26T07:17:30.000Z", | |
"created_at": "2024-07-07T03:25:44.050Z", | |
"updated_at": "2024-07-07T03:25:44.050Z", | |
"hours": "0.01777777777777777778", | |
"opened_at": "2024-06-26T07:17:25.000Z" | |
}, | |
{ | |
"id": 1799, | |
"pull_request_id": 44, | |
"name": "draft", | |
"started_at": "2024-06-26T05:34:01.000Z", | |
"ended_at": "2024-06-26T05:34:01.000Z", | |
"created_at": "2024-07-07T03:25:44.134Z", | |
"updated_at": "2024-07-07T03:25:44.134Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-26T05:34:01.000Z" | |
}, | |
{ | |
"id": 1806, | |
"pull_request_id": 46, | |
"name": "draft", | |
"started_at": "2024-06-25T11:49:26.000Z", | |
"ended_at": "2024-06-25T11:52:17.000Z", | |
"created_at": "2024-07-07T03:25:44.298Z", | |
"updated_at": "2024-07-07T03:25:44.298Z", | |
"hours": "0.0475", | |
"opened_at": "2024-06-25T11:52:17.000Z" | |
}, | |
{ | |
"id": 1802, | |
"pull_request_id": 51, | |
"name": "draft", | |
"started_at": "2024-06-24T10:25:41.000Z", | |
"ended_at": "2024-06-24T10:25:41.000Z", | |
"created_at": "2024-07-07T03:25:44.211Z", | |
"updated_at": "2024-07-07T03:25:44.211Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-24T10:25:41.000Z" | |
}, | |
{ | |
"id": 1810, | |
"pull_request_id": 47, | |
"name": "draft", | |
"started_at": "2024-06-25T11:24:08.000Z", | |
"ended_at": "2024-06-25T11:35:05.000Z", | |
"created_at": "2024-07-07T03:25:44.386Z", | |
"updated_at": "2024-07-07T03:25:44.386Z", | |
"hours": "0.1825", | |
"opened_at": "2024-06-25T11:35:05.000Z" | |
}, | |
{ | |
"id": 1811, | |
"pull_request_id": 48, | |
"name": "draft", | |
"started_at": "2024-06-25T10:02:44.000Z", | |
"ended_at": "2024-06-25T11:25:28.000Z", | |
"created_at": "2024-07-07T03:25:44.430Z", | |
"updated_at": "2024-07-07T03:25:44.430Z", | |
"hours": "1.3788888888888889", | |
"opened_at": "2024-06-25T11:21:03.000Z" | |
}, | |
{ | |
"id": 1818, | |
"pull_request_id": 49, | |
"name": "draft", | |
"started_at": "2024-06-25T09:51:13.000Z", | |
"ended_at": "2024-06-25T09:52:23.000Z", | |
"created_at": "2024-07-07T03:25:44.572Z", | |
"updated_at": "2024-07-07T03:25:44.572Z", | |
"hours": "0.01944444444444444444", | |
"opened_at": "2024-06-25T09:52:23.000Z" | |
}, | |
{ | |
"id": 1824, | |
"pull_request_id": 52, | |
"name": "draft", | |
"started_at": "2024-06-24T08:25:24.000Z", | |
"ended_at": "2024-06-24T09:42:41.000Z", | |
"created_at": "2024-07-07T03:25:44.723Z", | |
"updated_at": "2024-07-07T03:25:44.723Z", | |
"hours": "1.2880555555555556", | |
"opened_at": "2024-06-24T09:42:41.000Z" | |
}, | |
{ | |
"id": 1820, | |
"pull_request_id": 54, | |
"name": "draft", | |
"started_at": "2024-06-24T04:03:10.000Z", | |
"ended_at": "2024-06-24T04:03:10.000Z", | |
"created_at": "2024-07-07T03:25:44.646Z", | |
"updated_at": "2024-07-07T03:25:44.646Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-24T04:03:10.000Z" | |
}, | |
{ | |
"id": 2647, | |
"pull_request_id": 50, | |
"name": "draft", | |
"started_at": "2024-06-25T09:29:14.000Z", | |
"ended_at": "2024-06-25T09:29:14.000Z", | |
"created_at": "2024-07-07T03:31:16.002Z", | |
"updated_at": "2024-07-07T03:31:16.002Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-25T09:29:14.000Z" | |
}, | |
{ | |
"id": 1830, | |
"pull_request_id": 62, | |
"name": "draft", | |
"started_at": "2024-06-16T13:26:49.000Z", | |
"ended_at": "2024-06-16T13:29:10.000Z", | |
"created_at": "2024-07-07T03:25:44.913Z", | |
"updated_at": "2024-07-07T03:25:44.913Z", | |
"hours": "0.03916666666666666667", | |
"opened_at": "2024-06-16T13:29:04.000Z" | |
}, | |
{ | |
"id": 1833, | |
"pull_request_id": 58, | |
"name": "draft", | |
"started_at": "2024-06-17T11:22:45.000Z", | |
"ended_at": "2024-06-17T11:22:45.000Z", | |
"created_at": "2024-07-07T03:25:45.008Z", | |
"updated_at": "2024-07-07T03:25:45.008Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-17T11:22:45.000Z" | |
}, | |
{ | |
"id": 1834, | |
"pull_request_id": 59, | |
"name": "draft", | |
"started_at": "2024-06-17T09:04:02.000Z", | |
"ended_at": "2024-06-17T09:04:06.000Z", | |
"created_at": "2024-07-07T03:25:45.024Z", | |
"updated_at": "2024-07-07T03:25:45.024Z", | |
"hours": "0.00111111111111111111", | |
"opened_at": "2024-06-17T09:04:02.000Z" | |
}, | |
{ | |
"id": 1840, | |
"pull_request_id": 57, | |
"name": "draft", | |
"started_at": "2024-06-18T03:22:07.000Z", | |
"ended_at": "2024-06-18T09:04:11.000Z", | |
"created_at": "2024-07-07T03:25:45.129Z", | |
"updated_at": "2024-07-07T03:25:45.129Z", | |
"hours": "5.7011111111111111", | |
"opened_at": "2024-06-18T09:04:04.000Z" | |
}, | |
{ | |
"id": 1853, | |
"pull_request_id": 55, | |
"name": "draft", | |
"started_at": "2024-06-19T12:54:23.000Z", | |
"ended_at": "2024-06-19T12:54:23.000Z", | |
"created_at": "2024-07-07T03:25:45.455Z", | |
"updated_at": "2024-07-07T03:25:45.455Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-19T12:54:23.000Z" | |
}, | |
{ | |
"id": 1842, | |
"pull_request_id": 63, | |
"name": "draft", | |
"started_at": "2024-06-16T12:09:22.000Z", | |
"ended_at": "2024-06-16T12:21:35.000Z", | |
"created_at": "2024-07-07T03:25:45.161Z", | |
"updated_at": "2024-07-07T03:25:45.161Z", | |
"hours": "0.20361111111111111111", | |
"opened_at": "2024-06-16T12:21:35.000Z" | |
}, | |
{ | |
"id": 1850, | |
"pull_request_id": 66, | |
"name": "draft", | |
"started_at": "2024-06-16T05:29:50.000Z", | |
"ended_at": "2024-06-16T05:30:59.000Z", | |
"created_at": "2024-07-07T03:25:45.395Z", | |
"updated_at": "2024-07-07T03:25:45.395Z", | |
"hours": "0.01916666666666666667", | |
"opened_at": "2024-06-16T05:30:58.000Z" | |
}, | |
{ | |
"id": 1858, | |
"pull_request_id": 60, | |
"name": "draft", | |
"started_at": "2024-06-17T08:34:02.000Z", | |
"ended_at": "2024-06-17T08:53:47.000Z", | |
"created_at": "2024-07-07T03:25:45.559Z", | |
"updated_at": "2024-07-07T03:25:45.559Z", | |
"hours": "0.32916666666666666667", | |
"opened_at": "2024-06-17T08:53:47.000Z" | |
}, | |
{ | |
"id": 1856, | |
"pull_request_id": 70, | |
"name": "draft", | |
"started_at": "2024-06-14T14:28:57.000Z", | |
"ended_at": "2024-06-14T14:28:57.000Z", | |
"created_at": "2024-07-07T03:25:45.507Z", | |
"updated_at": "2024-07-07T03:25:45.507Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-14T14:28:57.000Z" | |
}, | |
{ | |
"id": 1862, | |
"pull_request_id": 61, | |
"name": "draft", | |
"started_at": "2024-06-16T14:46:12.000Z", | |
"ended_at": "2024-06-16T15:23:22.000Z", | |
"created_at": "2024-07-07T03:25:45.639Z", | |
"updated_at": "2024-07-07T03:25:45.639Z", | |
"hours": "0.61944444444444444444", | |
"opened_at": "2024-06-16T14:51:07.000Z" | |
}, | |
{ | |
"id": 1868, | |
"pull_request_id": 65, | |
"name": "draft", | |
"started_at": "2024-06-16T04:28:35.000Z", | |
"ended_at": "2024-06-16T06:46:36.000Z", | |
"created_at": "2024-07-07T03:25:45.778Z", | |
"updated_at": "2024-07-07T03:25:45.778Z", | |
"hours": "2.3002777777777778", | |
"opened_at": "2024-06-16T06:46:36.000Z" | |
}, | |
{ | |
"id": 1873, | |
"pull_request_id": 64, | |
"name": "draft", | |
"started_at": "2024-06-16T11:20:28.000Z", | |
"ended_at": "2024-06-16T11:21:34.000Z", | |
"created_at": "2024-07-07T03:25:45.915Z", | |
"updated_at": "2024-07-07T03:25:45.915Z", | |
"hours": "0.01833333333333333333", | |
"opened_at": "2024-06-16T11:21:28.000Z" | |
}, | |
{ | |
"id": 1875, | |
"pull_request_id": 73, | |
"name": "draft", | |
"started_at": "2024-06-13T09:32:04.000Z", | |
"ended_at": "2024-06-13T09:33:41.000Z", | |
"created_at": "2024-07-07T03:25:45.950Z", | |
"updated_at": "2024-07-07T03:25:45.950Z", | |
"hours": "0.02694444444444444444", | |
"opened_at": "2024-06-13T09:33:17.000Z" | |
}, | |
{ | |
"id": 1882, | |
"pull_request_id": 68, | |
"name": "draft", | |
"started_at": "2024-06-15T07:06:41.000Z", | |
"ended_at": "2024-06-15T07:11:46.000Z", | |
"created_at": "2024-07-07T03:25:46.118Z", | |
"updated_at": "2024-07-07T03:25:46.118Z", | |
"hours": "0.08472222222222222222", | |
"opened_at": "2024-06-15T07:11:40.000Z" | |
}, | |
{ | |
"id": 1885, | |
"pull_request_id": 78, | |
"name": "draft", | |
"started_at": "2024-06-11T07:12:31.000Z", | |
"ended_at": "2024-06-11T07:13:26.000Z", | |
"created_at": "2024-07-07T03:25:46.224Z", | |
"updated_at": "2024-07-07T03:25:46.224Z", | |
"hours": "0.01527777777777777778", | |
"opened_at": "2024-06-11T07:13:26.000Z" | |
}, | |
{ | |
"id": 1891, | |
"pull_request_id": 71, | |
"name": "draft", | |
"started_at": "2024-06-14T10:11:38.000Z", | |
"ended_at": "2024-06-14T10:13:40.000Z", | |
"created_at": "2024-07-07T03:25:46.379Z", | |
"updated_at": "2024-07-07T03:25:46.379Z", | |
"hours": "0.03388888888888888889", | |
"opened_at": "2024-06-14T10:13:26.000Z" | |
}, | |
{ | |
"id": 1895, | |
"pull_request_id": 72, | |
"name": "draft", | |
"started_at": "2024-06-14T04:12:40.000Z", | |
"ended_at": "2024-06-14T04:38:12.000Z", | |
"created_at": "2024-07-07T03:25:46.489Z", | |
"updated_at": "2024-07-07T03:25:46.489Z", | |
"hours": "0.42555555555555555556", | |
"opened_at": "2024-06-14T04:35:56.000Z" | |
}, | |
{ | |
"id": 1890, | |
"pull_request_id": 74, | |
"name": "draft", | |
"started_at": "2024-06-13T06:50:38.000Z", | |
"ended_at": "2024-06-13T06:53:36.000Z", | |
"created_at": "2024-07-07T03:25:46.343Z", | |
"updated_at": "2024-07-07T03:25:46.343Z", | |
"hours": "0.04944444444444444444", | |
"opened_at": "2024-06-13T06:53:31.000Z" | |
}, | |
{ | |
"id": 1904, | |
"pull_request_id": 76, | |
"name": "draft", | |
"started_at": "2024-06-11T07:18:31.000Z", | |
"ended_at": "2024-06-11T07:19:17.000Z", | |
"created_at": "2024-07-07T03:25:46.760Z", | |
"updated_at": "2024-07-07T03:25:46.760Z", | |
"hours": "0.01277777777777777778", | |
"opened_at": "2024-06-11T07:19:17.000Z" | |
}, | |
{ | |
"id": 1901, | |
"pull_request_id": 75, | |
"name": "draft", | |
"started_at": "2024-06-13T05:24:17.000Z", | |
"ended_at": "2024-06-13T05:24:50.000Z", | |
"created_at": "2024-07-07T03:25:46.679Z", | |
"updated_at": "2024-07-07T03:25:46.679Z", | |
"hours": "0.00916666666666666667", | |
"opened_at": "2024-06-13T05:24:17.000Z" | |
}, | |
{ | |
"id": 1909, | |
"pull_request_id": 77, | |
"name": "draft", | |
"started_at": "2024-06-11T07:15:59.000Z", | |
"ended_at": "2024-06-11T07:16:06.000Z", | |
"created_at": "2024-07-07T03:25:46.888Z", | |
"updated_at": "2024-07-07T03:25:46.888Z", | |
"hours": "0.00194444444444444444", | |
"opened_at": "2024-06-11T07:15:59.000Z" | |
}, | |
{ | |
"id": 2531, | |
"pull_request_id": 56, | |
"name": "draft", | |
"started_at": "2024-06-18T10:01:31.000Z", | |
"ended_at": "2024-06-18T10:01:31.000Z", | |
"created_at": "2024-07-07T03:26:04.361Z", | |
"updated_at": "2024-07-07T03:26:04.361Z", | |
"hours": "0.0", | |
"opened_at": "2024-06-18T10:01:31.000Z" | |
}, | |
{ | |
"id": 2577, | |
"pull_request_id": 42, | |
"name": "draft", | |
"started_at": "2024-06-26T06:40:47.000Z", | |
"ended_at": "2024-06-26T07:19:12.000Z", | |
"created_at": "2024-07-07T03:26:05.562Z", | |
"updated_at": "2024-07-07T03:26:05.562Z", | |
"hours": "0.64027777777777777778", | |
"opened_at": "2024-06-26T07:19:12.000Z" | |
}, | |
{ | |
"id": 2584, | |
"pull_request_id": 69, | |
"name": "draft", | |
"started_at": "2024-06-15T06:22:18.000Z", | |
"ended_at": "2024-06-15T06:26:37.000Z", | |
"created_at": "2024-07-07T03:26:05.821Z", | |
"updated_at": "2024-07-07T03:26:05.821Z", | |
"hours": "0.07194444444444444444", | |
"opened_at": "2024-06-15T06:26:34.000Z" | |
}, | |
{ | |
"id": 2675, | |
"pull_request_id": 322, | |
"name": "draft", | |
"started_at": "2024-07-07T07:20:27.000Z", | |
"ended_at": "2024-07-07T07:20:35.000Z", | |
"created_at": "2024-07-07T08:32:42.643Z", | |
"updated_at": "2024-07-07T08:32:42.643Z", | |
"hours": "0.00222222222222222222", | |
"opened_at": "2024-07-07T07:20:27.000Z" | |
} | |
], | |
"transform": [ | |
{ | |
"type": "formula", | |
"expr": "toDate(datum[\"opened_at\"])", | |
"as": "date" | |
}, | |
{ | |
"field": "date", | |
"type": "timeunit", | |
"units": ["year", "week", "day"], | |
"as": ["opened_at_start", "opened_at_end"] | |
}, | |
{ | |
"type": "quantile", | |
"field": "hours", | |
"groupby": ["opened_at_start", "opened_at_end"], | |
"probs": [0.5, 0.9, 0.95] | |
}, | |
{ | |
"type": "formula", | |
"expr": "round(datum.value*100)/100", | |
"as": "round_hours" | |
}, | |
{ "type": "formula", "expr": "datum.prob*100", "as": "readable_prob" } | |
] | |
}, | |
{ | |
"name": "pivoted_data", | |
"source": "source", | |
"transform": [ | |
{ | |
"type": "pivot", | |
"field": "readable_prob", | |
"value": "round_hours", | |
"groupby": ["opened_at_end"] | |
} | |
] | |
} | |
], | |
"legends": [ | |
{ | |
"fill": "color", | |
"encode": { | |
"title": { "update": { "fontSize": { "value": 14 } } }, | |
"labels": { | |
"interactive": true, | |
"update": { | |
"fontSize": { "value": 12 }, | |
"fill": { "value": "black" } | |
}, | |
"hover": { "fill": { "value": "firebrick" } } | |
}, | |
"symbols": { "update": { "stroke": { "value": "transparent" } } } | |
} | |
} | |
], | |
"scales": [ | |
{ | |
"name": "xscale", | |
"type": "band", | |
"domain": { "data": "source", "field": "opened_at_end" }, | |
"range": "width", | |
"padding": 0.05, | |
"round": true | |
}, | |
{ | |
"name": "yscale", | |
"domain": { "data": "source", "field": "round_hours" }, | |
"range": "height", | |
"nice": true | |
}, | |
{ | |
"name": "color", | |
"type": "ordinal", | |
"domain": { "data": "source", "field": "prob" }, | |
"range": { "scheme": "accent" } | |
} | |
], | |
"axes": [ | |
{ | |
"orient": "bottom", | |
"scale": "xscale", | |
"formatType": "time", | |
"format": "%B %d", | |
"encode": { | |
"labels": { | |
"update": { "angle": { "value": -90 }, "align": { "value": "right" } } | |
} | |
} | |
}, | |
{ "orient": "left", "scale": "yscale", "title": "review count" } | |
], | |
"marks": [ | |
{ | |
"type": "group", | |
"from": { | |
"facet": { "name": "series", "data": "source", "groupby": "prob" } | |
}, | |
"marks": [ | |
{ | |
"type": "line", | |
"from": { "data": "series" }, | |
"encode": { | |
"enter": { | |
"interpolate": { "value": "basis" }, | |
"x": { "scale": "xscale", "field": "opened_at_end" }, | |
"y": { "scale": "yscale", "field": "round_hours" }, | |
"strokeWidth": { "value": 2 }, | |
"stroke": { "scale": "color", "field": "prob" } | |
}, | |
"update": { | |
"tooltip": { "signal": "datum" }, | |
"strokeOpacity": { "value": 1 } | |
}, | |
"hover": { "strokeOpacity": { "value": 0.5 } } | |
} | |
} | |
] | |
}, | |
{ | |
"name": "horizontal_rules", | |
"type": "rule", | |
"style": ["rule"], | |
"interactive": true, | |
"from": { "data": "pivoted_data" }, | |
"encode": { | |
"update": { | |
"stroke": { "value": "black" }, | |
"opacity": [ | |
{ | |
"test": "hover_tuple && hover_tuple.values == datum.opened_at_end", | |
"value": 0.3 | |
}, | |
{ "value": 0 } | |
], | |
"x": { "scale": "xscale", "field": "opened_at_end" }, | |
"y": [{ "value": 0 }], | |
"y2": { "field": { "group": "height" } } | |
} | |
} | |
}, | |
{ | |
"name": "layer_1_voronoi", | |
"type": "path", | |
"interactive": true, | |
"from": { "data": "horizontal_rules" }, | |
"encode": { | |
"update": { | |
"fill": { "value": "transparent" }, | |
"strokeWidth": { "value": 0.35 }, | |
"stroke": { "value": "transparent" }, | |
"isVoronoi": { "value": true }, | |
"tooltip": { "signal": "datum.datum" } | |
} | |
}, | |
"transform": [ | |
{ | |
"type": "voronoi", | |
"x": { "expr": "datum.datum.x || 0" }, | |
"y": { "expr": "datum.datum.y || 0" }, | |
"size": [{ "signal": "width" }, { "signal": "height" }] | |
} | |
] | |
} | |
], | |
"signals": [ | |
{ | |
"name": "hover_tuple", | |
"on": [ | |
{ | |
"events": [ | |
{ | |
"source": "scope", | |
"type": "pointerover", | |
"markname": "layer_1_voronoi" | |
} | |
], | |
"update": "{unit: \"layer_1\", fields: hover_tuple_fields, values: datum.datum.opened_at_end}", | |
"force": true | |
}, | |
{ | |
"events": [{ "source": "view", "type": "pointerout" }], | |
"update": "null" | |
} | |
] | |
}, | |
{ | |
"name": "hover_tuple_fields", | |
"value": [{ "type": "E", "field": "opened_at_end" }] | |
} | |
], | |
"width": 500, | |
"height": 200 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment