Extracts and summarizes all rating information on a professor.

ratings_info(url, y = 2018)

Arguments

url

A character value indicating the URL of the professor's webpage.

y

A numeric value to filter ratings after a certain year.

Value

A list of 1 total number of ratings and 2 data frames

  • n - Number of ratings after filtering

  • ratings - All rating information after a given year

  • summary - Summary statistics

Examples

url <- 'https://www.ratemyprofessors.com/ShowRatings.jsp?tid=2036448'
ratings_info(url = url)
#> $n
#> [1] 6
#> 
#> $ratings
#>   Year   Course Overall Quality Difficulty Take_again For_credit Textbooks
#> 1 2021  STAT231       5       5          3       TRUE       TRUE      TRUE
#> 2 2020  STAT231       5       5          3       TRUE       TRUE      TRUE
#> 3 2019  STAT231       5       5          1       TRUE       TRUE      TRUE
#> 4 2019  STAT231       5       5          3       TRUE       TRUE      TRUE
#> 5 2019  STAT231       5       5          4       TRUE       TRUE      TRUE
#> 6 2018  STAT588       5       5          4       TRUE       TRUE      TRUE
#>   Attendance Grade
#> 1      FALSE     A
#> 2      FALSE  <NA>
#> 3         NA    A+
#> 4      FALSE     A
#> 5         NA     A
#> 6      FALSE    B-
#> 
#> $summary
#>   avgRating avgQuality avgDifficulty percentTakeAgain percentForCredit
#> 1         5          5             3              100              100
#>   percentTextbook percentAttendance
#> 1             100                 0
#>