I\'m adding the rSquared to a chart using the method outlined in this answer:
r2 = alt.Chart(df).transform_regression(\'x\', \'y\', params=True ).mark_text().enco