Get access to all lessons in this course.
-
The shape of data
- Chart types
- How to choose a chart
- Visual metaphor
- Memorability vs. speed of comprehension
- Identifying your audience
- Data encoding process
-
Layout
- Grids, borders, lines
- Axes
- Grids, borders, lines, and axes examples and exercises
- Alignment
- White space
- Charts in larger layouts
- Alignment, white space, and layout of multiple plots examples and exercises
-
Typography
- What is typography and why does it matter?
- Typographic hierarchy
- Font styles
- Good fonts and where to find them
- Using custom fonts in R examples and exercises
- ggtext examples and exercises
- Pairing fonts
- Typography beyond charts
-
Color
- Color palettes
- Color examples and exercises
- Color models
- HCL color palettes in ggplot examples and exercises
- The color wheel
- Color and emotion
- The eyedropper tool and color inspiration
-
Special topics
- Legends
- Accessibility
- Combining ggplot with a vector editor
- Annotations
- Resizing plots for export
- Finding inspiration
The Glamour of Graphics
Data encoding process
This lesson is locked
This lesson is called Data encoding process, part of the The Glamour of Graphics course. This lesson is called Data encoding process, part of the The Glamour of Graphics course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Using the plastic pollution dataset, follow the data encoding process to design one or multiple charts. Try to think outside the box a bit and go beyond just a line or bar chart.
You need to be signed-in to comment on this post. Login.
Erick Yegon
January 11, 2023
i tried a lollipop chart. I could not have it arranged by descending order below is my code
Plot
grand_pastics_tbl %>% filter(!is.na(grand_total)) %>% arrange(desc(grand_total)) %>% head(20) %>% mutate(country=factor(country)) %>% ggplot( aes(x=country, y=grand_total) ) + geom_segment( aes(x=country ,xend=country, y=0, yend=grand_total), color="grey") + geom_point(size=3, color="#69b3a2") + coord_flip() + theme( panel.grid.minor.y = element_blank(), panel.grid.major.y = element_blank(), legend.position="none") + #Add all my labels labs(title = "Top 10 Countries contributing to total Plastic Pollutions Worldwide", subtitle = "Out of all cleanup events in 2019 and 2020, these 10 countries had the most plastic items that were made by the company.", caption = "Data from breakfreefromplastic.org | Viz by Erick Yegon|Glamour of Graphics Courseby RfortheRest of Us", y = "Grand total count (all types of plastic)", x = "Country") +
#All theme elements theme(legend.position ="none", panel.background = element_blank(), #remove gray background axis.text.y = element_text(face = "bold", size = 10), #no y-axis tick labels axis.ticks.y = element_blank(), #no y-axis tick marks axis.ticks.x = element_blank()) #no x-axis tick marks
David Keyes
January 11, 2023
Here's a sample lesson from the Going Deeper course that should help you.
Erick Yegon
January 11, 2023
thanks
Yuri Zharikov
January 23, 2023
Wondering if you can suggest a way to map data to a symbol. E.g. to plot a bird abundance value not as a bar or point but as a bird symbol, e.g. a lollipop with a bird at the end.
David Keyes
January 23, 2023
Have you ever tried the ggimage package? That's probably where I would start.
Yuri Zharikov
January 23, 2023
wow, looks like this will work - thank you!