How to Create Diverging Bar Charts With {ggplot2} | Step-by-Step Tutorial
HTML-код
- Опубликовано: 11 сен 2024
- DESCRIPTION AND CODE
In this video we create a diverging bar chart with {ggplot2}. And we create not just any diverging bar chart, we recreate a pretty elaborate chart from the PEW Research Center. The full code for this can be found on my blog at albert-rapp.de...
📈 CREATE EFFECTIVE CHARTS
Check out my video course to create insightful data visualizations with ggplot at arapp.thinkifi...
MORE VIDEOS
📺 Avoid duplicate R code in 150 seconds • Avoid duplicate code w...
📺 Shiny modules in 100 seconds • Shiny Modules in 100 S...
📺 Fast explainer playlist • Explainer videos
Subscribe at 👉 / @rappa753
MORE CONTENT
- weekly 3-minute newsletter about R, DataViz and webdev at 3mw.albert-rap...
- LinkedIn at / albert-rapp-9a5b9b28b
#rstats #dataviz #ggplot #dplyr
Enjoyed this video? Then you're definitely going to enjoi my video course. Lots more of detatiled tutorials on complex chart. Check it out at arapp.thinkific.com/courses/insightful-data-visualizations-for-uncreative-r-users
Absolutely amazing! 🤯 It's inspiring to see you tackle such an advanced visualization. I also really appreciate the way you present the code and procedures you use. 👏
Thank you! 🥳 I'm really glad to hear this. Making videos on such complex chats is always way more work than short into videos. So I'm really glad this work is appreciated 🤗
Wow, thank you for showing how to these amazingly complex ggplots.
You're very welcome 🤗
This is like watching the crafting of a fine timepiece!!! I was literally screaming at the screen so many times when you would show a slick trick to problems I’ve also spent countless hours searching for elegant solutions to. 😊
Awesome! Happy to hear that you found some thrilling moments in this video ☺✨
very very cool chart for a unique use case, impressive!!
Glad that you liked it. Diverging bar charts are really great for these opinion-polls kind of situations :)
I loved it. Thanks for this post. 👏🏽
Nice! This video is a bit of a really complicated one. So I'm glad that it's appreciated :)
I really like your channel !
Thank you 🤗 nice to be appreciated 🥳
Great video, as usual. Thank's Albert.
Thank you Max 🤗
Awesome
Thank you 🤗
Love it, Albert
Hey Albet. Your figures are great. Could you help me fix the last step? When I run the code in the section "Assemble the charts," the result shows "There were 50 or more warnings (use warnings() to see the first 50)," and the plot is fading. It only displays the chart's frame without any details. Please help me.
Did you run the warnings() command in R to see the warnings? That might give us an indication of what goes wrong. In the absence of that, just taking a guess: maybe you can profit from using the {ragg} graphics device? Just look for that R package and follow the instructions to enable that device in RStudio
Hi Albert,
Thanks for the great tutorial. I am trying to replicate this chart with some survey data; however, I need help with the computed values.
In your blog, you state, “We have the preference column already in the natural order of “Strongly oppose,” “Somewhat oppose,” “Somewhat favor” and “Strongly favor.”” Therefore, you don’t need to sort. How would you sort the Likert items if they weren’t in their natural order? I tried using Factor and Leveling, but it’s not working.
Lastly, could you assist me with duplicating this method for several more survey questions?
Hi James, in the video calculating the coordinates worked because the rows of the tibble are already in the desired order (groupwise). To make that happen if this is not the case, make the column into a factor variable with the `factor()` function where you use the `levels` argument to set the order that you need. Afterwards you can use the `arrange()` function to sort the rows of the tibble according to the levels of the new factor column. Does this work for you?