Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mode to show summary of individual tags instead of tag combinations #244

Open
apirogov opened this issue Sep 7, 2022 · 6 comments
Open
Labels

Comments

@apirogov
Copy link

apirogov commented Sep 7, 2022

I started using timetagger a few days ago, its great and well-documented and I got it up and running with docker easily, so thanks for this great project!

I would love to have a different mode to explore the tags in a time range. I would like to choose a time range, and for a set of tags and then see how the percentage/total time distributes over all other tags, so I want to answer the question: between T1 and T2 (e.g. last week), given tag set X (e.g. #programming), how much time/percent was tagged additionally with some other tag? (e.g. #projectA or #projectB).

Example:

If the time slices (numbered) in the chosen range were tagged as follows:

1: #talk to X about Y
2: #programming
3: #programming #projectA
4: #docs #projectA
5: #programming #projectA #testing
6: #programming #projectB #testing
7: #programming some feature
8: #meeting #projectA

And I want statistics for #programming, I expect to see a list like:

(no other tags): 2+7
#projectA: 3+5
#projectB: 6
#testing: 5+6

where the numbers on the right denote the slices to add up (and are divided by sum(2,3,5,6,7) for percentage).

If I would then want to know how much time in that range I was #testing in #projectA, I could simply click on #projectA, which would add it to the "reference set", so I would see for #programming #projectA:

(no other tags): 3
#testing: 5

and if I would next want to focus on #projectA in general, I could remove the #programming tag from the selection and see for #projectA:

#docs: 4
#programming: 3+5
#testing: 5
#meeting: 8

Of course there would be overlaps and it could add up to more than the total sum / 100%, and one could think of ways how to group this better and avoid this in cases where this is feasible (e.g. one could hide #testing in the last example and attach it to #programming, because #testing is fully subsumed), but even without any "deduplication logic" or "hierarchical mode" this would be very useful.

A pragmatic and simple approach would be to simply provide a toggle between two view modes - "individual tags" (as outlined above) and "combination of tags" (the existing non-overlapping view).

Summary: I would like to see

  • A toggle for absolute / percentage of time
  • A toggle for individual tags (with overlaps) / combinations of tags (without overlaps)

EDIT: I just noticed that there is #235 which also sounds interesting. I also would be very happy about a "query language" / interface that subsumes both issues, if that would make sense :)

@apirogov apirogov changed the title More sophisticated reporting / queries based on tag-induced sets Add mode to show individual tags instead of tag combinations Sep 7, 2022
@apirogov apirogov changed the title Add mode to show individual tags instead of tag combinations Add mode to show summary of individual tags instead of tag combinations Sep 7, 2022
@almarklein
Copy link
Owner

To make sure we're on the same page: right now you can select a time range and select one or more tags. The shown groups include all records that have both tags (the AND operator). You want to be able to also select groups of records that have any of the selected records (the OR operator).

Plus show percentages instead of hours.

@apirogov
Copy link
Author

apirogov commented Sep 11, 2022

Percentage instead of hours in basically any view as on option would be quite convenient to have, yes.

But concerning the logic - no, I don't think that we mean the same thing (even though your variation also might be useful, for different use-cases).

In the current interface, the clicked/selected tags still should behave like AND and do the "pre-filtering"/narrowing (so as before, for the stats only time intervals within selected range and with ALL clicked tags are to be considered).

Currently, if I click on tag A and say, see something like:

  • A B D
  • A B E
  • A C D
  • A C E

often what I actually want to know how much time I was doing B/C/D/E "overall" (given A). So when I click on tag A, what I want to see is:

  • B (sum of all in current time range with A and B)
  • C (sum of all in current range with A and C)
  • ...

This might sound strange, but makes total sense if your tag system is a mix of contexts and activities, so that e.g.

  • A is a project that I want to see some stats for (so A is the tag I click on),
  • B/C are activities (such as communication, testing, refactoring, etc.)
  • D/E are subprojects of A

So basically all kinds of combinations are possible.

Within project A, I want to see at a glance how much time I spent doing different activities, regardless of subproject/other tags combined with them. I don't want to add the numbers for "A B D" and "A B E" in my head, and I also don't want to click on B for the sum of "A B", go back, click on C for the sum of "A C" (which is basically an annoying work-around to get the numbers I want to see, using the fact that the total sum for the selected tags at the top). But currently I cannot conveniently get this without doing all this mental or mechanical extra work.

So I do want a kind of OR semantics variation, but not for the tag selection, but for what is shown to me in the list. To be super-precise:

Let $I$ be the set of all tagged time intervals in time range $R$, $tags(x), len(x)$ be the set of tags and the length of a time interval $x \in I$, $T$ be the set of selected (clicked) tags and $J := \lbrace x \in I \mid T \subseteq tags(x) \rbrace \subseteq I$ the subset of intervals within R where all tags in $T$ are applied. Let $S := (\bigcup_{x \in J} tags(x)) \setminus T$ (all "additional" tags that appear in combination with T in timerange $R$).

Then in my proposed alternative view I would like to see for each $a \in S$ a line showing the tag $a$ and the total sum $\sum_{x \in J \land a \in tags(x)} len(x)$, i.e. total time tracked within range $R$ where the tags $\lbrace a \rbrace\cup{T}$ were all applied (possibly combined with other additional tags).

@almarklein
Copy link
Owner

Thanks for the clarification!

Another attempt to phrase this in my own words: right now if you select one or more tags, the list of "subtags" is such that tag combinations are shown, and the total adds up to 100%. You would like the option that the list has one tag per item.

@apirogov
Copy link
Author

Yes, exactly. I think "total per single tag" is generally interesting information to have that would be nice having "built-in", but if you don't think this is worth being treated "special" or the way I use tags is uncommon, its also fine :-)

Just wanted to propose this and see whether you think that this is something that might be a useful built-in feature, or I should build some quick ad-hoc thingy based on the API.

@almarklein
Copy link
Owner

Now the title makes perfect sense :)

Yes, I think having an option to show the overview this way makes sense 👍 Perhaps using a toggle button.

@apirogov
Copy link
Author

Great, looking forward to it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants