







































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








































































Mochamad Kautzar Ichramsyah Senior Data Analyst - Traveloka ICW-HDDA-X 2020
About Data Wrangling (2)
https://www.nytimes.com/2014/08/18/technology/for-big-data-scientists-hurdle-to-insights-is-janitor-work.html
Data Wrangling Using R (2)
Data Wrangling Using R (3)
devtools
EDAWR
install.packages('devtools') library(devtools) install_github('rstudio/EDAWR') library(EDAWR)
?storms ?cases ?pollution ?tb
Tidying Data Using tidyr (2)
Easy to access
Preserves observations
Tidying Data Using tidyr (3)
tidyr
Tidying Data Using tidyr (5)
key = 'year' (former column names) value = 'count' (former cells)
Tidying Data Using tidyr (6)
gather(cases, 'year', 'count', 2:4)
Function to reshape the data frame.
Collapses multiple columns into two columns.
Name of the new key column. String.
Name of the new value column. String.
Names or numeric indexes of columns to collapse.
Data frame to reshape.
Tidying Data Using tidyr (8)
key = size (former column1 names) value = amount (former column2 names)
Tidying Data Using tidyr (9)
spread(pollution, size, amount)
Function to reshape the data frame.
Generates multiple columns from two columns.
Column to use for keys, create new column names.
Column to use for values, create new column cells.
Data frame to reshape.