views:

393

answers:

7

I'm building, for example, an application that monitors your health. Each day, you're jogging and doing push-ups and you enter the information on a web site.

What I would like to do is building a chart combining the hours you jogged and the number of push-ups/sit-ups you did. Let's say on the first day, you jogged 1 hour and did 10 push-ups and on the second day, you jogged 50 minutes and did 20 push-ups, you would see a progression in your training.

I know it may sound strange but I want to have an overall-view of your health, not different views for jogging and push-ups. I don't want a double y-axis chart because if I have, as example, 6 runners, I will end up with 12 lines on the chart.

A: 

Then you need a model of how push-ups and jogging affect yourself, and for this you should be asking a doctor or fitness expert, not a programmer :-). This question should probably be taken elsewhere.

Nick Fortescue
I'm looking for a known math model (or whatever) that could help me with that. If you know some place else I could ask that question, I will do it...
dan
A: 

Sounds like a double y-axis chart.

Ray
The problem is that I don't want double y-axis charts because, for example, I have a team of runners, there will be 2 lines per runner which would overload the chart.
dan
A: 

You can just do a regular excel-type chart with 2 lines, scaled appropriately, one for push-ups, one for jogging time. There are graphics libraries that let you do that in back-end language of your choice. X-axys is date.

You may want to have 2 scaled graphs, one for last week and one for last year (ala Yahoo Finance charts for different intervals).

DVK
+1  A: 

First I would redefine your terms. You are not tracking "health" here, you are tracking level of exertion through exercise.

Max Exertion != Max Health. If you exert yourself to the max and don't eat or drink, you will actually damage your health. :-)

To combine and plot your total "level of exertion" for multiple exercises you need to convert them to a common unit ... something like "calories burned".

I'm pretty sure there are many sources for reference tables with rough conversion factors for how many calories various exercises burn.

Does that help any?

Ron

Ron Savage
Thanks, it helps but I used an example to ask the question to simplify the problem but I seems to me that it was not a good idea. Maybe I should have simplyfied the actual problem. Thanks a lot!
dan
A: 

Show the first set of values as a line graph above the x axis, and the second set below the x axis. If both sets of values increase over time this will show as an "expansion" of the graph; should be easy to recognize if one set is growing but the other is not.

Zac Thompson
A: 

Because the two quantities have no intrinsic relationship, you're stuck with either displaying them independently, such as two curves with two y-axes, or making up a measure that combines them, such as an estimate of calories burned, muscles used, mental anguish from exercising, etc. But it's tricky... taking from your example, I suspect one will never approach the calories burned from a 50 mile run by doing push-ups. Combining these in a meaningful way depends not on mathematics but on approximations and knowledge of the quantities that you start with and are interested in.

One compromise might be a graph with a single y-axis that shows some combined quantity, but where the independent values at each point are also graphically represented, for example, by a line where the local color represents the ratio of miles to pushups, or any of the many variants that display information in the shapes or colors in the plot.

Another option is to do a 3D plot, and then rotate it around and look for trends or whatever interests you.

tom10
3D plots are a very bad idea. They introduce perspective and occlusion problems, and make it more difficult to determine values accurately.
Richie Cotton
@Richie - Sometimes 3D plots are useful and sometimes they are not. Here, we know nothing about the real data: how many data sets?, how smooth are the curves?, are there hidden correlations?, are these being plotted for presentation or initial investigation?, etc, etc. I'll agree that 3D plots aren't usually helpful, but in some cases they are, so they shouldn't be dismissed a priori.
tom10
A: 

If you want one overall measure of exercise levels, you could try using total exercise time. Another alternative is to define a points system, whereby users score points for each exercise.

I do think that there is virtue in letting the users see how much of each individual exercise they have done - in this case use a different graph for different exercises rather than using dual y-axes, if the scales are not comparable (e.g. time jogging and number of push-ups). There is a very good article on the problems with dual y-axes by business intelligence guru Stephen Few, here (pdf).

If you want to know more about presenting data well, I can also recommend his book "Now you see it", and the classic "The Visual Display of Quantitative Information" by Edward Tufte.

Richie Cotton