obsidian-tracker icon indicating copy to clipboard operation
obsidian-tracker copied to clipboard

Add option for handling multiple values on same date

Open geoffreysflaminglasersword opened this issue 2 years ago • 7 comments

I have a graph grabbing distance and temperature values for workouts

When I have two workouts on the same day, it shows abnormally high temperature and distance.

The summing behavior makes no sense for these metrics (unless I wanted to see total distance).

It would be preferable if there were a setting to either select the first or last value, or do sum, product, difference, etc. Or, if possible, an option to show multiple data points would be helpful.

At minimum there should finer grained date/time, i.e. I would expect dateFormat: 'M/D/YYYY H:mm' to be able to distinguish points on the same day at different times

@geoffreysflaminglasersword

It would be preferable if there were a setting to either select the first or last value, or do sum, product, difference, etc.

I thought about this too.

To deal with multiple data points in the same day, if somehow we could get a time value for each point, we can separate them by time (doable, but not implemented). But I have no idea how to get the time value from user data in current plug-in design. It may or may not exist case by case.

Even if we keep the data points (it will make the data structure more complicated), without attaching time values. When do the rendering, we need to sum them up or do an average or something else to get a value, so they can be represented in a graph. That’s for the daily graph. It will be another story if we want to render output in graphs with the granularity down to hours.

pyrochlore avatar Sep 03 '21 04:09 pyrochlore

Will add a parameter for user to determine the way how data in the same date merge together.

pyrochlore avatar Sep 14 '21 01:09 pyrochlore

apologies for not being familiar with development terms/process, im reading "moved this from In progress to Done in Tracker Kanban", does that mean it is now implemented?

~

for additional info, my usecase would look like this example, but scattered rather than summed. other mentioned solutions such as incremental-time, or operation alternatives to sum such as average would work as well but scatter would be simplest.

for now i use a single value per day and shown lines, which is still great. but it would be nice to see a cluster of values as was my habit before adopting tracker.

thank you for the very useful plugin.

surrealsymmetry avatar Nov 29 '21 22:11 surrealsymmetry

I'd like this too, was this ever implemented? If so, how do we use it?

danvisintainer avatar Feb 09 '22 03:02 danvisintainer

Another example: I want to draw a line diagram of my weight every day, where sometimes I measure and enter the weight two or three times a day. Currently, these duplicate values are added up, which doesn't make sense in this case. But I see no way to change this behavior, e.g. by using expressions like average since they cannot be used for line diagrams.

Cito avatar Feb 19 '23 14:02 Cito

Looking for the same solution. It was said to have been implemented according to the NOT IN USE Kanban, but I can’t see how to do it. It’s the same as Cito for me, tracking my weight if I enter it multiple times per day, it adds it up! whereas I obviously only want one (or the average). Anybody have any success with this?

It seems to me the issue is here in the code: https://github.com/pyrochlore/obsidian-tracker/blob/90441b6302bc5310f83e5efebd3d54463edc5e82/src/collecting.ts#L378 so the only thing to do would be to change the += to = and we’re done! (Except for all those cases where we do want multiple occurances in single note summed.)

Honestly, though there should be an input setting that allows this to be easily toggled. Currently, the only type that isn’t added is the Time type (automatically detected in the search target). So if you want to spoof it, you can ‘secretly encode’ your data as time! For weight, it might be 20 lbs per hour of the day. Clearly, this is a ridiculous work-around.

ces3001 avatar Mar 09 '24 03:03 ces3001

Bump. I track my mood multiple times throughout the day. I want to create a line graph of my mood throughout the day in my daily note.

bcwilsondotcom avatar Apr 26 '24 03:04 bcwilsondotcom