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 categorize operation #49

Closed
kirangadhave opened this issue Jun 21, 2023 · 4 comments · Fixed by #65
Closed

Add categorize operation #49

kirangadhave opened this issue Jun 21, 2023 · 4 comments · Fixed by #65
Assignees

Comments

@kirangadhave
Copy link
Member

kirangadhave commented Jun 21, 2023

Currently, aggregate adds a new column called __aggregate to attach an aggregate name to each row. We should have an explicit Categorize operation that lets us add a __cateogry column that can be named.

Only one category for the CHI prototype, but ideally should allow adding any number of category columns.

@kirangadhave
Copy link
Member Author

@alexsb To visually show the category assignment, should we encode the new category as mark type or mark color (preference to mark type if available)?

@kirangadhave kirangadhave changed the title add categorize button Add categorize button Jun 21, 2023
@kirangadhave kirangadhave changed the title Add categorize button Add categorize operation Jun 21, 2023
@alexsb
Copy link
Member

alexsb commented Jun 21, 2023

Hmm, that's hard, no? It could already use either. I think there are two ways:

  • Either do a simple solution (mark shape is less likely taken) and acknowledge the problem.
  • Do something more complicated such as under-laying a separate mark, or drawing a set vis (line sets, bubble sets) on top

@kirangadhave
Copy link
Member Author

It’s easy to determine if mark/color is encoded or just has fixed value. Vegalite has inbuilt functions for this. We can use that and if mark/color has fixed value we can use that to encode, else show a warning and print out the column name, so they can use it if they like to update Altair code and use it to encode

@alexsb
Copy link
Member

alexsb commented Jun 21, 2023

Sounds like a plan

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

Successfully merging a pull request may close this issue.

3 participants