# Population pyramid

**URL:** <https://discuss.elastic.co/t/population-pyramid/301478>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [April 4, 2022, 9:11am UTC](https://discuss.elastic.co/t/population-pyramid/301478 "2022-04-04T09:11:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![meyer1](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@meyer1](https://discuss.elastic.co/u/meyer1)\
**Post date:** [April 4, 2022, 9:11am UTC](https://discuss.elastic.co/t/population-pyramid/301478/1 "2022-04-04T09:11:05Z")

</div>

Hello everyone! I need a little help.

I would like to make a population pyramid on my data. I would like to separate the gender and make 5 year age brackets. While counting the number of people in each category.  
I know it's possible with Vega. But I can't do it.

Currently in my data I have the date of birth and the gender of the population.

Thanks for your futures answers

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [April 6, 2022, 7:29pm UTC](https://discuss.elastic.co/t/population-pyramid/301478/2 "2022-04-06T19:29:38Z")

</div>

It's going to be tough on how to walk through it all. I would suggest checking out the [example](https://vega.github.io/editor/#/url/vega/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykSArJQBWENgDsQAGhAATONABONHJnaT0AQQAEONjgYAbJGom6AnoqQIas7RBhsA7jXFltAVUoBlStvkIbGRWODA0UBDaAGaKbAjaAIwAHAIADNqYbNoATKl5lNIYcDRkWGgALHkyOEiysq5kaAIyECXiSIYQaADaoO0IcGggsEiKmADqtvSFxB0Mg6gAzHkAvlJ91gvDMKOYAAq1M3MLuWsbA0MustMyDDiyJlvZ2gBU2iNjk9cw2gDU7zsxgdZCAziB+ltzHBRkdDPM0LkqiAmK4QahQK4DJghlY3IMZDYNMk0gSkAAPBF5VItTBwHBoBKpFYrAC6MgemBQ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gek6l7p78GUqhmBGxkOHk1QTGQFR2IMcUIi5GEjQ1fxwnhUrgPrZwSmcJp8zQHpuamYs0yFaeeZtlY8xam9Y0dBnYAFkPqS2MjLG8jcFZK08rEVWvl8axi1q3Q6kVoqG1isbJ2YDPL+2Yh-MaMh7aOx9ugc2+dUAe3yvQ8ObCKFV0DmPYot12HO1KjVNEYleJxwTmgZOxcM5ZxzlNFaLDC7SIEVsCuXCA4102pGJsQA) which I think is close to what you are looking for and then building from there. If you have a specific question then try to include what you've done so far and narrow it down so we can take a look at it.

---

<div class="post-metadata">

**Author:** ![meyer1](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@meyer1](https://discuss.elastic.co/u/meyer1)\
**Post date:** [April 7, 2022, 8:42am UTC](https://discuss.elastic.co/t/population-pyramid/301478/3 "2022-04-07T08:42:50Z")

</div>

Hello, thank you for your answer.

I started by comparing the data I was using with the one in the example and in the example there is the year and the number of people in +, I do not have that. I thought that the example would manage this by itself to count the population.

I have the impression to be blocked for the blow...

---

<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:** [May 5, 2022, 8:43am UTC](https://discuss.elastic.co/t/population-pyramid/301478/4 "2022-05-05T08:43:10Z")

</div>

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