Dashboards & Visualizations

Dashboard Studio - UK Map Visulisation

madhav_dholakia
Contributor

Hello, I am looking to add a UK Map on dashboard studio to show number of open issues (ITSM Data) and RAG Status for Flagship Stores available in different cities like, London, York, Bristol, Liverpool etc.

My Search Output looks like,

StoreID, City, OpenIssues, Status
Store 1, London, 3, Critical/Red
Store 2, York, 2, Warning/Amber
Store 3, Bristol, 0, Dormant/Green
Store 4, Liverpool, 1, Warning/Amber

can someone please suggest if/how this can be done? Thank you.

Labels (2)
0 Karma

tscroggins
Influencer

Hi @madhav_dholakia,

In Simple XML, you can generate categorical choropleth maps with color-coded city boundaries:

tscroggins_1-1735667226738.png

In Dashboard Studio, however, choropleth maps are limited to numerical distributions, e.g. OpenIssues by city, and the geospatial lookup geometry isn't always interpreted correctly:

tscroggins_2-1735667239554.png

In both examples, I've used mapping data published by the Office for National Statistics at https://geoportal.statistics.gov.uk. Search for BDY_TCITY DEC_2015 to download the corresponding KML file.

As a compromise, you can use a marker map to display color-coded markers at city centers by latitude and longitude:

tscroggins_0-1735667191274.png

Here's the source:

{
    "visualizations": {
        "viz_KxsdmDQb": {
            "type": "splunk.map",
            "options": {
                "center": [
                    52.560559999999924,
                    -1.4702799999984109
                ],
                "zoom": 6,
                "layers": [
                    {
                        "type": "marker",
                        "dataColors": "> primary | seriesByName('Status') | matchValue(colorMatchConfig)",
                        "choroplethOpacity": 0.75,
                        "additionalTooltipFields": [
                            "Status",
                            "StoreID",
                            "City",
                            "OpenIssues"
                        ],
                        "latitude": "> primary | seriesByName('lat')",
                        "longitude": "> primary | seriesByName('lon')"
                    }
                ]
            },
            "context": {
                "colorMatchConfig": [
                    {
                        "match": "Dormant/Green",
                        "value": "#118832"
                    },
                    {
                        "match": "Warning/Amber",
                        "value": "#cba700"
                    },
                    {
                        "match": "Critical/Red",
                        "value": "#d41f1f"
                    }
                ]
            },
            "dataSources": {
                "primary": "ds_CtvaIPJ3"
            }
        }
    },
    "dataSources": {
        "ds_CtvaIPJ3": {
            "type": "ds.search",
            "options": {
                "query": "| makeresults format=csv data=\"StoreID,City,OpenIssues,Status,lat,lon\r\nStore 1,London,3,Critical/Red,51.507222,-0.1275\r\nStore 2,York,2,Warning/Amber,53.96,-1.08\r\nStore 3,Bristol,0,Dormant/Green,51.453611,-2.5975\r\nStore 4,Liverpool,1,Warning/Amber,53.407222,-2.991667\" \r\n| table StoreID City OpenIssues Status lat lon",
                "queryParameters": {
                    "earliest": "-24h@h",
                    "latest": "now"
                }
            },
            "name": "Choropleth map search"
        }
    },
    "defaults": {
        "dataSources": {
            "ds.search": {
                "options": {
                    "queryParameters": {}
                }
            }
        }
    },
    "inputs": {},
    "layout": {
        "type": "absolute",
        "options": {
            "width": 918,
            "height": 500,
            "display": "auto"
        },
        "structure": [
            {
                "item": "viz_KxsdmDQb",
                "type": "block",
                "position": {
                    "x": 0,
                    "y": 0,
                    "w": 918,
                    "h": 500
                }
            }
        ],
        "globalInputs": []
    },
    "description": "",
    "title": "eaw_store_status_ds"
}

As a static workaround, the Choropleth SVG visualization allows you to upload a custom image, e.g. a stylized map of England and Wales, and define custom SVG boundaries and categorical colors. The Dashboard Studio documentation includes a basic tutorial at https://docs.splunk.com/Documentation/Splunk/latest/DashStudio/mapsChorSVG.

Get Updates on the Splunk Community!

Stay Connected: Your Guide to February Tech Talks, Office Hours, and Webinars!

💌 Keep the new year’s momentum going with our February lineup of Community Office Hours, Tech Talks, ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Incident Response: Reduce Incident Recurrence with Automated Ticket Creation

Culture extends beyond work experience and coffee roast preferences on software engineering teams. Team ...