<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create a geo map based on 3 letter country code in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425541#M6116</link>
    <description>&lt;P&gt;I downvoted this post because reading through the linked app, it does not use 3 letter iso country codes. while apps posted to splunkbase can sometimes solve problems, blind recommendations to pull apps based on keywords do not make for good answers. a better answer would point out what in the app would help solve the problem at hand.&lt;/P&gt;

&lt;P&gt;in fact, as i point out in my answer, this question can be solved without any additional apps, provided a new enough version of splunk enterprise.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Jun 2019 21:45:15 GMT</pubDate>
    <dc:creator>acharlieh</dc:creator>
    <dc:date>2019-06-16T21:45:15Z</dc:date>
    <item>
      <title>Create a geo map based on 3 letter country code</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425538#M6113</link>
      <description>&lt;P&gt;I have a query to returns stats count based on the ISO 3 letter country code. How can I create a map visualization for this data?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 04:19:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425538#M6113</guid>
      <dc:creator>md_imran</dc:creator>
      <dc:date>2019-06-14T04:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create a geo map based on 3 letter country code</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425539#M6114</link>
      <description>&lt;P&gt;Hello @md_imran,&lt;BR /&gt;
Hopefully, this &lt;A href="https://splunkbase.splunk.com/app/4102/"&gt;GeoLocation&lt;/A&gt; App will help you.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jun 2019 14:48:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425539#M6114</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-06-16T14:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create a geo map based on 3 letter country code</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425540#M6115</link>
      <description>&lt;P&gt;No extra apps are required to accomplish this. I can give you two options here, both using only things that come with Splunk Enterprise by default.&lt;/P&gt;

&lt;P&gt;The simplest method (no configuration changes needed), if you look in the search app, you'll see that there's a built in lookup called &lt;CODE&gt;geo_attr_countries&lt;/CODE&gt; This lookup has (among other things) iso2 and iso3 letter codes mapped to country names. &lt;/P&gt;

&lt;P&gt;Using this this lookup, I can actually make a simulation of your data set, where I have a code and a count:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup geo_attr_countries | fields iso3 | eval select=case(random()%10==2,"yes"),count=random()%100+1 | where select="yes" and isnotnull(iso3) | fields - select | rename iso3 as code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm using this starting point, you'd use your own starting point... but assuming my base search has fields code and count, I can use the lookup to resolve the code to a Country name, and the &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/geom" target="_blank"&gt;geom&lt;/A&gt; to turn the Country name into a geometry (suitable for display on a chloropleth map) like so: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt; | lookup geo_attr_countries iso3 as code OUTPUT country | geom geo_countries featureIdField=country | fields country count geom
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another potential option, involves defining a new geospatial lookup. In &lt;CODE&gt;Settings &amp;gt; Lookups &amp;gt; Lookup Definitions&lt;/CODE&gt;, you're going to create a new lookup, with type=Geospatial using the lookup file geo_countries.kmz... name can be whatever you want (I chose &lt;CODE&gt;geo_countries_iso3&lt;/CODE&gt;), but under Advanced options you need to define the Feature Id Element as the following: &lt;CODE&gt;/Placemark/ExtendedData/SchemaData[@schemaUrl="#countries"]/SimpleData[@name="ISO3"]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Instead of using the country name, this now is a lookup using the 3 letter ISO code as a feature ID. With that knowledge object created and shared with those who will need it, you can now just use the geom command directly: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt; | geom geo_countries_iso3 featureIdField=code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are of course other ways to do this as well (use the geo_attr_countries before your stats, so your stats are by country instead of by ISO3 letter code)... But again, no additional apps are in fact required for this ask&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:59:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425540#M6115</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2020-09-30T00:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create a geo map based on 3 letter country code</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425541#M6116</link>
      <description>&lt;P&gt;I downvoted this post because reading through the linked app, it does not use 3 letter iso country codes. while apps posted to splunkbase can sometimes solve problems, blind recommendations to pull apps based on keywords do not make for good answers. a better answer would point out what in the app would help solve the problem at hand.&lt;/P&gt;

&lt;P&gt;in fact, as i point out in my answer, this question can be solved without any additional apps, provided a new enough version of splunk enterprise.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jun 2019 21:45:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425541#M6116</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2019-06-16T21:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create a geo map based on 3 letter country code</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425542#M6117</link>
      <description>&lt;P&gt;Appreciate your answer.&lt;/P&gt;

&lt;P&gt;I was able to lookup geo_attr_countries and use it to generate the chloropleth map. I was trying to use the cluster map with the same query, but the visualization comes up as a blank map. Cluster Map documentation on splunk indicates, it works with Lat, Long. &lt;/P&gt;

&lt;P&gt;Is there a way to visualize using cluster map with country code rather than cloropleth.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:56:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425542#M6117</guid>
      <dc:creator>md_imran</dc:creator>
      <dc:date>2020-09-30T00:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create a geo map based on 3 letter country code</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425543#M6118</link>
      <description>&lt;P&gt;It's certainly possible... You'd just need to convert from a country code to a lat, long first. There are many ways you could do this, importing and leveraging a &lt;A href="https://community.periscopedata.com/t/63fy7m/country-centroids" target="_blank"&gt;lookup of 2 letter ISO country code to the centroid coordinates&lt;/A&gt; for example (I'm sure you've noticed that geo_attr_countries has both 2 letter and 3 letter ISO codes)... and then leverage the geostats command. &lt;/P&gt;

&lt;P&gt;But that said, in your presentation you should make sure that with your labeling your viewers understand the degree of accuracy of the data that you are presenting on this map/visualization.&lt;/P&gt;

&lt;P&gt;Basically you're taking data that represent areas (country codes), and reducing them to single points. When people interpret points for when they instead need areas... this &lt;A href="https://arstechnica.com/tech-policy/2016/08/kansas-couple-sues-ip-mapping-firm-for-turning-their-life-into-a-digital-hell/" target="_blank"&gt;sort of thing&lt;/A&gt; has &lt;A href="https://gizmodo.com/how-cartographers-for-the-u-s-military-inadvertently-c-1830758394" target="_blank"&gt;quite the history&lt;/A&gt; of going &lt;A href="https://splinternews.com/why-lost-phones-keep-pointing-at-this-atlanta-couples-h-1793854491" target="_blank"&gt;quite wrong&lt;/A&gt;. But if a cluster map is what you need, such a scheme could work.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-a-geo-map-based-on-3-letter-country-code/m-p/425543#M6118</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2020-09-30T00:59:26Z</dc:date>
    </item>
  </channel>
</rss>

