Kibana Visual: Show visual only when a field. is decreasing - elasticsearch

I am trying to set up a simple Kibana line chart with these conditions -
I'm trying to set up a Power vs Timestamp chart. In elastic, I have the metrics Current and Voltage. I'll calculate the Power from that. Problem is, I need to show the visual ONLY if the current is decreasing.
So at time t, the current value should be less than the last reported current value.
Cannot figure out how to do this in Lens. If it can't be done in Lens, any help with Vega is appreciated.
Thanks

So it sounds like you want a graph that only shows the values of current for when the previous value is greater. This is not doable in lens, but definitely doable in Vega.
Since you haven't provided an example I will just point you in the right direction. You will need a series of transforms to get the data in a plottable form.
sort the data by timestamp (collect transform)
run a window transform that stores the previous value (window transform)
calculate the difference between these values (formula transform)
filter values with a negative/positive difference (filter transform)
From here you can build the marks etc. if Vega is new to you I would start by looking at the Vega Documentation, Vega Gallery and the Kibana-Vega Documentation (for data ingest).

Related

Mode coming different than seen in distribution plot

I am trying to plot distribution of the values in my file. While the chart is looking fine, however the data looks negatively skewed and when i calculated skew it came as positive. I further analyzed data to see what is mean median mode to confirm the chart. And mode is not at the highest point of the distribution chart.
I am using
sns.distplot(AVG.loc[AVG['Month'] == 'May 2020','Asset Value Growth'],hist=True,label='May 2020')
Can someone tell me what am i doing wrong over here ?

Barplot with frequency by specific factor

I would like to create a barplot in TIBCO Spotfire with frequency on Y axis based on two factors: Stage and Genotype.
This is the standard expression that I have from Spotfire:
Count() THEN [Value] / Sum([Value]) OVER (All([Axis.X]))
It turns out, I do not want the frequency over ALL the data, but within Stage. In a way that the sum of the frequency within each is stage it will be 100%.
I watched some videos and I still did not figured out.
I tried to find a solution to your problem but could't find a working expression. This can still help you :
What I would have done in your case is :
remove the Genotype from the X Axis
set the visualization as a 100% stacked bars (with right click)
add the Genotype as a color by parameter (in the visualization options)

how to add specific visualization to histogram

I use Kibana to create a date histogram of some web traffic, tagged by category. Using an algorithm running somewhere else, I know that a certain histogram value was an anomaly, and I can export that data into Elasticsearch.
But I can't figure out how to make Kibana visualize the combination of the two in one graph, something like I sketched in the picture below, where the red outline indicates the anomaly.
The anomaly data are just records with timestamp and count values. I can visualize those separate from the histogram easily:
Any hints on how to combine these two series ?
Thanks
Bart

DC.js Crossfilter on "nested" dimensions

I'm quite confused and might need help just formulating the question, so please give good comments...
I'm trying to crossfilter some data where each data point has its own sub-dataset that I want to chart and filter on as well. Each point represents a geographic region, and associated with each point is a time series which measures a certain metric over time.
Here's what I've got so far: http://michaeldougherty.info/dcjs/
The top bar chart shows a particular value for 10 regions, and the choropleth is linked with the same data. Now, below that are two composite line charts. Each line corresponds to a region -- there are 10 lines in each graph, and each graph is measuring a different metric over time. I would like the lines to be filtered as well, so if one bar is selected, only one line will show on the line chart.
Moreover, I want to be able to filter by time on the line charts (through brushing) in addition to some other filter, so I can make queries like "filter out all regions whose line value between 9 AM and 5 PM is less than 20,000", which would also update the bar and choropleth charts.
This is where I'm lost. I'm considering scrapping DC.js for this and using crossfilter and d3.js directly because it seems so complicated, but I would love it if I'm missing something and DC.js can actually handle this. I'd also love some ideas on where to start implementing this in straight crossfilter, because I haven't fully wrapped my head around that yet either.
How does one deal with datasets within datasets?
Screenshot of the link above included for convenience:

How do I reduce the X axis on a Google Chart?

I'm doing a bar chart with google, and my results look like this (link).
If you see that the graph is not beautiful enough. What is the parameter that can reduce the value on the x axis.
Thank you in advance.
try this one
I just added chds=0,10 to scale it properly. That basically sets the data range to 0 min, 10 max.
I would take a look at this link from google regarding Data Scaling. I am not sure of your data set format so the actual answer to your problem will depend on that.
i.e. - I added "&chds=0,10" after your "chd=" statment and got a better looking chart. Example.
Check out the help file here.
Decide whether your data must be scaled to fit your chart. Different formats support different ranges of values. You might want to scale your data so that it spans the full range of values allowed by your format, to make differences more obvious. You can do this either by scaling your data to fit within the data format that you use, or you can use text formatting with custom scaling.

Resources