I want to plot time on x axis and a numeric field 'f' occurring at that time on y axis in kibana 4.
I have changed the data type of 'f' to integer and I can confirm that it has changed from kibana index settings.
However, the only aggregation options available for Y axis are count/min/max/sum etc. This post has an answer for plotting sum but I'm interested in plotting actual values.
Is there a way to do this?
You probably want to check this.
tl;dr
The data you want to plot, are not numbers.
Update your grok filter to something like this %{NUMBER:time:float} instead of whatever you have.
Re-index/re-hash your elasticsearch (i just deleted my data and restarted the whole thing)
Goto Kibana4 -> Visualize -> New line graph
In Y axis select max and in the field, select your number field.
Kibana is plotting a bucket, e.g. every minute.
As such, aggregations are in order. I frequently plot average and max on the same chart to give me a good overview.
If you reduce the time period, the buckets get smaller, but I don't think you can ever make them "just 1 document".
Related
I understand that I can contingently plot on the chart using range of date and time values.
However, I would like to be able to plot using a specific number of candlesticks.
For example, I would like to be able to say something like
// Within the most recent 10 bars
// If close[0] > close[1]
// plotshape()
I have tried implementing numerous variations using barstate.isrealtime or barstate.islast but I keep running into limitations.
One major problem is that, although bar_index[#] works by indexing backwards from the most recent bar, the value of bar_index[10] is not 10 but some number in the thousands (depending on the timeframe of the chart — for me its Daily = 2,616 candles, 1hr = 6,217 candles, 15m = 5,222, etc.). In other words, it counts the number of bars from the oldest bar available.
Since referencing of the bars (starting from most recent) and the index values (starting from the oldest) are conflicting--due to counting from opposite ends--I am not sure how to specify: plotshape() for the most recent 10 bars.
I am also running into trouble due to the fact that bar_index[0] occurs every single iteration of the chart's timeframe--so I am getting caught in recursive calculations when trying to do bar_index[0]-bar_index[10].
It seems that what I need is something like bar_index.islast[10]
The reason that I would like to call a plotshape() based on the number of specified candles versus since x date/time (or within date range (x,y)), is because I want my indicator to function properly regardless of which timeframe my chart is displaying:
If I am showing a monthly chart, I want to plot across the last 10 monthly bars; If I am showing a daily chart, I want to plot across the last 10 daily bars; etc.
If I am forced to use a date range, then this functionality breaks down, since I will be shown increasingly more bars for smaller timeframes.
Caveat**
I am able to kinda make this work by specifying the number of bars from the oldest candlestick by stating something like:
bar_index > 2600 ? color=color.black : na
However, given the fact that every single time frame displays a different number of bars, this is not a workable solution for me.
Thanks for any advice.
UPDATE
I have been hunting around and and found that the functionality I desire is already built into the show_last argument of the various plot()functoins.
Ill leave my question posted, in case it helps someone else.
UPDATE I have been hunting around and and found that the functionality I desire is already built into the show_last = int argument of the various plot() functions.
I'll leave my question posted, in case it helps someone else.
I want to create a plot that shows the live metering data I am getting from an electricity meter.
I already figured out how to have a plot in bokeh, that updates every x seconds with new values, but now I want to have the new values always be at a fixed point in the plot, while the range of the axis does not increase.
I fixed the range by adding x_range=[0, 10] to the figure, however that plot is running out of the screen and I have to manually follow it.
How do I change it so it follows it automatically?
Is that even possible in bokeh or should I be using something different for my project?
Use a default DataRange1d range (i.e. do not set the range to a fixed interval) and then set the follow property on the range. You can also set follow_interval to specify how far back the range should trail the latests data.
p.x_range.follow = "end"
p.x_range.follow_interval = 100
For a complete demonstration see the OHLC ticker example.
I read every possible forum and I couldn't find a specific answer. I'm new to Tableau and I need to perform what I thought would be a very simple task but I can't figure it out.
I need to create a chart with multiple lines plotted in the same graph. On one column, I have a timestamps in seconds (decimal). For each timestamp value, I have 4 columns associated (Temperature, Pressure, Humidity, Voltage) and I need to visualize how they trend over time. The data in Excel looks something like this (I simplified it for visualization purpose):
In Excel, it takes me less than seconds to obtain a chart that looks like this:
How can I replicate the same exact chart in Tableau? I would like someone to tell me exactly how each column should be formatted, if the data has to be a dimension or a measure and data type for each (string, number etc) and what steps to take in the chart. I would do this in Excel but the file is almost 1M rows and Excel keeps crashing.
drag & drop measure values & timestamp.
EDIT - first make Timestamp a dimension instead of a measure, and make sure it remains continuous instead of discrete. So you should not see the word SUM in front of Timestamp
remove no. of row & timestamp from the measure values.
uncheck aggregate measure.
EDIT this step is not usually needed or desirable. If you do have multiple recordings per Timestamp, you will want to select the best aggregation function for each measure, perhaps AVG or MEDIAN instead of SUM
select line from mark and drag measurement to color
If your X-axis is a Date Column, (i.e. You have a list of dates on your X-axis)
Drag your 'date column' to Columns and choose Month/Year/Week etc. and make it continuous
Drag 'Measure Names' to Filters and choose your Measures
Drag 'Measure Values' to Rows
Drag 'Measure Names' to the Colors section of the Marks card
The histogram i created with my data is shown as a thick block. There are valid hits numbers and dates on the y and x axis respectively, which indicates the data is proper. What can be done to scale it down to an understandable one?
The problem with your histogram is that the data you have indexed would be having a good frequency against the date and/or the data might be months old. So the default interval option for Kibana is set to one year.
You can change it by changing the default time period from "year" to any other smaller values under the section "view" (marked as 1 in the below figure) in the "Interval" dropdown (marked as 2).
More on histogram analytics can be from this blog
In my tableau visualization I need to show the change in a metric over every minute for a day.
I have a "minutes" table in my db. Each row has columns: "minute_id", type int
"minute", type string: carries the value of the time eg: "05:33, 12.30, etc"
"min_date_time", type datetime: carries the value of the time datetime equivalent of the above string value eg: "2013-11-01 2:30:00 AM, 2013-11-01 2:31:00 AM, etc"
A second table called "demos" has all the metrics that are shown for that specific minute.It has relevant columns as follows:
"minute_id", type int: foreign key for the minutes table
"ind2plus", type float: value to be displayed on the y axis for each "minute_id"
This is what I have so far:
The problem Im trying to solve is:
On the X axis currently the displayed unit is "minute_id".
I would like to keep minute_id as the values on the X axis,
but I would like to change the values "displayed" as labels on the X axis from
the int value in the "minute_id" column to the string value in the "minute" for every "minute_id".
How do I do that? Please advise.
UPDATED GRAPH:
If you have a true datetime field in your data, you get more flexibility by using that field for most situations.
So I suggest putting your min_date_time field on the columns shelf to replace minute_id.
Tableau allows you to use dates and time fields in many different ways for different effects -- so many options that it can be confusing. You have to choose whether to treat the field as a dimension or measure, whether to treat it as discrete or continuous, and what level of granularity to use (hour, minute, month, exact date ...) It will take experimentation and experience to get comfortable with implications of the different choices.
For your graph, I would start by choosing a continuous dimension at the minute level. You can adjust the settings by clicking the little triangle on the right of the pill on the columns shelf. The truncated date settings are the second batch of date menu options and result in a green pill. Once set, you can drill up/down granularity with the + on the left of the pill.
Finally, once you are happy with your chart, you can change the formatting instructions to affect how dates are displayed on the axis. Right click on a number on the axis, choose format, and then in the format pane, under scale you should see a pull down labelled Dates. You can choose one of the existing date formats or enter a custom one. The format strings are pretty much what you expect.