United Nations votes - Data Viz exercise
I am really into data visualization and since in my current position as coördinator I get to do it way less than I would like to, I decided to take part of the #TidyTuesday challenge organized by the #rstats community every now and then.
Main things I learned
It was my first time making a map in a tidy format. Awesome! Now I am so used to the tidy format and the
grammar of graphics
that I really prefer it over any other format. It is so intuitive now!It was also my first time using the
plot_layout()
function from the{patchwork}
package and let me tell you, I found it amazing. It didn’t take long to learn and I am quite satisfied with the result (still, some buggy things or maybe just that I did not get it completely, but overall, a great function).I decided that sometimes your dataset does not have all the info you want/need so it is ok to search for extra info. It didn’t take long to find a dataset that contained information about which countries are developed and which countries are developing. It needed some cleaning up to make it match with the original #TidyTuesday dataset.
I learned to use
html
format for the title so I could put color on it. All thanks to the{ggtext}
package and itselement_markdown()
format.I really thought about the colors. The blue is the official color of the United Nations and the orange is just its complementary color. I am trying to think more about the meaning of the colors and not only choose something that looks good.
The final plot
So, the code can be found on my GitHub and the final result was shared on Twitter:
My #TidyTuesday turned into a Tidy Weekend 😅, but better late than never. In this visualization I show that developed nations tend to support less UN motions related to colonialism than developing countries. #rstats #dataviz pic.twitter.com/Y2J1YwFJ5i
— Ale Hdz Segura (@alehsegura13) March 28, 2021
Some known issues
The figure is not completely stretched.
There are twice as many developing countries than developed countries (according to the used dataset to get the HDI), but you cannot tell from the size of the plot. This is what I struggled with on
{patchwork}
. I made the plot for developing countries larger but still, it ended either too long or too short (I went for the last option). Something to improve for next time.A grammar mistake in the title (did you see it? 😉).