Splunk Cloud Platform

Splunk Dashboard Studio

Part 6: Add a map

After adding all these visualizations, you decide that you want to show purchases of Buttercup Games across a world map categorized by game type. In this part of the tutorial, create an interactive map that uses colors to demonstrate purchase quantity by country.

  1. Select the add chart icon (A bar graph as an icon.) in the editing toolbar, and then select Map.
  2. In the Search section of the Select data source panel, select + Create search.
  3. In the New data source panel, name the source Purchases by Location.
  4. Add your search. For this tutorial, copy and paste the following search into the SPL query field:
    index=main sourcetype=access_* action=purchase status=200 productName="*"
    | iplocation clientip
    | lookup geo_countries latitude AS lat longitude AS lon OUTPUT featureId AS country
    | stats count by country
    | geom geo_countries featureIdField=country
    
    This search finds the countries that customers are located in based on their IP address, and then adds up purchases by the country that the customer is from.
  5. Select Apply & close. At this point, you've created a new data source and assigned it to the map. There will be no visible changes to the map.
  6. In the Data layer formatting section, change Layer type to Choropleth. A choropleth map is a type of map that uses color to show aggregate values. In this tutorial, the map uses color to show purchase amounts.
  7. Make sure that Region area IDs is set to country (string) and that Values is set to count (number).
  8. Use the drag handle to move and resize the map to the bottom left rectangle. If you select the map anywhere other than the drag handle, the map's position will not move. You would instead move the locations visible on the map.
  9. Add a title to the map visualization by selecting the add Markdown icon (An uppercase letter M and an arrow pointing downward as an icon.) in the editing toolbar.
  10. Enter **Purchases by Location** in the text box. The asterisks bold the text using Markdown formatting.
  11. Resize and position the text box to fit above the map and inside the rectangle. Resize the map again if necessary to include the text.

After completing Part 6, your map looks similar to the following:

A map with different shades of purple on different geographical locations, each shade showing how many purchases were made in each location.

Next step

You've completed Part 6 of the Splunk Dashboard Studio tutorial and your dashboard has a map showing the connection between geographic locations and purchases. Next, you'll add a drop-down menu input to filter the visualizations you've added so far. Continue to Part 7: Add an input.

Last modified on 25 January, 2024
Part 5: Add a single value visualization   Part 7: Add an input

This documentation applies to the following versions of Splunk Cloud Platform: 9.1.2308, 9.2.2403 (latest FedRAMP release), 9.2.2406


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters