r for absolute beginners and aspiring data scientists · articles/ how—tos/getting started with r...

22
Gebruikersdag 2018 R for Absolute Beginners and Aspiring Data Scientists Jen Stirrup

Upload: others

Post on 02-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Gebruikersdag 2018

R for Absolute Beginners and Aspiring Data ScientistsJen Stirrup

Page 2: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Literate Programming - Notebooks

Page 3: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Literate Programming - Notebooks

Page 4: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

RStudio

Page 5: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidy Data

Tidy code is easier to write, read, maintain and frequently even faster than the base R counterparts.

Page 6: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidy Data

Page 7: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidy Data

Page 8: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidy Data

Page 9: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidyverse

Core Packages Data Manipulation Data Import Modelling

ggplot2 hms DBI modelr

dplyr stringer haven broom

tidyr lubridate httr

readr forcats jsonlite

purrr readxl

tibble xml2

Page 10: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidyverse Core Packages

ggplot2

tibbledplyr

purrr

tidyr

tibble

Page 11: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

What we will cover today...

ggplot2

tibbledplyr

purrr

tidyr

tibble

Page 12: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidy Data

Page 13: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidy Data

https://www.rstudio.com/resources/cheatsheets/

Page 14: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidy Data

https://www.rstudio.com/resources/cheatsheets/

http://readr.tidyverse.org

Page 15: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Tidy Data

Data Source: World Bank Data

We can compare the life expectancy of different countries in order to understand the ‘WHY’ of the data.

Page 16: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

https://cran.r-project.org/web/packages/readr/readr.pdf

readr

Page 17: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

dplyr

Page 18: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

dplyr

Page 19: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

dplyr

dplyr SQL

SELECT SELECT

FILTER WHERE

MUTATE Creating a calculation in the select statement

GROUP BY GROUP BY

Summarize SUM(), AVG() etc with GROUP BY

Page 20: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

ggplot2

Page 21: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Limitations of Running R in Power BI

Page 22: R for Absolute Beginners and Aspiring Data Scientists · articles/ How—Tos/Getting Started with R in RStudio/Screen Shot As you can see from the image, the upper left pane (where

Gebruikersdag 2018

Bedankt!Vergeet niet de evaluatie in te vullen!Scan de QR code.