# Smart Ranking

## :question:What It Can Do for You

&#x20;  Our Smart Ranking feature enables you to quickly generate multiple bar charts based on the entire set of numerical values(sales, weights, costs, etc) in a given dataset over a categorical variable(groups, ids, types, product categories, etc) you choose. This gives you a chance to take a broad look of the dataset and makes it simple to understand which group generally has greater numeric values.

## :page\_with\_curl:How to Use

&#x20;  By simply selecting single categorical variable(e.g. product category, region, ...), HEARTCOUNT displays multiple bar charts of all the numeric variables(profit, quantity, ...) by each value of the selected categorical variable.

&#x20; Let's see how it works in practice from Superstore dataset.

* Say you want to how each numeric value varies on average by each product category. The only action you have to take is simply choose Category as a ranking variable.&#x20;
* Then, HEARTCOUNT will produce multiple bar charts with bars ordered in decreasing order on each chart. With the created bar charts, you will have a overview of how each numeric variable differs by each category. <br>
  * Furnitures, for example, which are shown by blue bar charts, have averaged medium sales but the lowest profit, which is exceptional. However, if you look at the discount bar chart, you can see that on average, furniture was sold to clients at a larger discount rate, which may have influenced average furniture profit.

    <figure><img src="/files/U41s8ssJhEcjJ0xJ9jaZ" alt=""><figcaption></figcaption></figure>

###

* You may highlight one of the bars (categories) and make it more apparent and distinct by either using the search tool or by clicking on one of the bars. This will lead to a better comprehension of the selected category.

<figure><img src="/files/bHGmtjX7ybqwYdYm7gsq" alt=""><figcaption></figcaption></figure>

* If you want to examine if this relationship between category and each metric changes inside a certain state, like California, you may use the HEARTCOUNT record filter to exclude all other states except California.
  * Even with the largest discount rate, it appears that technology-related items earned the best profit and sales in California.
  * Meanwhile, the quantity of tech items was the biggest, but the record count (number of transactions) was the lowest. This might imply that a small number of clients in California acquired a large number of tech goods in a few transactions.

<div align="right"><figure><img src="/files/F5D0U5svVlB23j8U26CZ" alt=""><figcaption></figcaption></figure></div>

* If you want to learn more about the link between product category and profit, move your cursor over the profit bar chart and click the Smart Plot symbol that appears in the upper right corner of the chart. HEARTCOUNT will then switch to Smart Plot, with category on the x-axis and profit on the y-axis.

<figure><img src="/files/AtuIAlESfQNOx7NX5gjl" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://public.heartcount.io/visual-discovery/smart-ranking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
