# Stitching state,city to something I can use in geography map

**URL:** https://discuss.elastic.co/t/stitching-state-city-to-something-i-can-use-in-geography-map/97784
**Category:** Kibana
**Created:** [August 21, 2017, 2:53pm UTC](https://discuss.elastic.co/t/stitching-state-city-to-something-i-can-use-in-geography-map/97784 "2017-08-21T14:53:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dorj1234](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dorj1234/32/21339_2.png) [@dorj1234](https://discuss.elastic.co/u/dorj1234)
#### Post date: [August 21, 2017, 2:53pm UTC](https://discuss.elastic.co/t/stitching-state-city-to-something-i-can-use-in-geography-map/97784/1 "2017-08-21T14:53:03Z")

</div>

Hello and thank you for reading my question.

I have incoming data that includes the city and state/country from which the data is coming.  
My goal is to create a visual that can handle the city and state/country.

Can anyone suggest how in Kibana I can:

1. Combine 2 fields together to a new field with a comma in the middle? (example: "Frankfurt, Germany")
2. Make this new field usable in the geography view?

Thanks in advance !  
JD

---

<div class="post-metadata">

### Author: ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)
#### Post date: [August 21, 2017, 5:52pm UTC](https://discuss.elastic.co/t/stitching-state-city-to-something-i-can-use-in-geography-map/97784/2 "2017-08-21T17:52:53Z")

</div>

Hi JD,

You can create a scripted field to join those fields together, under Management \> Index Patterns \> Scripted Fields. The field will look something like this:

```auto
doc['city.raw'].value.concat(','.concat(doc['country.raw'].value))

```

In terms of visualizations, how you use this data depends on whether you're creating a Coordinate Map or Region Map visualization.

For a Coordinate Map, you'd have to provide lat/long data when the data is ingested. For example, if you're using Logstash to get data into ES, you could use the [Geoip filter plugin](https://www.elastic.co/guide/en/logstash/current/plugins-filters-geoip.html).

If you're using a Region Map, you can add a vector map with custom joins, to associate something like "Frankfurt,Germany" to an area on the map. Take a look at the [docs for more info](https://www.elastic.co/guide/en/kibana/current/regionmap.html).

Hope this helps!

Thanks,  
CJ

---

<div class="post-metadata">

### Author: ![dorj1234](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dorj1234/32/21339_2.png) [@dorj1234](https://discuss.elastic.co/u/dorj1234)
#### Post date: [August 23, 2017, 4:59am UTC](https://discuss.elastic.co/t/stitching-state-city-to-something-i-can-use-in-geography-map/97784/3 "2017-08-23T04:59:38Z")

</div>

Thank you I appreciate the advice and the quick response.  
JD

---

<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: [September 20, 2017, 4:59am UTC](https://discuss.elastic.co/t/stitching-state-city-to-something-i-can-use-in-geography-map/97784/4 "2017-09-20T04:59:42Z")

</div>

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