> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Geographic Visualization of Requests Coming to Apinizer with Kibana Maps

> You can visualize geolocation data used in Apinizer on a map using Kibana Maps feature, analyze which cities requests come from, and visually examine geographic access data.

In this document, how to visualize on a map which cities requests come from using Kibana Maps feature with geolocation data used in Apinizer will be explained.

You can use geolocation feature in Apinizer with version 2025. To use geolocation feature, see the relevant document [here](/en/operations/administrator-guides/geolocation-city-based-access-control).

## **1) Geolocation Data Provided from Apinizer**

Geographic location data of incoming request in Apinizer is represented in Elasticsearch in a JSON format as follows.

```json theme={null}
{
  "toClientBody": "[]",
  "loc": {
    "lat": 41.0,
    "lon": 28.0
  }
}
```

Lat (latitude) and lon (longitude) values are geographic coordinates used to determine a point's location on Earth.

For example:

* Latitude: 41.0082° N, Longitude: 28.9784° E (Istanbul, Turkey)
* Latitude: 40.7128° N, Longitude: 74.0060° W (New York, USA)

## **2) Transferring Data to Kibana**

### 2.1) Creating Index Pattern

In the step of transferring data to Kibana, **Kibana installation** and **integration** should be provided.\*\* For Kibana installation, see the relevant document.

After installation, a new index pattern can be created in Kibana from **'Create Index Pattern'** section on **Stack Management → Index Patterns** page:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/01-index-pattern-create.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=78c36a4deb1edae605a73ef7386a33fd" alt="Creating Index Pattern" width="800" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/01-index-pattern-create.png" />

Steps are completed by selecting the **data stream** used in Elasticsearch and creation operation is performed:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/02-data-stream-select.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=d560a7b9ad4722f69c05807587c57d09" alt="Data Stream Selection" width="800" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/02-data-stream-select.png" />

After creation operation is completed, you can see the relevant fields (**fields**) on the page below:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/03-fields-view.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=1475780a21b9db115f6f06a1dac575dd" alt="Index Pattern Fields" width="800" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/03-fields-view.png" />

### 2.2) Checking Existing Index Pattern

If Kibana was **previously installed** and **index pattern exists**, refresh the index you added to Kibana from the **Stack Management →Index Patterns** page below. You should check that the relevant value exists by writing **'loc'** in the search section.

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/04-loc-field-check.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=379eb33046619e120986bbd0991918fb" alt="Index Pattern Check" width="800" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/04-loc-field-check.png" />

Kibana provides **visualization** of incoming requests on a **map** using this **'loc'** data (**latitude and longitude**).

## 3) Adding Map Panel with Kibana Maps and Visualization

Click the **"Maps"** tab in the left menu on **Kibana** main page. This is the application you will use to create map visualizations:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/05-maps-menu.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=ae693d8ae8fb94796b003e1dbd87fea4" alt="Kibana Maps" width="800" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/05-maps-menu.png" />

Click **Add layer** button. Prefer **Documents** option:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/06-add-layer-documents.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=de191ddc6c8532abac09186d2c389533" alt="Add Layer Documents" width="800" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/06-add-layer-documents.png" />

After selecting the index pattern, 'loc' field will be automatically selected. Then, you can **add** the layer by clicking the **'Add layer'** button, name it and **save**:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/07-add-layer-loc.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=160e232fdfd288c2ddc754f276532a61" alt="Add Layer Loc" width="800" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/07-add-layer-loc.png" />

## **4) Result**

In this document, after **IP information of requests coming to Apinizer is converted to geographic data** and sent to Elasticsearch, which cities requests come from has been **visualized** step by step using **Kibana Maps**.

Thanks to this structure, user accesses can be analyzed on a city basis.

Incoming requests on the map will be displayed with **green markers**:

<img src="https://mintcdn.com/apinizer/Jxx1x79C1h6ASyfx/images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/08-map-result.png?fit=max&auto=format&n=Jxx1x79C1h6ASyfx&q=85&s=734ec20410c0e1ee3fea176abaa587a5" alt="Kibana Maps Result" width="800" data-path="images/tutorials/nasil-yapilir-kilavuzlari/yonetici-kilavuzlari/kibana-maps-gorsellestirme/08-map-result.png" />
