Coder Social home page Coder Social logo

Comments (5)

Shifter2600 avatar Shifter2600 commented on September 14, 2024

also should I be using physician.keyword and if so what is the correct format?
is it "[physician.keyword]"

from kibana-vega-vis.

Shifter2600 avatar Shifter2600 commented on September 14, 2024

so I started investigating the use of
"format": { "type": "json", "property": "aggregations.key.buckets" }
The issue I have now is after buckets it's .0, .1, .2, .3, .........Which now eliminates the ability to get the values and keys in the same place. Also the values are in value.value.
Here is my data
"data": [ { "name": "table", "url": { "index": "logstash-hvms-ub-*", "body": { "_source": ["physician", "elapse"], "aggs": { "key": { "terms": { "field": "physician.keyword", "size": 100 }, "aggs": { "value": { "avg": { "field": "elapse" } } } } } } }, "format": { "type": "json", "property": "aggregations.key.buckets" } } ],

Here is some sample JSON.
{ "aggregations": { "key": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Dr. Rhonda Ross", "doc_count": 196602, "value": { "value": 2.389609464807072 } }, { "key": "Dr. Courtney Wright", "doc_count": 159187, "value": { "value": 1.0917223140080534 } }, { "key": "Dr. Eleanor Jones", "doc_count": 134339, "value": { "value": 2.4374902299406727 } }, { "key": "Dr. Sylvia Ortega", "doc_count": 127621, "value": { "value": 4.112081867404267 } }, { "key": "Dr. Judy Whittaker", "doc_count": 106158, "value": { "value": 3.8356506339607 } } ] } } }

I did take a look at your solution here #16 but it was too hard to follow since I am not doing any geopoints here or histogram dates. I think if you can help me with this solution I sould be able to use this same structure on many other vega visuals.

from kibana-vega-vis.

Shifter2600 avatar Shifter2600 commented on September 14, 2024

I believe I figured it out. I will add my Data section for an example for those instances where a user is not needing Date Time Histogram.

from kibana-vega-vis.

nyurik avatar nyurik commented on September 14, 2024

@Shifter2600 my apologies for not replying earlier. There is a pending change to VegaLite that should make field accessing much easier, I will write a few blog posts on its use as soon as they release it in the next few days.

from kibana-vega-vis.

nyurik avatar nyurik commented on September 14, 2024

@Shifter2600 update - v0.4.0 has just been released, and in the release notes there is a link on how to access source fields from VegaLite.

from kibana-vega-vis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.