Name: Mike Wood
Party: Conservative
Constituency: Stafford
Err, Stafford has been Labour since the last election, and before that it was a Conservative, but it was Theodora Clarke. Mike Wood is MP for Kingswinford and South Staffordshire.Surely the way you build something like this is a postcode -> constituency table (I assume available free), a constituency -> mp table, and mp -> image generation (with caching or generate multiple versions)
Even if the lookup data mis-selected the constituency (I think some postcodes can straddle constituencies), surely the Constituency/Name/Party would be consistent.
I'm guessing you're using chat-gpt for the entire program?
Seems odd, but probably wouldn't be noticed by an automated validator anyway.
Had to make sure to implement this so that I didn't end up generating duplicates.
Most MPs' home addresses are actually quite easy to find. Mine's was printed below his name on the ballot paper last election – a nice reminder of how we used to have a high-trust society. I doubt this practice will be continued for much longer.