Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

● 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()

Slide 20

Slide 20 text

How can I chain?

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

1. diputar 2. dijilat 3. dicelupin 4. dimakan :D

Slide 23

Slide 23 text

1. putar(apa) 2. jilat(apa, berapa_kali) 3. celup(apa, ke) 4. makan(apa, output)

Slide 24

Slide 24 text

a > oreo_putar ← putar(apa = “oreo”) > oreo_jilat ← jilat(apa = oreo_putar, berapa_kali = 2) > oreo_celup ← celup(apa = oreo_jilat, ke = “susu”) > makan(apa = oreo_celup, output = “kenyang.perut”)

Slide 25

Slide 25 text

> oreo_putar ← putar(apa = “oreo”) > oreo_jilat ← jilat(apa = oreo_putar, berapa_kali = 2) > oreo_celup ← celup(apa = oreo_jilat, ke = “susu”) > makan(apa = oreo_celup, output = “kenyang.perut”) a

Slide 26

Slide 26 text

> makan( celup( jilat( putar(apa = “oreo”), berapa_kali = 2 ), ke = “susu” ), output = “kenyang.perut” ) b

Slide 27

Slide 27 text

function(arg1, arg2, arg3,...) arg1 %>% function(arg2, arg3,...) function(arg1, arg2, arg3,...) arg2 %>% function(arg1, arg2=.,arg3,...) magrittr

Slide 28

Slide 28 text

> putar(apa = “oreo”) %>% jilat(berapa_kali = 2) %>% celup(ke = “susu”) %>% makan(output = “kenyang.perut”) c

Slide 29

Slide 29 text

What to do today?

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

www.onepiece.fandom.com www.onepiece.fandom.com

Slide 32

Slide 32 text

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