Tuesday, March 30, 2010

Tags and Nested/Hierarchical/Categorical Organization

Today we were looking at data for an app we have internally that was organizing tagged data in a hierarchy of categories (nested categories). I assume that in the original design, categories were thought to be something helpful to guide the user into a sensible set of tags which which to filter the data.

However, since the primary method of getting to the data was via categories, we are now seeing issues even with the small set of data that were caused because of the context of data being in a category, even if that data's tags did not adequately represent that context.

For example, there was a category called "Vegetarian Selection" and under that category were three categories: "Excellent", "Good", and "Limited". The corresponding tags should have been called excellent_vegetarian_selection, good_vegetarian_selection, and limited_vegetarian_selection. However, the "Vegetarian Selection" category was the only way to access data tagged with those tags, so that context made the tags: excellent, good, and limited seem reasonable to whoever set them up. Even though it is a minor change required in data (the tag names), this method of giving context to tags from what category they are in would seem problematic.

So how can you mix categories and tags and reduce the change of categorization giving the tag context? You could introduce the concept of "tag groups" and a sequential filtering by a member of these groups, similar to how Amazon does product browsing. For example:

tag_group: building
tags: green_center, west_building, ...
tag_group: cuisine
tags: cafe, tex-mex, vegetarian, ...
tag_group: vegetarian_selection
tags: limited_vegetarian_selection, good_vegetarian_selection, ...
and maybe an automatically available tag_group (?) called: misc that would contain everything else not in a group

So instead of a single call to get a single nested categories list, there would be two calls to:

  • return a list of tag_groups that have at least one tag that contained places associated with those tags, given the list of tags you are currently filtering by (which may be empty)
  • return a list of tags that have places associated with those tags, given the list of tags you are currently filtering by (which may be empty)

Using that solution, you could write something that keeps providing a list a tag_groups that you haven't defined a choice from yet. You keep choosing or you click on "all" to see a full list of places with the current list.

However, it is worth noting that categorization and hierarchy/nesting introduces a risk of associating the context of the category with tags, so be careful if you mix the two.

No comments: