Tool Recommendation to create Interaction Map with multiple dimensions

不羁的心 提交于 2019-12-06 08:46:04

In my opinion in Qliksense it is easiest.

First just load Store and Product table and create simple data model:

Then add new chart (Map) and set location fields:

Add new calculated dimension:

=Product & ', Ordered: ' & Ordered & ', Sold: ' & Sold

and that's all. Ready:

Any suggestions, what can be used?

As a workaround - you can consider doing some extra work before visualizing your data like in an example below (BigQuery Standard SQL)

#standardSQL
WITH `project.dataset.table` AS (
    SELECT "Maria's Tortillas" Store, '-118.379096984863,33.9593620300293' Location, 'machaka breakfast burritos' Product, TRUE Ordered, FALSE Sold UNION ALL
    SELECT "Maria's Tortillas", '-118.379096984863,33.9593620300293', 'chile relleno plate', TRUE, TRUE UNION ALL
    SELECT "Anthony's Gift Shop", '-118.371124267578,33.9462585449219', 'LA commemorative trinkets', FALSE, TRUE 
)
SELECT 
    ANY_VALUE(ST_GEOGFROMTEXT(CONCAT('POINT(', REPLACE(location, ',', ' '), ')'))) Store_Location,
    Store Store_Name, 
    STRING_AGG(CONCAT(Product,' | ',CAST(Ordered AS STRING),' | ',CAST(Sold AS STRING)), ' *** ') Products
FROM `project.dataset.table`
GROUP BY Store

If you run above in BigQuery Geo Viz Tool - you will get something like below

To “spice” the visualization a little, you can add some extras:

#standardSQL
WITH `project.dataset.table` AS (
    SELECT "Maria's Tortillas" Store, '-118.379096984863,33.9593620300293' Location, 'machaka breakfast burritos' Product, TRUE Ordered, FALSE Sold UNION ALL
    SELECT "Maria's Tortillas", '-118.379096984863,33.9593620300293', 'chile relleno plate', TRUE, TRUE UNION ALL
    SELECT "Anthony's Gift Shop", '-118.371124267578,33.9462585449219', 'LA commemorative trinkets', FALSE, TRUE 
)
SELECT 
    ANY_VALUE(ST_GEOGFROMTEXT(CONCAT('POINT(', REPLACE(location, ',', ' '), ')'))) Store_Location,
    Store Store_Name, 
    CONCAT(
        '<table cellpadding="5" style="border-style:solid; border-width:1px;border-collapse:collapse;">',
        STRING_AGG(CONCAT('<tr>',td,Product,'</td>',td,CAST(Ordered AS STRING),'</td>',td,CAST(Sold AS STRING),'</td></tr>')),
        '</table>'
    ) Products
FROM `project.dataset.table`, UNNEST(['<td style="border-style:solid;border-width:1px">']) td
GROUP BY Store  

So, the result will be little bit better formatted (as in below pic)

You might be able to adopt this “technic” unless you will find the tool that handles all your needs on its own

Meantime, have in mind that different tools will treat such workaround in a different way – for example, if you run above two scripts within Goliath – you will have respectively:

and

Also, in Goliath, Geo Visualization is in-built feature, so you can interactively build geo visualizations with multiple layers and combining results from multiple queries, etc. without leaving BigQuery Tool

Disclosure: I am an author, product owner and am leading development of Potens.io Suite of Tools (which Goliath is a part of) - which is also clearly stated in my SO profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!