In this video, I show you how to create an animated bar chart race using gganimate.
#rstat #dataanalyst #rstudio
📁 Dataset
[ Ссылка ]
📁 Hex Codes
[ Ссылка ]
📁 Rscript file
[ Ссылка ]
📁 Logo PNGs
[ Ссылка ]
🔖c h a p t e r s 🔖
00:00 - Intro
00:28 - Install packages
01:39 - Load in data
03:08 - Format date to date format
03:44 - Sort race date by ascending
04:19 - Create a cumulative sum of wins
05:30 - Group by date & team to get the total sum
07:06 - Pivot the data
09:19 - Unpivot the data
11:10 - Create a rank column
13:21 - Add images via an image column
14:57 - Add hex codes column using join
16:11 - Add year column
16:37 - Create the bar chart in ggplot
17:13 - Set up x & y axis
18:13 - Add background image
19:18 - Set chart as bar & add hex codes
20:48 - Add year text to bottom right
22:40 - Flip bar chart to its side
23:21 - Change order - show most wins at top
23:34 - Add constructor names
24:33 - Format the theme of the plot
25:57 - Adjust the plots margin
26:40 - Add background color to plot
26:53 - Format title, subtitle & caption
27:56 - Add images to end of bars
29:02 - Add data labels after images
31:07 - Run chart ready to animate
31:45 - Create animation
36:15 - Export as a gif
36:36 - Change size, fps, duration & render
39:40 - Export to mp4
My RStudio Appearance Setup
RStudio theme: Modern
Zoom: 100%
Editor font: Lucida Console
Text rendering: (Default)
Editor font size: 16
Editor theme: Tomorrow Night 80s
To learn how to change your appearance in RStudio here: [ Ссылка ]
Contact and Socials
💌 My email - dean@deanchereden.com
🌍 My website - [ Ссылка ]
🐦 Twitter - [ Ссылка ]
Music
🎶 Cloudchord, G Mills - Cruisin' [ Ссылка ]
🎶 Listen to Chillhop Music - [ Ссылка ]
How To Create An ANIMATED Bar Chart Race
Теги
rstatsAnalyticsData ScienceHow ToR ProgrammingR Studioapi tutorial for beginnersdata analyticsdata science trainingdata science with rlearn r programmingr programming for beginnersr programming for data analysisr programming for data sciencer programming tutorialr tutorialrest api tutorialrstudiodata sciencer programmingbar racelogosimagesf1data visualizationrprogramminganimation