MENU

Fun & Interesting

How to Create Parallel Plots in R with geom_line() and ggparcoord()

The Data Digest 4,267 3 years ago
Video Not Working? Fix It Now

In this tutorial I will show you how to draw multiple lines in R with the geom_line() function and the ggparcoord() function. You can download the R code from this video here: https://www.skool.com/data-analysis-with-r-6607/classroom/daa88316?md=ed11645dd3354f3382e2e1cc246f31c8 You can use these to highlight a group of lines for certain categories or highlight an individual response. Sometimes these chart types are also called Spaghetti plots. I will also go through the function arguments from the ggparcoord function that is provided by the GGally package. ⏱ Time Stamps ⌚ 0:00 - Intro and video overview 0:32 - color multiple lines based on a category 4:00 - highlight individual countries of the gapminder dataset 7:35 - facet_wrap() to highlight 1 out of 9 African countries 9:03 - GGally::ggparcoord function arguments External Links: https://r-graph-gallery.com/parallel-plot.html https://r-graph-gallery.com/93-parrallel-plot.html https://www.data-to-viz.com/graph/parallel.html https://r-charts.com/ranking/parallel-coordinates-ggplot2/ https://www.storytellingwithdata.com/blog/2013/03/avoiding-spaghetti-graph

Comment