MapInfo Pro

 View Only

MapInfo Monday: Labelling Large Numbers

  • 1.  MapInfo Monday: Labelling Large Numbers

    Employee
    Posted 4 hours ago

    I used MapInfo Pro in combination with Snowflake to aggregate business points into hexagons. I aggregated the count of businesses in each hexagon and also summarized the sales in each hexagon.

    You can, of course, create a thematic map, helping you to understand the sales across the area. I decided to label the sales amount on top of the hexagons.

    As you can see above, with overlap set to allow overlap, it is a bit hard to make sense of these numbers.
    What can you do to be able to better read the important/buíggest numbers?
    We'll investigate a couple of approaches in this article. Happy #MapInfoMonday!

    Omit the Smaller Values

    Instead of showing every value, you can write a label expression that ignores the smaller values and only displays the values over 1000:
    IIf(SALES_sum>1000, Round(SALES_sum, 1), "")
    Besides using the IIf() function to filter out the smaller values, the expression above also uses the Round() function to round the value to the nearest integer/whole number.
    The resulting map looks like this
    Depending on your data, your limit may be changed to 10,000 ...
    ... 25,000 ...
    ... 50,000 ...
    ... or even more.
    This workaround will work in some cases. But I think you can see that it doesn't always work.

    Number Abbreviation or Numeric Shorthand

    Another workaround is often seen in finance, data visualization, and dashboards. It's called number abbreviation or number shorthand. The idea is to make large numbers easier to read and interpret.

    You do this by replacing part of larger numbers with a letter describing the size of the number. Examples of this are: 1,000 is changed to 1K, 1,000,000 is changed to 1M, and 1,000,000,000 is changed to 1B.

    It really would require a function to implement this correctly, but an expression can be used if you know your values to some extent and don't have to handle edge cases.

    Your map could look like this after applying the Numerical Shorthand to the labels

    As you can see, the long numbers have now been replaced by short 2-4 number/letter combinations.
    The expression used looks like this:
    IIf(SALES_sum < 1000, "", IIf(SALES_sum < 1000000, Round(SALES_sum/1000, 1)+"K", IIf(SALES_sum < 1000000000, Round(SALES_sum/1000000, 1)+"M", "")))
    The expression ignores values under 1,000, and it rounds the Numeric Shorthands to whole numbers. You could decide to round them to one or two decimals for more precision. And finally, the expression doesn't handle values larger than 1 billion; however, support for that could have been added to the function. Also note that the expression doesn't support negative values very well: all negative values will not be displayed.
    Would you find it useful to display numbers with the Numeric Shorthand method?


    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------