You can either log in to RStudio here or you can find install R and RStudio for free on any computer and work there (although in that case you will need to install the dplyr and readr packages) or work in the CRC if someone will let you in.
The following code grabs data on Iowa polls and pollster quality, filters out lousy pollsters and weighs polls so that more recent polls receive more weight. You should make your own tweaks to this code.
library(dplyr); library(readr)
polls_url <- "https://projects.fivethirtyeight.com/polls-page/president_primary_polls.csv"
polls <- read_csv(polls_url)
dem_primary_polls <- polls %>% filter(stage=="primary", party=="DEM", state=="Iowa")
dem_primary_polls <- dem_primary_polls %>%
mutate(start_date=as.Date(start_date, "%m/%d/%y"),
end_date=as.Date(end_date, "%m/%d/%y"),
create_date=as.Date(created_at, "%m/%d/%y")
)
grades_url <- "https://raw.githubusercontent.com/jfcross4/data/master/fte_grades.csv"
grades <- read_csv(grades_url)
dem_primary_polls <- left_join(dem_primary_polls, grades, by="fte_grade")
dem_primary_polls <- dem_primary_polls %>% filter(fte_num_grade<= 12)
# filtering out bad polls
dem_primary_polls %>% filter(!is.na(fte_num_grade)) %>%
mutate(days_before_iowa = as.numeric(as.Date("2020/02/03")-end_date),
iowa_weight = (0.98^days_before_iowa)) %>%
group_by(answer) %>% arrange(desc(end_date)) %>%
summarize(simple_polling_avg = mean(pct),
weighted_polling_avg = sum(pct*iowa_weight)/sum(iowa_weight),
num_polls = n(),
most_recent_poll = first(end_date)) %>%
filter(num_polls > 10, simple_polling_avg >=2) %>%
arrange(desc(weighted_polling_avg)) %>%
filter(most_recent_poll > "2020/01/01")