# Problems with visualizing a co-occurrence matrix in Kibana

**URL:** https://discuss.elastic.co/t/problems-with-visualizing-a-co-occurrence-matrix-in-kibana/254403
**Category:** Kibana
**Created:** [November 5, 2020, 12:46pm UTC](https://discuss.elastic.co/t/problems-with-visualizing-a-co-occurrence-matrix-in-kibana/254403 "2020-11-05T12:46:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Matthew\_1979](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Matthew\_1979](https://discuss.elastic.co/u/Matthew_1979)
#### Post date: [November 5, 2020, 12:46pm UTC](https://discuss.elastic.co/t/problems-with-visualizing-a-co-occurrence-matrix-in-kibana/254403/1 "2020-11-05T12:46:30Z")

</div>

Hello everyone,

I am trying to visualize a co-occurrence matrix. This matrix consists of two lists with terms (list1: n\_columns & list2: n\_rows). The data itself shows the article identifiers in which the terms co-occur. So 'potassium' and 'copper' co-occur in the articles '31593825', '31579618' etc.

co-occurrence matrix:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/1/b196852b81f230a7a5eb1d358f189f926c32c3be.png)

alternative input -\> single list (binary):

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/0961c68abc95792ea5878e34d9513f5ffedab890.png)

I tried to import and modify the data in Kibana in different ways, but I can't seem to find the right solution for this problem. The data in its current format looks un-visualizable to me and probably needs to be changed or saved in Elasticsearch in a specific way.

I want to create visualizations like a 'Wordcloud', 'Sunburst' or 'Co-occurrence network model'. Is there a solution to save the data in ES in such a way that I will be able to create all these visualizations? If not, only the 'Wordcloud'?

**Thanks 🙂**

---

<div class="post-metadata">

### Author: ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)
#### Post date: [November 6, 2020, 3:04pm UTC](https://discuss.elastic.co/t/problems-with-visualizing-a-co-occurrence-matrix-in-kibana/254403/2 "2020-11-06T15:04:36Z")

</div>

Have you tried storing your material values in a single field? For example, each document would have a field `material` with values like copper or zinc or so on. Fields can contain arrays so you can store multiple values in a single field.

By storing values in a single field, you can use the existing [tag cloud visualization](https://www.elastic.co/guide/en/kibana/7.9/most-frequent.html) and [vega](https://www.elastic.co/guide/en/kibana/7.9/vega-graph.html) to create sunburst visualization.

Then you could try using [graph](https://www.elastic.co/guide/en/kibana/7.9/xpack-graph.html) for co-occurrence network model.

---

<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: [December 4, 2020, 3:04pm UTC](https://discuss.elastic.co/t/problems-with-visualizing-a-co-occurrence-matrix-in-kibana/254403/3 "2020-12-04T15:04:42Z")

</div>

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