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 (1)
0 Karma

tscroggins
SplunkTrust
SplunkTrust

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.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...