Publications by Rachel Saidi
Document
Bar Charts (from Nicole Radziwill) For small data sets, you may have already tallied up your observations, and you don’t need to load a whole file in to create your bar chart. Here is an example of data generated by opening one package of regular M&Ms to look at the distribution of colors, working with your data as a vector. The counts are: 12...
411 sym R (299 sym/1 pcs) 1 img
Lab 5: Statistical Inference
library(tidyverse) library(openintro) library(infer) global_monitor <- tibble( scientist_work = c(rep("Benefits", 80000), rep("Doesn't benefit", 20000)) ) In this lab we will look at a dataset containing responses to the question “Do you believe that the work scientists do benefit people like you?” Visualize the distribution of responses wi...
18813 sym R (5051 sym/32 pcs) 5 img
Fast Food Lab
library(tidyverse) library(openintro) This week we will look at fast food data. The data set contains data on 515 menu items from some of the most popular fast food restaurants worldwide. Let’s examine the data: head(fastfood) ## # A tibble: 6 x 17 ## restaurant item calories cal_fat total_fat sat_fat trans_fat cholesterol ## <chr> <c...
19215 sym R (7191 sym/54 pcs) 29 img
Week 2 Air quality assignment
Load in the Dataset. Because airquality is a pre-built dataset, we can write it to our data directory to store it for later use. # install.packages("tidyverse") library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ─�...
2016 sym R (3839 sym/28 pcs) 6 img
MPG project - Draft 1
library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ── ## ✓ ggplot2 3.3.3 ✓ purrr 0.3.4 ## ✓ tibble 3.0.6 ✓ dplyr 1.0.4 ## ✓ tidyr 1.1.2 ✓ stringr 1.4.0 ## ✓ readr 1.4.0 ✓ f...
3052 sym R (922 sym/8 pcs) 4 img
Week 3: Probability: Kobe Bryant "Hot Hands" Lab
Probability The Hot Hand In this lab we will examine Kobe Bryant’s performance in the 2009 NBA finals, and whether or not he exhibited the fabled “hot hand”. This lab uses the “kobe_basket” dataset, which is included in the openintro package Load Packages library(tidyverse) library(openintro) set.seed(100) Exercise 1 A streak length ...
7722 sym R (1971 sym/18 pcs) 3 img
Week 5: Treemaps, Heatmaps, Streamgraphs, Alluvials
library(treemap) Registered S3 method overwritten by 'data.table': method from print.data.table library(tidyverse) Registered S3 methods overwritten by 'dbplyr': method from print.tbl_lazy print.tbl_sql ── Attaching packages ─────────────────────────...
10414 sym R (6430 sym/38 pcs) 6 img
webscrape lab
#Loading the rvest package library('rvest') #Specifying the url for desired website to be scraped url <- 'http://www.imdb.com/search/title?count=100&release_date=2016,2016&title_type=feature' #Reading the HTML code from the website webpage <- read_html(url) .text-primary #Using CSS selectors to scrape the rankings section rank_data_html <- html...
10937 sym R (12603 sym/62 pcs) 3 img
Math 217 Week 8 Lab
The nc dataset contains information on births recorded in North Carolina. With this dataset, we can examine the relationship between habits of expectant mothers and the birth of their children. library(tidyverse) Registered S3 methods overwritten by 'dbplyr': method from print.tbl_lazy print.tbl_sql ── Attaching pack...
11640 sym R (6988 sym/27 pcs) 8 img
Data 110 Week 7 Homework
library(tidyverse) setwd("~/Documents/Data\ 110/week7") nations <- read.csv("nations.csv") Create a new variable GDP by multiplying gdp_percap by population/1 trillion nations <- nations %>% mutate("GDP ($ trillion)" = gdp_percap*population/1000000000000) nations %>% filter(country %in% c("China", "Germany", "Japan", "United States")) %>% ggp...
1596 sym R (987 sym/6 pcs) 2 img