Is there a way to determine 2012 presidential margin for a city on DRA for Texas by using PVI President 2012/2016 or Composite 2012-2016?
Yeah use PVI and reverse that
Here's a python code that just requires raw vote or percentage for 2016
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)