# Create a region map based on country code

**URL:** <https://discuss.elastic.co/t/create-a-region-map-based-on-country-code/100338>\
**Category:** Kibana\
**Created:** [September 13, 2017, 10:37am UTC](https://discuss.elastic.co/t/create-a-region-map-based-on-country-code/100338 "2017-09-13T10:37:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![snicoll](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snicoll/32/20285_2.png) [@snicoll](https://discuss.elastic.co/u/snicoll)\
**Post date:** [September 13, 2017, 10:37am UTC](https://discuss.elastic.co/t/create-a-region-map-based-on-country-code/100338/1 "2017-09-13T10:37:17Z")

</div>

Continuing the discussion from [Kibana dashboard of "Elastic for Operational Analytics" webinar](https://discuss.elastic.co/t/kibana-dashboard-of-elastic-for-operational-analytics-webinar/98724/2):

I have tried to create a region map using the `requestCountry` attribute containing the request's country. That attribute holds the two letters ISO code (FR, US, BE, etc).

I am afraid that the doc didn't help me, perhaps I am looking at the wrong place?

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [September 13, 2017, 12:43pm UTC](https://discuss.elastic.co/t/create-a-region-map-based-on-country-code/100338/2 "2017-09-13T12:43:58Z")

</div>

hi @snicoll,

that should work ok. the default world map has a two digit country code as well.

the docs are here: [https://www.elastic.co/guide/en/kibana/current/\_configuration\_2.html](https://www.elastic.co/guide/en/kibana/current/_configuration_2.html)

In the Data-tab, you would do terms-aggregation on your `requestCountry`-field and then select the `iso-2` field in the Options-tab.

---

<div class="post-metadata">

**Author:** ![snicoll](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snicoll/32/20285_2.png) [@snicoll](https://discuss.elastic.co/u/snicoll)\
**Post date:** [September 13, 2017, 2:51pm UTC](https://discuss.elastic.co/t/create-a-region-map-based-on-country-code/100338/3 "2017-09-13T14:51:54Z")

</div>

Thanks for the reply.

Sorry I am still confused ☹

This is my data tab:  
 ![data](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2a56d32678cc89f4341782eea0bb20721aa64cc8.png)

On my instance, the vector map is empty. Am I supposed to select something there?  
 ![vector](https://us1.discourse-cdn.com/elastic/original/3X/b/f/bf8291cffa8d3979baa79c46c4d262a2950e98ed.png)

Regardless it does not work. I guess it's trying to highlight US state or something? When I click on vector map, I have an empty list and nothing to select. I am on elastic cloud with Kibana 5.5.2.

Thanks!

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [September 13, 2017, 3:09pm UTC](https://discuss.elastic.co/t/create-a-region-map-based-on-country-code/100338/4 "2017-09-13T15:09:42Z")

</div>

hi @snicoll,

You are running into this known bug: [https://github.com/elastic/kibana/pull/13931](https://github.com/elastic/kibana/pull/13931).

It has been fixed but will only be available at the next patch release. This usually takes a couple of weeks. Apologies for the inconvenience.

If you can, you can try and run 5.5.1 instead.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 11, 2017, 3:09pm UTC](https://discuss.elastic.co/t/create-a-region-map-based-on-country-code/100338/5 "2017-10-11T15:09:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
