Anyway a slightly annoying lack of a feature in DRA 2020 is lack of 2012 Data in states that get PVI and 2016 Data. This is because PVI is effectively calculated from a formula of an average of 2012+2016 two party vote share. So we have only one missing variable here, and a formula to calculate it so its pretty simple to just make a short program here that allows you to get some data if you wanted to see how your congressional district voted in 2012.
country = 48.2/(46.1+48.2)
country2012=51.1/(47.2+51.1)
C2016 = float(input("Input 2016 Clinton raw Votes or Percentage"))
T2016= float(input("Input 2016 Trump raw votes or Percentage"))
PV = float(input("Give PVI value 2012/2016 negative if R"))
PVI = PV/100
p2016= C2016/(C2016+T2016)
PVI2016=p2016-country
PVI2012 =2*PVI-PVI2016
Obama= PVI2012+country2012
print ("Obama share is",Obama*100)
print ("Romney share is",(1-Obama)*100)
It isn't a script but just lets you input 3 data values to get the 2012 TWO PARTY VOTE SHARE if you wanted it quicker than manually calculating it.
I was just listening to Joe Biden about learning to code, we all gotta start somewhere.
Anyway you can either type in the raw votes aka Clinton getting 23000 in a country and Trump getting 25000 or just give the percentage they got that is shown on DRA 2020. I would recommend typing in the raw votes as this reduces the risk of one of the possible rounding errors as my original rounding error when using the percentage like 2%.