Publications by Amanda Simpson
Apply 2
Import Data youtube <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-03-02/youtube.csv') ## Rows: 247 Columns: 25 ## ── Column specification ─────────────────────────────────────────────────�...
270 sym R (33571 sym/28 pcs) 4 img 5 tbl
Code Along 2
Goal: Predict the rental prices in the SF rental market Click here for the data. Import Data rent <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-07-05/rent.csv') ## Rows: 200796 Columns: 17 ## ── Column specification ───────────────────────...
313 sym R (38265 sym/27 pcs) 4 img 3 tbl
Apply 1
Import Data youtube <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-03-02/youtube.csv') ## Rows: 247 Columns: 25 ## ── Column specification ─────────────────────────────────────────────────�...
228 sym 4 img 5 tbl
Code Along 1
Goal: Predict the rental prices in the SF rental market Click here for the data. Import Data rent <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-07-05/rent.csv') ## Rows: 200796 Columns: 17 ## ── Column specification ───────────────────────...
305 sym 4 img 3 tbl
Conclusion
Import Data results <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-09-07/results.csv') ## Warning: One or more parsing issues, see `problems()` for details ## Rows: 25220 Columns: 18 ## ── Column specification ──────────────────────────...
106 sym Python (3470 sym/9 pcs) 1 img
Code Along 12
Import your data data("mtcars") Repeat the same operation over different columns of a data frame Case of numeric variables mtcars %>% # mutate(char_var = "A") %>% map(mean) # map(.x = ., .f = mean) ## $mpg ## [1] 20.09062 ## ## $cyl ## [1] 6.1875 ## ## $disp ## [1] 230.7219 ## ## $hp ## [1] 146.6875 ## ## $drat ## [1]...
446 sym 3 tbl
Code Along 12
Ch20 Vectors 1 Introduction 2 Vector basics 3 Important types of atomic vector 4 Using atomic vectors sample(10) + 10 ## [1] 11 16 15 20 19 14 13 18 17 12 1:10 + 1:2 ## [1] 2 4 4 6 6 8 8 10 10 12 1:10 + 1:3 ## Warning in 1:10 + 1:3: longer object length is not a multiple of shorter object ## length ## [1] 2 4 6 5 7 9 8 10 12 1...
360 sym Python (2224 sym/52 pcs)
Apply 11
Import your data data(flights) flights %>% skimr::skim() Data summary Name Piped data Number of rows 336776 Number of columns 19 _______________________ Column type frequency: character 4 numeric 14 POSIXct 1 ________________________ Group variables None Variable type: character skim_variable n_missing complete_rate min max empty n_u...
589 sym 7 tbl
Code Along 11
Ch19 Functions Introduction When should you write a function? # For reproducible work set.seed(1234) # Creat a data frame df <- tibble::tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) # Rescale each column df$a <- (df$a - min(df$a, na.rm = TRUE)) / (max(df$a, na.rm = TRUE) - min(df$a, na.rm = TRUE)) df$b...
293 sym
Code Along 10
Import your data results <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-09-07/results.csv') ## Warning: One or more parsing issues, see `problems()` for details ## Rows: 25220 Columns: 18 ## ── Column specification ────────────────────────�...
344 sym 2 img 3 tbl