Skip to content

Instantly share code, notes, and snippets.

Last active Feb 22, 2018
What would you like to do?
Vega Webinar - scatter plot showing web requests for various file types
data: {
// Get 10000 documents from ES
url: {
%context%: true
%timefield%: @timestamp
index: logstash-*
body: {
size: 10000
_source: ["@timestamp", "extension"]
format: {property: "hits.hits"}
// Parse timestamp and copy extension into new variables
transform: [
{calculate: "toDate(datum._source['@timestamp'])", as: "time"}
{calculate: "datum._source.extension", as: "ext"}
// Draw results as colored circles
mark: circle
encoding: {
x: {
field: time
type: temporal
axis: {title: null, labelAngle: 30}
y: {
field: ext
type: nominal
axis: {title: null}
color: {field: "ext", type: "nominal"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment