library(tidyverse)Warning: package 'tidyverse' was built under R version 4.5.2
Warning: package 'ggplot2' was built under R version 4.5.2
Warning: package 'tibble' was built under R version 4.5.2
Warning: package 'readr' was built under R version 4.5.2
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.6
✔ forcats 1.0.1 ✔ stringr 1.5.2
✔ ggplot2 4.0.1 ✔ tibble 3.3.1
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.1.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
sql_url <- "https://raw.githubusercontent.com/samanthabarbaro/data607/refs/heads/main/moviedata_CSV.csv"
#read and convert blanks and NULL to NA
movie_data <- read.csv(sql_url, na = c("", "NA", "null", "NULL"))
glimpse(movie_data)Rows: 6
Columns: 11
$ viewer <chr> "anne", "cat", "greta", "james", "jeff", "nico"
$ iron_man <int> 1, NA, NA, 2, NA, 5
$ captain_america <int> 2, NA, 4, 5, NA, NA
$ avengers <int> 3, NA, 3, NA, 4, 2
$ super_man <int> NA, 5, NA, 2, 1, 2
$ birds_of_prey <int> 5, 4, NA, NA, NA, 5
$ the_suicide_squad <int> 4, NA, NA, 4, NA, 4
$ the_grinch <int> 1, 2, NA, 3, NA, NA
$ the_holiday <int> 1, 4, NA, 2, NA, NA
$ love_actually <int> 2, NA, NA, 5, 5, NA
$ rudolph <int> 1, 4, NA, NA, 5, NA