Population pyramid chart with geom_bar() | Professional dataviz with ggplot2 | R
Автор: Sérgio Costa
Загружено: 27 мая 2020 г.
Просмотров: 6 208 просмотров
*CORRECTION: I forgot to set the Y axis to absolute values and because of that the labels on the left side of the axis are read negative. To fix it, just replace the command:
scale_y_continuous (breaks = seq (-10,10,1),
labels = function (x) {paste(abs (x), '%')})
The corrected version of the code can be found on my github (url below).]
5 minutes is enough to create a professional-looking and ready for publication chart. In this video i show how to create a population pyramid chart using geom_bar() function from ggplot2 package.
For this example, I use Brazil population data from https://www.populationpyramid.net/.
The code and files can be found on my github repository: https://github.com/sergiocostafh/ggpl...
Forest sciences and biometrics in R (portuguese): https://mensura-r.netlify.app/
Video music: Ecepta & Azaleh - Shadow Truths ( • Ecepta & Azaleh - Shadow Truths )

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: