● Sensory Scientist @ Sensolution.ID
● Trainer @ R-Academy Telkom
University and The Datanomics
Institute (TDI)
● Initiator of Komunitas R Indonesia
● Pkgs: sensehubr, nusandata,
bandungjuara, prakiraan, etc
● Shinyapps: sensehub,
thermostats, aquastats, bcrp,
bandungjuara, etc
aswansyahputra @aswansyahputra_
Slide 3
Slide 3 text
R Indonesia
R Indonesia
www.r-indonesia.id
Komunitas
t.me/GNURIndonesia
@r_indonesia_
indo-r
www.r-indonesia.id
Slide 4
Slide 4 text
R Indonesia
www.r-indonesia.id
Slide 5
Slide 5 text
Know your
neighbour!
● Who are you?
● What you do with data?
● How would you describe
your experience with R?
Slide 6
Slide 6 text
Artwork by @allison_horst
Slide 7
Slide 7 text
Artwork by @allison_horst
Slide 8
Slide 8 text
Data
Carpentry?
Slide 9
Slide 9 text
It’s so relatable,
is it not?
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
No content
Slide 12
Slide 12 text
“
Do not underestimate
DATA PREPROCESSING
Slide 13
Slide 13 text
is not a single process
but a thousand of
little skills and techniques
“
- David Minmo
Slide 14
Slide 14 text
Artwork by @allison_horst
The tidyverse is an
opinionated collection
of R packages
designed for data
science. All packages
share an underlying
design philosophy,
grammar, and data
structures.
Slide 15
Slide 15 text
Program
Import Tidy Transform
Visualise
Model
Communicate
Understand
Slide 16
Slide 16 text
Program
Import Tidy Transform
Visualise
Model
Communicate
Understand
Slide 17
Slide 17 text
Artwork by @allison_horst
tidyr
Slide 18
Slide 18 text
Artwork by @allison_horst
dplyr
Slide 19
Slide 19 text
dplyr basic functions:
●
filter() selects rows based on their values
●
mutate() creates new variables
●
select() picks columns by name
●
summarise() calculates summary statistics
●
arrange() sorts the rows
dplyr basic functions:
●
filter() selects rows based on their values
●
mutate() creates new variables
●
select() picks columns by name
●
summarise() calculates summary statistics
●
arrange() sorts the rows
Credits to Michael Toth
tidyr basic functions:
●
gather() wide-format >> long-format
●
spread() long-format >> wide-format
●
fill() fills value based on previous entry
●
complete() turns implicit missing values
into explicit
tidyr basic functions:
●
gather() wide-format >> long-format
●
spread() long-format >> wide-format
●
fill() fills value based on previous entry
●
complete() turns implicit missing values
into explicit
Operators:
● ! (not)
● I (or)
● & (and)
● ==, !=
● <, <=, >, >=
● %in%
● is.na()
Operators:
● ! (not)
● I (or)
● & (and)
● ==, !=
● <, <=, >, >=
● %in%
● is.na()
Let’s get
started!
● Let’s write R scripts together!
● I will demonstrate and explain the
use of each code
● Access this presesentation at:
s.id/data-carpentry-
with-tidyverse
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
No content
Slide 35
Slide 35 text
No content
Slide 36
Slide 36 text
No content
Slide 37
Slide 37 text
No content
Slide 38
Slide 38 text
No content
Slide 39
Slide 39 text
s.id/yt_aswansyahputra
s.id/yt_aswansyahputra
Slide 40
Slide 40 text
Thanks!
aswansyahputra@sensolution.id
www.aswansyahputra.com
speakerdeck.com/
aswansyahputra
R Indonesia
www.r-indonesia.id