year <- 2002:2023
var <- paste0(
"sped",
str_sub(year, start = 3, end = 4),
str_pad(year - 1999, side = "left", pad = "0", width = 2)
)
url <- paste0(
"https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=",
var
)
url
[1] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped0203"
[2] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped0304"
[3] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped0405"
[4] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped0506"
[5] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped0607"
[6] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped0708"
[7] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped0809"
[8] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped0910"
[9] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1011"
[10] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1112"
[11] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1213"
[12] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1314"
[13] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1415"
[14] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1516"
[15] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1617"
[16] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1718"
[17] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1819"
[18] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped1920"
[19] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped2021"
[20] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped2122"
[21] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped2223"
[22] "https://www.doe.mass.edu/infoservices/reports/enroll/default.html?yr=sped2324"