How can I visualize aggregation buckets using vega (not vega-lite)

Thank you for the links.
I had already seen both of the pages you linked to, and I still have some newbie questions.
AFAICT, format only applies to vega-lite, and not vega/v3. Is that right?
If that is not right, then can you explain to me how to change the kibana-vega I posted so that it works?

I tried to make a self-contained example here:


Since I'm having such troubles making the data display, can you give me full working example based on the gist I posted one line above this one?