Modeling Election Results (user search)
       |           

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

  Talk Elections
  General Politics
  Political Geography & Demographics (Moderators: muon2, 100% pro-life no matter what)
  Modeling Election Results (search mode)
Pages: [1]
Author Topic: Modeling Election Results  (Read 2217 times)
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« on: July 08, 2017, 01:53:25 PM »

So I'm thinking of creating a website/software/thing that simulates election results and county maps. You would input the voting behavior of racial/economic/other demographics and the model would use PVI and demographic data to create a county map based on your input.

I would also want to have people be able to do things like set home regions for candidates to further affect the results.

If there is something like this, could someone direct me to it? If not, what would be the best way to go about it?
Logged
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« Reply #1 on: July 08, 2017, 03:52:52 PM »

Could you figure out an algorithm to measure GOP / DNC enthusiasm or some sort? That impacts the election outcome too.

What do you mean? Endorsements? Something else?
Logged
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« Reply #2 on: July 08, 2017, 09:04:30 PM »

I guess I'll start by brainstorming the demographics I want people to use in the model. I suppose I'll start with race:

Racial:
White
Hispanic
Asian
Latino

Are there any sources for data, or at least estimated data that shows what percent of each race is college educated/no-college? It would be nice to be able to model the wwc and the college educated whites seperately, as well as their minority counterparts, and a cursory look at census data didn't help.

I'm thinking that instead of using PVI, I should use a demographic ideology index, showing where people are more conservative and liberal than expected based solely on demographics, but I'm open to suggestions.

To conclude, I've tentatively decided to make this whole thing using google spreadsheets. I should note that I made this thread on a whim, and it turns out that thinking about this project is a really good way to satisfy my politics junkie tendencies, so I'm going to try to see this through.
Logged
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« Reply #3 on: July 09, 2017, 10:47:56 AM »

I guess I'll start by brainstorming the demographics I want people to use in the model. I suppose I'll start with race:

Racial:
White
Hispanic
Asian
Latino

Are there any sources for data, or at least estimated data that shows what percent of each race is college educated/no-college? It would be nice to be able to model the wwc and the college educated whites seperately, as well as their minority counterparts, and a cursory look at census data didn't help.

I'm thinking that instead of using PVI, I should use a demographic ideology index, showing where people are more conservative and liberal than expected based solely on demographics, but I'm open to suggestions.

To conclude, I've tentatively decided to make this whole thing using google spreadsheets. I should note that I made this thread on a whim, and it turns out that thinking about this project is a really good way to satisfy my politics junkie tendencies, so I'm going to try to see this through.

1) Hispanic is not a race
2) Latino is not a race
3) Every Latino is Hispanic
4) Not every Hispanic is Latino
5) Where are African-Americans???

I'm just figuring this out as I go. I'm using Hispanic as a 'race' because there is 1.census data on them and 2. they have wildly different voting patterns than other whites. You are right about missing AAs though.

-----------------------

Anyways, I just found fusiontables and I'm starting to fumble around in the interface. I think a significant chunk of my time will be spent figuring out how to get it to do stuff.

For simplicity's sake, I'm going to only use the 2016 results to calculate my DII. How I'm going to calculate it is by taking the census data for the county, multiply it with the CNN national exit poll two party percentages for each group, add percentages for each group to get a predicted result, and then subtract the result by the actual margin. I know its simplistic, but I'm working with the data I have right now.

The formula will go something like so:
((%of county pops of race*race's 2party democratic%)+same thing with other groups)-Actual 2party dem % in county

I'm expecting that most southern counties will have a very conservative DII, with the exception of the urban transplant areas, New England will have a very strong liberal DII, and I'm not sure about the rest of the country.

I'll try to get back when I have an Alabama DII cloropleth.

I'm not sure what the formula I'll use in the actual model, but I suppose I should get the DII down first.
Logged
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« Reply #4 on: July 09, 2017, 12:09:33 PM »

Fusion Tables is easy enough to learn (took me about two hours to really master the basics), but as far as I know, it can't be used to create an interactive web-based tool for others to use. You'd have to manually adjust the spreadsheet data for each iteration or change you wish to make and re-upload/merge it. If I'm wrong, however, and there is a way to make maps via FT that can be customized via input boxes/sliders/etc, then please let me know.

It's a fairly complex thing to teach, but really easy to do once learned. I used a tutorial to teach myself that's no longer online, but this one might also be useful (haven't read it, but looks thorough).

Basically, you start out by adding to Fusion Tables a map (this can be in KML format, or any number of others). This file should have both the location/geographic coordinates embedded in it to know the boundaries of each polygon (precinct, state, etc), as well as labels for each entity. You'll then upload a second file (containing your election data or whatever; usually .csv). After both have been uploaded, you'll go back to your map file and merge the other file with it. There's a part where you'll have to conjoin the data (i.e.: associating the columns of data from your results file with the polygons in the map file) while doing so. Once done (and if done properly), you'll have a working map. There are quite a few tinkers you'll need to do to get it all working.

Huh. I guess I'll use fusiontables to make DII maps and then use some other thing to make the main part.
Logged
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« Reply #5 on: July 09, 2017, 01:32:39 PM »

OK, so I started working on making the DII real, and it's taking a lot of effort. I have gone through the first 10 AL counties worth of data, tested if I could use spreadsheet data for cloropleths in fusiontables,etc for the past half-hour or so. All 10 counties have a conservative DII, as expected. I should note that I did not record mixed-race and Islanders data.

If anyone has a faster way to collect data, let me know.

A copy of the spreadsheet I'm using, feel free to add to it or look at the data I'm working with or criticize my math:
https://docs.google.com/spreadsheets/d/19R30g4SPsyEYNyQ4ehLwONW4nL-HuwUmfhusDwIPEpo/edit?usp=sharing
Logged
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« Reply #6 on: July 10, 2017, 04:53:38 PM »

I have completed the DII for the state of Alabama. This is a good thing for the project since it means I won't need to go back again to get the census data for the state in other parts of my work. I have a suspicion that the DII will be slightly conservative biased since I am relying on census data for the demographics, while the actual electorate might be off by anywhere from 1-10% from that. This distortion to the DII is sort of a good thing, however, since I won't really be able to adjust for turnout for a while, and this will be a weird sort of backstop to account for that in the early stages of the interactive.

I would like to request help from members of the forum. TD, I'm going to PM you the link to a blank spreadsheet with the relevant fields after I post this, and if anyone would like to receive it, PM me.

The link to my work:
https://www.google.com/fusiontables/DataSource?docid=1A_ul8nJTMOxyhGkN60aMPXMAwy7Y4ejAu0qDReYP

And a copy of the spreadsheet I put my data in:
https://docs.google.com/spreadsheets/d/1fpw9c37UKaoPuNPstSPjRDSqDew0j8rIWdNOrQBt95M/edit?usp=sharing


As expected, the entire state was extremely conservative on the DII, with only a single Black belt county in liberal numbers. However, Central,Far northern, and gulf alabama were less conservative than northern and southeastern alabama. Any reason for this?
Logged
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« Reply #7 on: July 10, 2017, 05:39:39 PM »

I guess I'll start by brainstorming the demographics I want people to use in the model. I suppose I'll start with race:

Racial:
White
Hispanic
Asian
Latino

Are there any sources for data, or at least estimated data that shows what percent of each race is college educated/no-college? It would be nice to be able to model the wwc and the college educated whites seperately, as well as their minority counterparts, and a cursory look at census data didn't help.

I'm thinking that instead of using PVI, I should use a demographic ideology index, showing where people are more conservative and liberal than expected based solely on demographics, but I'm open to suggestions.

To conclude, I've tentatively decided to make this whole thing using google spreadsheets. I should note that I made this thread on a whim, and it turns out that thinking about this project is a really good way to satisfy my politics junkie tendencies, so I'm going to try to see this through.

1) Hispanic is not a race
2) Latino is not a race
3) Every Latino is Hispanic
4) Not every Hispanic is Latino
5) Where are African-Americans???

I'm just figuring this out as I go. I'm using Hispanic as a 'race' because there is 1.census data on them and 2. they have wildly different voting patterns than other whites. You are right about missing AAs though.

That doesn't explain the separate Latino category...

It's fine. That was me being an idiot, and didn't reflect the categories I ended up using
Logged
GlobeSoc
The walrus
Jr. Member
***
Posts: 1,980


« Reply #8 on: July 11, 2017, 02:00:45 PM »

I have the idea of splitting the white demographic based on college education rates in the county as a whole. So if a county is 2/3ds college educated, then 2/3ds of its whites would be considered part of the college educated demographic
Logged
Pages: [1]  
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.029 seconds with 13 queries.