Student Notes Template (Replace Title With Day or Section Number)

Author

Me, Scientist

Published

September 6, 2024

Code
#We'll load the packages we'll need
library(tidyverse) #tidyverse ecosystem
library(tidymodels) #tidy modeling framework
library(palmerpenguins) #penguins data
library(patchwork) #easy plot arrangements
library(kableExtra) #formatting table outputs

#Set kable table printing options for HTML output
options(kable_styling_bootstrap_options = c("hover", "striped"))

#Set ggplot base theme
theme_set(theme_bw(base_size = 14))

General Note: You should keep a copy of this template on your computer. Open it at the beginning of each class period, and use File -> Save As to save a new copy corresponding to that class period. This way you’ll have a notebook for each individual class meeting and you won’t ever overwrite the template file or your previous notes, on accident.

Add your own description of the topic…You can type text freely outside of the code chunks.

Read in Data

We’ll start the semester with pre-built notes utilizing the palmer penguins data. Since those notes are pre-built with all of the necessary code and output, I think its a good idea to rewrite your own notes using a different data set. I’m reading in a TidyTuesday dataset on rental properties in the San Francisco area. You are certainly free to choose a different dataset if you’d like though! You can even switch it up from class meeting to class meeting if you are feeling adventurous.

#Penguins Data
penguins <- penguins

#SF Rentals Data
rent <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-07-05/rent.csv')
#permits <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-07-05/sf_permits.csv')
#new_construction <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-07-05/new_construction.csv')

rent %>% 
  head() %>%
  kable() %>%
  kable_styling()
post_id date year nhood city county price beds baths sqft room_in_apt address lat lon title descr details
pre2013_134138 20050111 2005 alameda alameda alameda 1250 2 2 NA 0 NA NA NA $1250 / 2br - 2BR/2BA 1145 ALAMEDA DE LAS PULGAS NA NA
pre2013_135669 20050126 2005 alameda alameda alameda 1295 2 NA NA 0 NA NA NA $1295 / 2br - Walk the Beach! 1 FREE MONTH + $500 TRADER JOES SHOPPING CERTIFICATE NA NA
pre2013_127127 20041017 2004 alameda alameda alameda 1100 2 NA NA 0 NA NA NA $1100 / 2br - cottage NA NA
pre2013_68671 20120601 2012 alameda alameda alameda 1425 1 NA 735 0 NA NA NA $1425 / 1br - 735ft² - BEST LOCATION SOUTHSHORE GARDENS APARTMENTS NA NA
pre2013_127580 20041021 2004 alameda alameda alameda 890 1 NA NA 0 NA NA NA $890 / 1br - Classy "Painted Lady" VICTORIAN - Top Floor w/ Sunporch! NA NA
pre2013_152345 20060411 2006 alameda alameda alameda 825 1 NA NA 0 NA NA NA $825 / 1br - Bayview Apartments NA NA

Continue On…