Unfortunately, the website I used to scrape the data only had 2 years of data. But each datapoint is looking at each individual analyst rating and price target for a stock and then comparing it to the price in 1 year. However, you are correct that datapoints during a downturn would be quite different.
Founder of MarketBeat (website mentioned) here. We do have more than two years of data (more like 7), but profile pages get too large when we publish it all in one shot. We can make the full history available as a giant CSV file if there's a researcher that wants to do a similar analysis over a long period of time.
Hey, I'm no longer affiliated with any site. If you're looking for data - I'd compare the TipRanks data set as well. I've found it to be a lot bigger than MarketBeat's and fairly more accurate. Data collection is automated through natural language processing and cross-validated with machine learning techniques that guarantees a much higher accuracy.
I'm not sure who you should reach out to there - but I think support [at] tipranks.com should work.
Things might have changed since I parted ways with TipRanks though - but you probably want both data sets for comparison.