theopensystemslab / fairhold-dashboard

https://fairhold-dashboard.vercel.app
0 stars 0 forks source link

fix: switch `hpi` table to 2000 data for social rent formula #106

Closed zz-hh-aa closed 2 weeks ago

zz-hh-aa commented 3 weeks ago

What does this PR do?

Why?

While tidying up the social rent calculations, I realised that we were pulling in an incorrect figure for local property prices (used to calculate relative property prices). Like with relative earnings, which uses values for 1999 as inputs to the formula, the relative property price should use hpi_2000 (as far back as the house price index goes) and divide that by the national average price from 1999, rather than hpi_2020 as we had before. See formula rent documentation here.

I updated the Vercel database, and thus had to update schema.prisma too.

For some reason prisma db pull doesn't work, so we have to use load-env-and-prisma.js, which I've now added a shortcut for with the script prisma:pull.

vercel[bot] commented 3 weeks ago

@zz-hh-aa is attempting to deploy a commit to the Open Systems Lab's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:

To read more about collaboration on Vercel, click here.