Skip to content

Instantly share code, notes, and snippets.

@pietroppeter
Last active April 7, 2020 16:58
Show Gist options
  • Save pietroppeter/4e9ffe4675cf6dde4d7a11d7f2a7f309 to your computer and use it in GitHub Desktop.
Save pietroppeter/4e9ffe4675cf6dde4d7a11d7f2a7f309 to your computer and use it in GitHub Desktop.
Vegalite spec for displaying count of Vegalite packages in linear and log scale
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"title": "Number of Nimble packages",
"data": {"url": "https://gist.githubusercontent.com/pietroppeter/b7cbd29c2a1c4db443712396c34201e8/raw/cd0b5a4a0446cf87b851f3c9353b273cbd8f06c3/packages_count.csv", "format":{"type":"csv"}},
"transform": [
{"calculate": "timeFormat(datum.timestamp, '%Y-%m-%d')", "as": "date"},
{"filter": "datum.error == 0"}
],
"width": 800,
"height": 500,
"selection": {
"grid": {
"type": "interval", "bind": "scales"
}
},
"mark": "line",
"encoding": {
"x": {"field": "timestamp", "type": "temporal", "axis": {"title":""}},
"y": {"field": "count", "type": "quantitative", "axis": {"title":""}
},
"tooltip": [
{"field":"date", "type":"nominal"},
{"field":"commit", "type":"nominal"},
{"field": "count", "type":"quantitative"}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment