I have a long list of Linux timestamps, representing the second that events occurred over a one-hour period (3600 seconds). Most events are separated by 3-4 seconds but some are separated by one second and some happen at the same second:
1371995100
1371995103
1371995106
1371995106
1371995107
1371995109
1371995111
1371995113
1371995114
1371995118
1371995121
I would like to plot this data as a series of lines representing "event happened", as such (notice that 1371995106 occurs twice):
Actually, since one-second resolution is finer than necessary, but density is important, events that happen at the same time can 'carry over' to the next free second (so it would appear as if the second event that happened at 1371995106 were plotted against the next free second, which is 1371995108):
Can this be plotted using CLI tools in common Linux distros? I have tried plot (gnuplot) but been unable to find examples of creating graphs from one-dimensional data.
You are trying to do a frequency plot. Assuming your data is in a file called data then
set format x "%.0f"
set boxwidth .9
set style fill solid
plot 'data' using ($1):(1) smooth frequency title 'Frequency' with boxes
format stops the label being output with exponents
boxwidth sets the width of the box so there's a gap.
The style is set to filled boxes
smooth frequency sums the y values which are set to 1 by the :(1) the x being the first field in the file ($1).
Related
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'm using Timelion to draw my time series, but I'd like to draw points or color the lines red if the document contains an "error" field. Is there a way to do this with conditionals?
Ideally, I'd like some HUGE pointer identifying where the errors are. Below is an example of what I'm trying. The top function draws the time series I'm interested in viewing which is great, but the second one just draws bars with the count of errors at that point.
.es(q="_exists_:json.durationGetOwner", index=filebeat-*, metric="avg:json.durationrelinquish", split=json.environment.consensus_type:4).label('$2 $1 duration ms', '^.*duration(\S+) >.*type:(\S+).*$'),
.es(q="json.type:Error AND json.name:monitoring-tests").bars(width=1).color('#ff0000').label('Test Wide Errors')
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
A little bit of background first, I am currently working with a SAS script that creates graphics showing the changes in DVI (Difference Vegetation Index) over a certain period of time for different regions and for different types of crops.
For hay, I want to add vertical lines to the graphic showing when it was mowed during that period of time. In the table containing the variables used to create the graphics (day, DVI, region) there is also a variable containing the days where the hay got mowed.
I know that I can use href = X in proc gplot, but how can I use the values in my table so that it creates vertical lines based on the time of mowing for each region?
Thanks
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