# Tag cloud

A tag cloud (also known as a word cloud 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. When used as website navigation aids, the terms are hyperlinked to items associated with the tag.

## History

In the language of visual design, a tag cloud (or word cloud) is one kind of "weighted list", as commonly used on geographic maps to represent the relative size of cities in terms of relative typeface size. An early printed example of a weighted list of English keywords was the "subconscious files" in Douglas Coupland's Microserfs (1995). A German appearance occurred in 1992.
The specific visual form and common use of the term "tag cloud" rose to prominence in the first decade of the 21st century as a widespread feature of early Web 2.0 websites and blogs, used primarily to visualize the frequency distribution of keyword metadata that describe website content, and as a navigation aid.
The first tag clouds on a high-profile website were on the photo sharing site Flickr, created by Flickr co-founder and interaction designer Stewart Butterfield in 2004. That implementation was based on Jim Flanagan's Search Referral Zeitgeist, a visualization of Web site referrers. Tag clouds were also popularized around the same time by Del.icio.us and Technorati, among others.
Oversaturation of the tag cloud method and ambivalence about its utility as a web-navigation tool led to a decline of usage among these early adopters. Flickr gave a five-word acceptance speech for the 2006 "Best Practices" Webby Award, which simply stated "sorry about the tag clouds."
A second generation of software development discovered a wider diversity of uses for tag clouds as a basic visualization method for text data. Several extensions of tag clouds have been proposed in this context.

## Types

There are three main types of tag cloud applications in social software, distinguished by their meaning rather than appearance. In the first type, there is a tag for the frequency of each item, whereas in the second type, there are global tag clouds where the frequencies are aggregated over all items and users. In the third type, the cloud contains categories, with size indicating number of subcategories.

### Frequency

In the first type, size represents the number of times that tag has been applied to a single item. This is useful as a means of displaying metadata about an item that has been democratically "voted" on and where precise results are not desired.
In the second, more commonly used type, size represents the number of items to which a tag has been applied, as a presentation of each tag's popularity.

### Significance

Instead of frequency, the size can be used to represent the significance of words and word co-occurrences, compared to a background corpus (for example, compared to all the text in Wikipedia). This approach cannot be used standalone, but it relies on comparing the document frequencies to expected distributions.

### Categorization

In the third type, tags are used as a categorization method for content items. Tags are represented in a cloud where larger tags represent the quantity of content items in that category.
There are some approaches to construct tag clusters instead of tag clouds, e.g., by applying tag co-occurrences in documents.
More generally, the same visual technique can be used to display non-tag data, as in a word cloud or a data cloud.
The term keyword cloud is sometimes used as a search engine marketing (SEM) term that refers to a group of keywords that are relevant to a specific website. In recent years tag clouds have gained popularity because of their role in search engine optimization of Web pages as well as supporting the user in navigating the content in an information system efficiently. Tag clouds as a navigational tool make the resources of a website more connected, when crawled by a search engine spider, which may improve the site's search engine rank. From a user interface perspective they are often used to summarize search results to support the user in finding content in a particular information system more quickly.

## Visual appearance

Tag clouds are typically represented using inline HTML elements. The tags can appear in alphabetical order, in a random order, they can be sorted by weight, and so on. Sometimes, further visual properties are manipulated in addition to font size, such as the font color, intensity, or weight. Most popular is a rectangular tag arrangement with alphabetical sorting in a sequential line-by-line layout. The decision for an optimal layout should be driven by the expected user goals. Some prefer to cluster the tags semantically so that similar tags will appear near each other or use embedding techniques such as tSNE to position words. Edges can be added to emphasize the co-occurrences of tags and visualize interactions. Heuristics can be used to reduce the size of the tag cloud whether or not the purpose is to cluster the tags.
Tag cloud visual taxonomy is determined by a number of attributes: tag ordering rule (e.g. alphabetically, by importance, by context, randomly, ordered for visual quality), shape of the entire cloud (e.g. rectangular, circle, given map borders), shape of tag bounds (rectangle, or character body), tag rotation (none, free, limited), vertical tag alignment (sticking to typographical baselines, free). A tag cloud on the web must address problems of modeling and controlling aesthetics, constructing a two-dimensional layout of tags, and all these must be done in short time on volatile browser platform. Tags clouds to be used on the web must be in HTML, not graphics, to make them robot-readable, they must be constructed on the client side using the fonts available in the browser, and they must fit in a rectangular box.

## Data clouds

A data cloud or cloud data is a data display which uses font size and/or color to indicate numerical values. It is similar to a tag cloud but instead of word count, displays data such as population or stock market prices.

## Text clouds

A text cloud or word cloud is a visualization of word frequency in a given text as a weighted list. The technique has recently been popularly used to visualize the topical content of political speeches.

## Collocate clouds

Extending the principles of a text cloud, a collocate cloud provides a more focused view of a document or corpus. Instead of summarising an entire document, the collocate cloud examines the usage of a particular word. The resulting cloud contains the words which are often used in conjunction with the search word. These collocates are formatted to show frequency (as size) as well as collocational strength (as brightness). This provides interactive ways to browse and explore language.

## Perception

Tag clouds have been the subjects of investigation in several usability studies. The following summary is based on an overview of research results given by Lohmann et al.:
* Tag size: Large tags attract more user attention than small tags (effect influenced by further properties, e.g., number of characters, position, neighboring tags).
* Scanning: Users scan rather than read tag clouds.
* Centering: Tags in the middle of the cloud attract more user attention than tags near the borders (effect influenced by layout).
* Position: The upper left quadrant receives more user attention than the others (Western reading habits).
* Exploration: Tag clouds provide suboptimal support when searching for specific tags (if these do not have a very large font size).
Felix et al. compared how human reading performance differs from traditional tag clouds that map numeric values to the size of the font and alternative designs that uses for example color or additional shapes like circle and bars. They also compared how different arrangement of the words affects performance.
* Use an additional bar or circle instead of the font size increases accuracy when reading the numeric value
* However users can find specific word quicker when no additional mark is used
* The performance depends on the task, simple tasks like finding a word are highly affected by the design choice, however the effect on tasks like identify the topic of a tag cloud is much smaller.

## Creation

In principle, the font size of a tag in a tag cloud is determined by its incidence. For a word cloud of categories like weblogs, frequency, for example, corresponds to the number of weblog entries that are assigned to a category. For smaller frequencies one can specify font sizes directly, from one to whatever the maximum font size. For larger values, a scaling should be made. In a linear normalization, the weight $t_{i}$ of a descriptor is mapped to a size scale of 1 through f, where $t_{\min }$ and $t_{\max }$ are specifying the range of available weights.
    $s_{i}=\left\lceil {\frac {f_{\max }\cdot (t_{i}-t_{\min })}{t_{\max }-t_{\min }}}\right\rceil$ for $t_{i}>t_{\min }$; else $s_{i}=1$
   * $s_{i}$: display fontsize
   * $f_{\max }$: max. fontsize
   * $t_{i}$: count
   * $t_{\min }$: min. count
   * $t_{\max }$: max. count
Since the number of indexed items per descriptor is usually distributed according to a power law, for larger ranges of values, a logarithmic representation makes sense.
Implementations of tag clouds also include text parsing and filtering out unhelpful tags such as common words, numbers, and punctuation.
There are also websites creating artificially or randomly weighted tag clouds, for advertising, or for humorous results.