Is there a way to determine 2012 presidential margin for a city on DRA?
       |           

Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 04:40:14 AM
News: Election Simulator 2.0 Released. Senate/Gubernatorial maps, proportional electoral votes, and more - Read more

  Talk Elections
  About this Site
  The Atlas
  Is there a way to determine 2012 presidential margin for a city on DRA?
« previous next »
Pages: [1]
Author Topic: Is there a way to determine 2012 presidential margin for a city on DRA?  (Read 739 times)
perpetual_cynic
erwint.2021
Jr. Member
***
Posts: 319
United States


Show only this user's posts in this thread
« on: July 22, 2021, 11:31:04 PM »

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?
Logged
lfromnj
Atlas Politician
Atlas Icon
*****
Posts: 19,217


Show only this user's posts in this thread
« Reply #1 on: July 23, 2021, 10:50:23 AM »

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
Quote
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)
Logged
perpetual_cynic
erwint.2021
Jr. Member
***
Posts: 319
United States


Show only this user's posts in this thread
« Reply #2 on: July 23, 2021, 10:55:38 AM »

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
Quote
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)

Thank you so much. I was thinking there was a way via PVI, although it seems that there is something off about the percentages on DRA. In 2016, the Dem % was off by over 1% in Dallas Co.
Logged
Pages: [1]  
« previous next »
Jump to:  


Login with username, password and session length

Terms of Service - DMCA Agent and Policy - Privacy Policy and Cookies

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Page created in 0.022 seconds with 13 queries.