Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On scaling tags in a tag cloud

I am implementing a tag cloud on a mobile device. The details of data-model etc, are not particularly important here. My question is about the scaling of tags:

What is the 'best' expression to map tag frequency to font size?

I have looked at this post discussing linear and logarithmic scaling and this answer from Adrian Kuhn sketch of a polynomial approach for inspiration. However, I seem to remember a post some place on the interwebs with a lot more exploration on this issue.

I have also found some "best practices" on a blog, though am unsure of the providence of the best practices. These make no comment on frequency scaling.

What alternatives do I have for tag scaling, and which is the preferred/standard method? I am also considering minimum fontsizes, maximum number of tags, colors, etc.

Edit: As per the discussion in this question, I am interested in the "standard" tagcloud, with font size variations.

like image 418
jamesh Avatar asked Aug 25 '09 11:08

jamesh


People also ask

What is tag and tag cloud?

A tag cloud (also known as a word cloud, wordle or weighted list in visual design) is a visual representation of text data, which is often used to depict keyword metadata on websites, or to visualize free form text. Tags are usually single words, and the importance of each tag is shown with font size or color.

What is the characteristics of tag cloud?

A tag cloud is a visual, stylized method that represents the occurrence of words or tags within a textual content such as websites, articles, speeches and databases. The tags in a tag cloud are represented according to their frequency, weight and meaning relative to other tags.

How does a tag cloud works?

Word clouds (also known as text clouds or tag clouds) work in a simple way: the more a specific word appears in a source of textual data (such as a speech, blog post, or database), the bigger and bolder it appears in the word cloud. A word cloud is a collection, or cluster, of words depicted in different sizes.

What is a tag cloud in Kibana?

A tag cloud represents text which are mostly keywords and metadata in a visually appealing form.


2 Answers

I worked on a small tag cloud project last year, in which I used something along the lines of

β = (int) (((maxθ – minθ) x ω) + minθ + 0.5)
where ω is a weighting previously calculated according to some metric (in your case font frequency), minθ and maxθ are lower and upper bounds, and β is the final value. This can be applied to any visual characteristic (font size, colour, weight if supported, etc.).

I found that linear and logarithmic scaling tended to dependant on data set distribution. In data sets with prominent outliers I found tanh was useful for 'smoothing' the resulting values.

like image 75
deyur Avatar answered Sep 22 '22 01:09

deyur


There is an excellent discussion in this pdf, which discusses scaling, clustering, and truncating on the tags to display.

like image 22
jamesh Avatar answered Sep 22 '22 01:09

jamesh