Each week I download and process data from a hyperlink on a website, but each week the link changes as new data is uploaded to the site. The hyperlink text doesn't change, so wondering how I can just reference the text instead of updating the lengthy full length each week. The website is https://www.esd.wa.gov/labormarketinfo/unemployment-insurance-data. I'd ideally like to pull the data using the hyperlink tag "initial claims by county," but not versed enough perhaps in HTML to know how to do this. Any help most appreciated!
Below is the code I'm using:
IC_Claims_by_County <- "https://esdorchardstorage.blob.core.windows.net/esdwa/Default/ESDWAGOV/labor-market-info/Libraries/Regional-reports/UI-Claims-Karen/COVID19%20Docs/County%20weekly%20initial%20claims%20for%202020%20(21).xlsx"
download.file(IC_Claims_by_County,"UI_Initial_Claims_County.xlsx", method = "curl")
IC_Claims_by_County <- data.frame(read_excel("UI_Initial_Claims_County.xlsx", sheet = "Weekly county initial claims"))