Read, Row-Bind, Summarize & Visualize Multiple Data Sets in R | tidyverse, readr, dplyr & ggplot2

  Рет қаралды 1,138

Statistics Globe

Statistics Globe

6 ай бұрын

How to import, combine, summarize, and visualize two data sets in the R programming language. More details: statisticsglobe.com/read-row-...
The video analyzes group participants of the "Data Manipulation in R Using dplyr & the tidyverse" online course. More details here: statisticsglobe.com/online-co...
R code of this video:
install.packages("tidyverse") # Install & load tidyverse package
library("tidyverse")
my_path <- "C:/Users/Joach/Desktop/my project/" # Specify working directory
data1 <- read_csv(str_c(my_path, "data1.csv")) # Import first data set
data1 # Print first data set
data2 <- read_csv(str_c(my_path, "data2.csv")) # Import second data set
data2 # Print second data set
data1_upd <- data1 %>% # Filter rows
filter(! ID %in% c("ID5", "ID13", "ID55"))
data1_upd
data_all <- data1_upd %>% # Row-bind multiple data sets
bind_rows(data2)
head(data_all) # Head of combined data
tail(data_all) # Tail of combined data
nrow(data_all) # Total number of participants
data_summ <- data_all %>% # Convert vector to tibble
group_by(country) %>% # Group tibble
summarize(country_count = n()) %>% # Calculate country count
arrange(desc(country_count)) # Arrange tibble descendingly
data_summ # Print country data
data_summ %>% # Create ggplot2 plot
ggplot(aes(x = reorder(country, - country_count),
y = country_count)) +
geom_col() + # Specify to draw a barplot
theme(axis.text.x = element_text(angle = 90, # Vertical x-axis labels
hjust = 1,
vjust = 0.3)) +
xlab("Country") + # Change x-axis label
ylab("Count") + # Change y-axis label
annotate("text", # Add text element to plot
x = 15,
y = 25,
label = "Course Participants
by Country",
size = 15,
color = "#1b98e0")
Follow me on Social Media:
Facebook - Statistics Globe Page: / statisticsglobecom
Facebook - R Programming Group for Discussions & Questions: / statisticsglobe
Facebook - Python Programming Group for Discussions & Questions: / statisticsglobepython
LinkedIn - Statistics Globe Page: / statisticsglobe
LinkedIn - R Programming Group for Discussions & Questions: / 12555223
LinkedIn - Python Programming Group for Discussions & Questions: / 12673534
Twitter: / joachimschork
Instagram: / statisticsglobecom
TikTok: / statisticsglobe

Пікірлер: 12
@saimajahan1000
@saimajahan1000 5 ай бұрын
Simplicity and clarity are your specialty!!!.
@Ifeanyi.StatisticsGlobe
@Ifeanyi.StatisticsGlobe 5 ай бұрын
Hi Saimajahan, thank you for your kind words; we appreciate it!
@stevenandes3330
@stevenandes3330 5 ай бұрын
Can we have access to the datasets used in this package so that we can go over the video step by step? Of course, the data are confidential and will not be shared.
@Ifeanyi.StatisticsGlobe
@Ifeanyi.StatisticsGlobe 5 ай бұрын
Hi Steven. You should be able to use a similar dataset to follow along with the video tutorial. What really matters is understanding the principle, which you can then apply to different datasets.
@IndianStatistician
@IndianStatistician 4 ай бұрын
Hey Joachim Schork, I have done my master's in Statistics.. I'm exploring different statistical software. I decided to learn software and gain expertise in it. Can you help me with deciding on that software? I want to invest my upcoming decades in one of software and gain expertise in it....
@StatisticsGlobe
@StatisticsGlobe 4 ай бұрын
Hey, in my opinion you should focus on either R or Python. R is more commonly used in the field of Statistics, but Python is more popular in general. So whether to choose R or Python also depends on your field of work. I hope this helps! Joachim
@IndianStatistician
@IndianStatistician 4 ай бұрын
@@StatisticsGlobe yup, Python is trending nowadays, but if I thought about statistical operations as a niche or after 15-20 years, I think R is an appropriate choice. What do you think about it?
@StatisticsGlobe
@StatisticsGlobe 4 ай бұрын
Yes, R can definitely be a good choice for this sector.
@IndianStatistician
@IndianStatistician 4 ай бұрын
@@StatisticsGlobe Thanks ! Statistics Globe Team.
@StatisticsGlobe
@StatisticsGlobe 4 ай бұрын
You are very welcome! :)
@Ragav_326
@Ragav_326 5 ай бұрын
How to learn r programming in 3 months???
@Ifeanyi.StatisticsGlobe
@Ifeanyi.StatisticsGlobe 5 ай бұрын
Hi, Ragav. Learning R programming requires patience and time. However, you can grasp the rudiments quite fast by using a resource like W3 Schools.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 123 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 70 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
00:56
صدام العزي
Рет қаралды 52 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 6 МЛН
Performing SQL Queries In R | Data Science Galaxy
16:54
Data Science Galaxy
Рет қаралды 1,8 М.
Process HUGE Data Sets in Pandas
10:04
NeuralNine
Рет қаралды 37 М.
Tech Gadgets I Actually Like
21:41
Snazzy Labs
Рет қаралды 8 М.
Using dplyr's group_by for grouping data in R (CC163)
10:56
Riffomonas Project
Рет қаралды 4,7 М.
Data wrangling with R in 27 minutes
27:19
Equitable Equations
Рет қаралды 20 М.
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
STOP Learning These Programming Languages (for Beginners)
5:25
Andy Sterkowitz
Рет қаралды 663 М.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 123 МЛН