From a series of timestamps, find where most time was spent - plot

I have a software build that is taking much longer to complete, and I'd like to find out where the build is spending most of its time. I have approx 4,500 timestamps in the format 2022-06-10T10:27:47.775-04:00.
There's no other data, just the timestamps, and I'm at a loss what terms to search for or even what type of chart to use.
This is the chart I came up with:
To get that chart, I pulled unique entries from the series of timestamps, and plotted them on both the X and Y axes. It does at least show where there were larger jumps in time.

Related

plotting time in hh:mm:ss format on the x axis

I have an issue, which I feel should be really easy to solve, however I am unable to figure it out.
I have two arrays of equal length, one containing some measurement values and another one containing the time stamps of this measurements as strings in the form of hh:mm:ss (for example: time = ['09:17:12', '09:17:13', '09:17:17', ..., '12:49:02']. The time stamps are not equally separated in time, sometimes they differ by a second, sometimes by 5 seconds. Both arrays are very long - around 100 000 entries.
I would like to plot the measurement values on the y axis against the time stamp values on the x axis. Additionally I would like the formatter on the x axis to show the time every hour (or two hours) in order to avoid overlapping.
I've spent quite a long time trying to figure out how to do it, and I assume it should be fairly straightforward, however I am unable to do it. I guess it should involve datetime, date2num, as well as fiddling with the x axis formatter and locator. If anyone has any suggestions it would be greatly appreciated.

Discrete vs continuous (dimension vs measure) for dates in tableau

I'm currently learning tableau and was creating a graph to map the unemployment with respect to each month. As the period of time was a measure, I dragged it in and it resulted in aggregation by month (of all years together) and a graph was displayed as such:
Now to plot it monthly for each subsequent year, I checked online and saw the conversion method where the same MONTH(PERIOD) was converted to a measure and it resulted in a plot like this:
Could someone please explain why does this work and how is a measure responsible for displaying data in such a way and not the month dimension. I cannot understand the plots when both the axes are measures.
Thank you
...saw the conversion method where the same MONTH(PERIOD) was converted to a measure.
It's not converted to a measure. Period is still a dimension, just a Continuous one. Measures and dimensions in Tableau can be either Continuous or Discrete. The ability to convert one to another depends on the data type of your field. For example, Dates can be converted between Continuous and Discrete, but Strings can't. The green colour isn't for measures - it's for the Continuous type of either measure or dimension.

How to plot only within a range defined by x number of bars?

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.

dygraph stepPlot: is there a direction option?

R dygraph with the stepPlot option displays steps in a style "horizontal, then vertical" (equivalent to direction = "hv" in ggplot2 geom_step). My data are the result of some aggregation, e.g. apply.monthly (ts, mean), which outputs the monthly means of a time series. The time stamp (index) of the resulting time series represents the endpoints of the time intervals (which makes sense). However, when plotting in dygraph, the steps go horizontal first, then up, displaying the monthly mean of the previous month. As a workaround, I shifted the time stamps using time(ts)= floor_date(time(ts),unit="month"), which corrects the plotting issue, but I feel this is not elegant, since it is a change of the time series and maybe other functions on the time series will be affected. And my data are not small enough to keep copies in different formats.
Did I miss an option in dygraph?
Thanks,
Josef

How to show actual values instead of sum/average on y-axis in a plot using Power BI

I have an excel sheet which I am plotting two values over time. But when I plot it in Power BI it shows the sum of those values in y-axis rather than the actual value. The plot looks like the following.
If you see the y-axis they are in billions. But if you see the actual data below its in hundred thousands range.
If I use date hierarchy instead this is how it looks like.
Since your data is on specific days, you should use dates on your axis rather than weekends. When you have weekends on the axis, it groups all the days within that week together, which is not what you want.
Edit:
After looking at your file, it has nothing to do with dates after all. It looks like the data is recorded at a weekly level. The reason its adding up like that though is that for each date there are a bunch of different rows that correspond to different geography (your geo column has state name abbreviations).
If you add a slicer for geo and look at the chart for a single state at a time, then I think you'll get more what you're expecting.

Resources