# Dec 15th, 2021: \[en\] UFOs in Kibana Maps

**URL:** <https://discuss.elastic.co/t/dec-15th-2021-en-ufos-in-kibana-maps/290576>\
**Category:** Advent Calendar\
**Created:** [December 15, 2021, 8:00am UTC](https://discuss.elastic.co/t/dec-15th-2021-en-ufos-in-kibana-maps/290576 "2021-12-15T08:00:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [December 15, 2021, 8:00am UTC](https://discuss.elastic.co/t/dec-15th-2021-en-ufos-in-kibana-maps/290576/1 "2021-12-15T08:00:52Z")

</div>

When the call came for doing a post for the advent calendar, I signed up to write about our amazing maps capabilities in Kibana [again](https://discuss.elastic.co/t/dec-24th-2019-en-kibana-canada-open-data-in-kibana-maps/212361). But, in my end-of-year escapism from real and scary things like covid and climate emergency, I decided to look for quirky data to ingest and play with in our [Maps app](https://www.elastic.co/maps). And of course, internet never disappoints. I found the [UFOs dataset](https://github.com/planetsig/ufo-reports) 😁. My thanks to for [@planetsig](https://twitter.com/planetsig) for the work on data collection and the clean up.

Once I found the dataset - I needed to ingest it into Elasticsearch. I decided to use the [file upload](https://www.elastic.co/guide/en/kibana/current/connect-to-elasticsearch.html#upload-data-kibana) in add integrations in Kibana home. What is nice about this is that this uses our machine learning end point to analyse data we are uploading and gives us insights. The result of this exercise is UFO Index in my local Elasticsearch with **80,260** documents in it.

Here is the mapping and ingest pipeline settings for this dataset:

```auto
Mapping:
{
  "properties": {
    "@timestamp": {
      "type": "date"
    },
    "date": {
      "type": "date",
      "format": "M/dd/yyyy||MM/dd/yyyy||MM/d/yyyy||M/d/yyyy||MM/dd/yy||MM-dd-yy||MM/dd-yy||MM-dd-yyyy||MM/d/yy||MM-d-yy||MM.dd.yy||dd/MM/yyyy||M/d/yyyy"
    },
    "field": {
      "type": "long"
    },
    "field2": {
      "type": "long"
    },
    "field3": {
      "type": "long"
    },
    "field4": {
      "type": "double"
    },
    "field5": {
      "type": "double"
    },
    "message": {
      "type": "text"
    },
    "location": {
      "type": "geo_point"
    }
  }
}

Ingest pipeline:
{
  "description": "Ingest pipeline created by text structure finder",
  "processors": [
    {
      "grok": {
        "field": "message",
        "patterns": [
          "%{DATE:timestamp} %{INT:field}:%{INT:field2},.*?%{INT:field3}.*?,.*?%{DATE:date2}.*?%{NUMBER:field4}.*?%{NUMBER:field5}.*"
        ]
      }
    },
    {
      "date": {
        "field": "timestamp",
        "timezone": "{{ event.timezone }}",
        "formats": [
          "dd/MM/yyyy",
          "dd/M/yyyy",
          "MM.dd.yy",
          "M/dd/yyyy",
          "MM/dd/yyyy",
          "M.d.yyyy",
          "M/d/yyyy"
        ]
      }
    },
    {
      "convert": {
        "field": "field",
        "type": "long",
        "ignore_missing": true
      }
    },
    {
      "convert": {
        "field": "field2",
        "type": "long",
        "ignore_missing": true
      }
    },
    {
      "convert": {
        "field": "field3",
        "type": "long",
        "ignore_missing": true
      }
    },
    {
      "convert": {
        "field": "field4",
        "type": "double",
        "ignore_missing": true
      }
    },
    {
      "convert": {
        "field": "field5",
        "type": "double",
        "ignore_missing": true
      }
    },
    {
      "remove": {
        "field": "timestamp"
      }
    },
    {
      "set": {
        "field": "location",
        "value": "{{field4}},{{field5}}"
      }
    }
  ]
}

```

 ![Screen Shot 2021-12-08 at 11.28.49 AM](https://us1.discourse-cdn.com/elastic/original/3X/0/a/0a00e7d20ca0e8c68aceac035eab28ae9af0bf86.jpeg)

Now let's see what we can do with this index in Kibana. This is what I see in my discover. The oldest sighting in my data set is on Nov 11, 1906. **Wow**. This is exciting. You can obviously do a lot in **[Discover](https://www.elastic.co/guide/en/kibana/current/discover.html)** in Kibana to explore and ask questions to your dataset.

 ![Screen Shot 2021-12-10 at 11.35.32 AM](https://us1.discourse-cdn.com/elastic/original/3X/b/1/b1c97c4e0e410f7acc84feec95f79ae7aa4f55ab.jpeg)

From discover, what I am interested in is to explore this data which has geo locations in maps app. And I can navigate to maps app in multiple ways. Here I clicked the location field in the side bar of discover. And because this is a geospatial field with values - Voila, Kibana opens my data in a new map. Awesome, isn't it. Gives us a quick view of how our data's geo distribution looks.

![Dec-10-2021 11-47-08](https://us1.discourse-cdn.com/elastic/original/3X/2/6/2606fa0f1fc02c20dfea1c25ea2ebcdecb1515e5.gif)

Now, let's build a map with different layers in maps app. My base layer is going to have some administrative boundaries from [Elastic Maps Service](https://maps.elastic.co/#file/world_countries). On top of it I am going to layer my documents layer. This will show all the UFO documents individual location in different countries.

 ![Screen Shot 2021-12-10 at 12.36.08 PM](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b8ee457bcd481b6c9a6b0e7d065a2549b57ed91e.jpeg)

Here is something very cool. We have a new feature - [time slider](https://www.elastic.co/guide/en/kibana/current/maps.html#_animate_spatial_temporal_data) - which will let us see UFOs popping up all over the map depending on the recorded date of their sightings!!!

![Dec-10-2021 12-58-07](https://us1.discourse-cdn.com/elastic/original/3X/a/0/a0c2dd4541300e4c62d303c53e386b2d16e2a289.gif)

If I want to see density of my data, I can use the heatmap layer. We can see from the map that US has the highest number of UFO sightings.

 ![Screen Shot 2021-12-10 at 1.26.37 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/7/67203a35bb6bf19d65f7bd6e064ec2f51142ab94.jpeg)

I also changed the zoom level in my document layer so that its visible for zoom levels starting 6-\>24. This way I can see the density first and then zoom in to look at individual documents.

 ![Screen Shot 2021-12-10 at 1.44.51 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/1/d1c57befa93344893382016f7718a3b43ef8bf00.jpeg)

I can also use aggregations to plot big data and not overwhelm my network or browser [layers](https://www.elastic.co/guide/en/kibana/current/maps-aggregations.html). Here is a quick example using clusters and grids to layer UFOs data with document layer. I am using grids and set the zoom level of this layer to 0-\>5. And changed the zoom setting of document layer to 5-\>24. For the grids - I can see calculated values of each group of documents and then when I zoom in - grids layer disappears and I can see individual documents.

![zoom_in](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c46c820eb001319117c0beecc1460d6f94190031.gif)

Oh, here is a question. What happened to my UFO heatmap with celestial sparkly colors? Hint: its in the tooltip in this screenshot.

 ![Screen Shot 2021-12-10 at 2.12.54 PM](https://us1.discourse-cdn.com/elastic/original/3X/5/b/5bb9e1e1c5ad71db7f9c9f05443cb21fc88c5066.jpeg)

Now I can to search across my layers to focus on my data. I want to find out the colors of these UFOs, shapes, was there fire?, did anybody see 👽? or did somebody get **abducted**? I can ask these questions in the search bar as free text.

- Orange color - 8857 hits  
There is always some light, sometimes like a fireball - in red, orange or bluish colors.  

- Alien - 138 hits.  
An alien like ship or actual alien. Insert lots of ET references.  

- Abduct - 4 hits  
Aww poor Fido. Or may be he/she is out having an adventure 🐕  

This is it. Many thanks to @thomasneirynck for the review and answers and @Jeffvestal for all the help with data ingestion. Now I am off to think of Fido having a case of zoomies while lording over an alien spaceship.

---

<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:** [January 12, 2022, 8:01am UTC](https://discuss.elastic.co/t/dec-15th-2021-en-ufos-in-kibana-maps/290576/2 "2022-01-12T08:01:00Z")

</div>

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