Graph to represent an average time

projects
projects used Ask the Experts™
on
I need some statistics to show when a motor is turning on and off.
Imagine a graph, a visual representation showing when that motor is coming on with a second  less important element showing when it went off.

Over a period of time, I should be able to SEE averages showing when that motor was coming on. Lets say we are looking at a month of logging, we should now be able to see that the motor constantly came on mid afternoon last week, randomly the week before but before that, it mostly always came on early afternoons.

I need to show the viewer that average when the motor is coming on over the course of a week, month, months, year, etc.

Prefer to use nvd3 since it's something we are already using.

Attached are examples which are not really working well for many reasons. In one, the viewer thinks the filled in lower area of the bar is representing that the start time was 00:00am to Y axis. Need a better way to represent this. The top of each bar represents the start time. Or, is supposed to but is confusing to the user at the moment.

In the second two examples, one is showing a short period of time while the other is showing 60 days.
Making the bottoms white to try and show the start/end times isn't working well either.

Can't seem to find the right way of representing this data using an NVD3 graph.
2015-12-09_092604.png
2015-12-09_094751.png
2015-12-09_094813.png
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Do you have a graph (even hand drawn) that shows what you want the report to show?

mlmcc

Author

Commented:
No, that is the problem, not able to visualize how this could look otherwise, this question would not exist :).
I do show some examples that we've tried.

I sort of see it as dots as follows, without the line but even that doesn't really show averages over time.
http://blog.advaoptical.com/~/media/Blog/2014/01/Image31.ashx

Hoping someone who has either seen a good representation or works on these things can give some ideas, examples.
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
What should the dots represent?  The time the motor started?  The duration it was on?

mlmcc
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
The requirement is to show what times the motor came on so that over time, we could start seeing a pattern of when it might be coming on most for example.

I don't know that dots would work but it seems that the graph would have some kind of floating line or dots instead of bars as shown in the examples that we've tried.
greetings projects, you seem like you have some experience with using and making bar graphs, so I won't go into that.  I looked at your bar graph images, and the first one  _092604 , seems like a good amount of days to display for that display size, about a month, but the solid full height bars are NOT good to communicate a single start time. The second one  _094751 , to me indicated for each day a start and end time, for a SINGLE run-time during that day bar. But for many visual displays, you can have too much info, since the start time is the only valued (important) data to communicate, I feel you should use a single narrow bar - line, at the height position of only the start time for a month or less days. If the time period for display is more than 30 days, and less than 60 days, I'd use TWO Display graphs, like in second wid narrow start only bar, with an equal number of time span days in each.
Looking at your 3rd image  _094813  , did little to show me any time "trends" or averages, as once I try to analyze that many days without a clear way to group various time sections of those days together and apart, all I get is an unproductive headache.  If the time display is for more than 60 days, I would use 7 day average start time green narrow bar (one graph bar for one week time), and in each week bar, also have a red narrow line at top for the latest start time in the week, and a blue narrow line below the green , for the earliest start time. . . I think that would be easy to understand the "trends" of start times weekly, over a long period, up to say 40 weeks long?

I guess you say to use display dots, because you want to show longer periods of time, with narrow bar width, but even if you change image graph 3 long term display, to dots, it may not give a visual "time section" length mental organization help to the viewer. Although you might can place line markers at the bottom o de graph every 7 or 10 day section? Or color a 7-10 day section as a background color to show weeks, together, separated mentally?

Author

Commented:
Thanks you for such a detailed analysis. I failed to mention that sometimes, the motor might come on once or many times a day and some days, it might never come on, adding to the complication.

Author

Commented:
I have an idea.

What if the graph (first image shown) represented a 24hr period where the X axis was 00:00am to 23:59pm.
As start times are inserted into the db, we would have a process which checks the start time of the entry and if it is lets say for example 1pm, then this would add another *something* to the X axis at the 1pm mark.

I'm not sure what the Y axis would be but it could be the length of time the motor was on I guess.
Yea, I sorta thought that these may run more than once a day,  and I am not sure, that mathematically,  any trends would be helpful as some sort of average, because 4 very various starts for any one day, would usually average out to a mid day time over a period. But thats not the question?

If you do - "a 24hr period where the X axis was 00:00am to 23:59pm." , , then to me, you are just changing to a horizontal Bar, instead of a vertical  Bar. You may can display several thin green bars (dots) on the "day bar" per day for the many start times, but if you intend to show this to people that, need to Get (understand) the info that 28 dots a week for a month (maybe 200 dots per month) would show, it may not communicate much as a "summary". I believe that graphs are suppose to be visual way to display many math infos (like sales dollars to percent as bar height), in an easy to see and understand format., , In this case a higher day graph bar, is not better or worse than a low bar, their just a start time marker, so the usual interpretation of graph bars (if you use bars) is workin against you for viewer understanding. The several dots or lines (no bars) for each day might do ok, if you rarely have more than three dots per day. . .
But a chart thats littered with lots of dots all over the place (hi and low), would not show any understandable info to me. If you're dealing with many starts each day, you may have to average the per day times together, for a single average time per day, for a graph summary info display.
But I really can not recall seeing a good display for this kind clock time for a any time of day variety?

Author

Commented:
You got me thinking and I think my last post/idea solves it.

I was thinking about a X axis being a 24hr period of time and perhaps there would be no Y axis, at least at the start.

We might need a new table to keep track of this stat.

The new table has columns of a means of keeping a count of increments, for example, 00:00am, 00:30am, 1:00am, etc.

When a start time is put into the db, say 1:08am for example, we increment the count of the column for 01:00am, rounding off to the nearest column, in this case, 01:00am.

Now image you are looking at the graph, it's brand new, just starting life. That first start time would show in the 1am bar as having a count of one. As more starts occur and as columns are updated, we would start seeing when most of the starts happen.

Once we have a base for the graph, we could look at how to add additional details such as length of time the motor was on and some other details but for now, this could work.

I can see eventually adding a Y axis to maybe show counts or days/week, something along those lines.
I see better what you meant, from that last post. Maybe like -

--22----10----07----14----60----44----50----31----29---  > bar height as number of starts for 7 days
--12----01----02----03----04----05----06----07----08---  > X axis , as the Hour time

that would make it easy to see at what hour period had the most or least starts for a period of time.
Wish I had though of that.

Author

Commented:
Your feedback helped me to come up with the final solution which I think will work perfectly.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial