Skip to content

Commit

Permalink
Revised several pages
Browse files Browse the repository at this point in the history
technocrat committed May 9, 2024
1 parent 6d0056b commit 9d09dda
Showing 29 changed files with 10,896 additions and 361 deletions.
17 changes: 17 additions & 0 deletions 12th.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,23 @@ title = "Twelfth Amendment"

If **President Biden wins only Pennsylvania, Michigan and Wisconsin** the outcome will be a 269-269 tie in the Electoral College. This assumes that Biden does not win Georgia, North Carolina, Arizona or Nevada, each of which Trump wins. Otherwise, every remaining state is won by the candidate who won it in 2020.

## Without the Nebraska Second

The models assume that except for the seven swing states, each candidate will win the states and election districts won in 2020. For Biden, the total includes a Nebraska
district that centers on Omaha. Nebraska is one of two states that have this arrangement. The other is Maine. An attempt was made earlier this year to change Nebraska to the winner-take-all system used by other states. It was unsuccessful, and it is not clear if another attempt will be made. It could be added to a special session anticipated for July to deal with property tax relief. Should winner take all be implement or if the Nebraska Second this time votes for Trump, possible outcomes differ.

A tie outcome that was produced by Biden winning only Wisconsin, Michigan and Pennsylvania, now has three different possible scenarios

* Wisconsin, Georgia and Pennsylvania
* Wisconsin, Pennsylvania and North Carolina
* Arizona, Michigan and Pennsylvania

Those three scenarios, which were formally wins, are replaced as the smallest possible victories by

* Nevada, Wisconsin, Arizona and Pennsylvania
* Arizona, Georgia and Pennsylvania
* Arizona, Pennsylvania and NC North Carolina

## Constitutional framework for a tied vote

> The person having the greatest number of votes for President, shall be the President, if such number be a majority of the whole number of Electors appointed; and if no person have such majority, then from the persons having the highest numbers not exceeding three on the list of those voted for as President, the House of Representatives shall choose immediately, by ballot, the President. But in choosing the President, the **votes shall be taken by states, the representation from each state having one vote**; a quorum for this purpose shall consist of a member or members from two-thirds of the states, and **a majority of all the states shall be necessary to a choice**.
346 changes: 346 additions & 0 deletions _assets/data/ACS.csv

Large diffs are not rendered by default.

Binary file not shown.
10 changes: 10 additions & 0 deletions _assets/data/newvoters.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Gender,Arizona,Georgia,Michigan,Nevada,North Carolina,Pennsylvania,Wisconsin
M14,49314,76728,64878,20648,69120,80041,38868
M15,49487,76928,66271,20690,69202,80113,38736
M16,49613,76829,67403,20669,69441,81130,39287
M17,48604,75491,66978,20348,68463,80446,38025
F14,46967,73160,62026,19669,66133,75657,36904
F15,47416,73275,62115,19677,66411,76125,36639
F16,46989,74000,64352,19232,66083,77305,37258
F17,45872,71978,63572,19027,65174,75934,35825
New voters,384262,598389,517595,159960,540027,626751,301542
10 changes: 10 additions & 0 deletions _assets/scripts/cohorts.jl
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@ end
cohort2020 = CSV.read("../data/2020age.csv",DataFrame)
cohort2022 = CSV.read("../data/2022age.csv",DataFrame)

using Missings
cohort2022.vot = map(Int64, collect(skipmissing(cohort2022.vot)))

meta_info_2020 = Dict(
:source => "U.S. Census Bureau, Current Population Survey, November 2022",
:url => "https://www.census.gov/data/tables/time-series/demo/voting-and-registration/p20-585.html",
@@ -28,3 +31,10 @@ meta_cohort_2022 = MetaFrames(meta_info_2022, cohort2022)

@save "../objs/meta_cohort_2020.bson" meta_cohort_2020
@save "../objs/meta_cohort_2022.bson" meta_cohort_2022


cohort2020 = cohort2020[cohort2020.cohort .== "18 to 24", :]
cohort2022 = cohort2022[cohort2022.cohort .== "18 to 24 years", :]



13 changes: 12 additions & 1 deletion _assets/scripts/func.jl
Original file line number Diff line number Diff line change
@@ -39,4 +39,15 @@ meta_info = Dict(
:title => "Table 4c. Reported Voting and Registration of the Total Voting-Age Population, by Age, for States: November 2022",
:url => "https://www.census.gov/data/tables/time-series/demo/voting-and-registration/p20-586.html",
:title => "Table 4c. Reported Voting and Registration of the Total Voting-Age Population, by Age, for States: November 2022")
"""
"""

function radix(df::DataFrame)
for col in names(df)
if eltype(df[:, col]) == Int64
df[:, col] = format.(df[:, col], commas=true)
end
end
end

# Display the formatted DataFrame
display(kids)
85 changes: 85 additions & 0 deletions _assets/scripts/insert_may.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
using BSON: @save, @load
using LinearAlgebra
using PrettyTables
using Printf
using Serialization
using Statistics
using StatsPlots
using Turing

const DESIGN_ERROR = 0.012

@enum Month mar apr may jun jul aug sep oct nov

@enum Pollster begin
bi2
bi3
bl2
bl3
cb2
cb3
cn2
cn3
ec2
ec3
fm2
fm3
fo2
fo3
hi2
hi3
ma2
ma3
mi2
mi3
mr2
mr3
qi2
qi3
sp2
sp3
su2
su3
wa2
wa3
ws2
ws3l
ws3s
end

@enum State PA GA NC MI AZ WI NV

struct Poll
biden_support::Float64
trump_support::Float64
sample_size::Int
end
#

@load "../objs/apr_polls.bson" months

"""
months[may][AZ][bl2] = [Poll(43,49, 801)]
months[may][AZ][ec2] = [Poll(44,48,1000)]
months[may][GA][bl2] = [Poll(45,47, 802)]
months[may][GA][ec2] = [Poll(44,47,1000)]
months[may][GA][fo2] = [Poll(45,51,1128)]
months[may][MI][bi2] = [Poll(43,51, 708)]
months[may][MI][ec2] = [Poll(44,45,1000)]
months[may][MI][fo2] = [Poll(46,49,1106)]
months[may][MI][mr2] = [Poll(46,42, 600)]
months[may][NC][ec2] = [Poll(42,47,1000)]
months[may][NC][bl2] = [Poll(41,51, 703)]
months[may][NC][ma2] = [Poll(43,49, 645)]
months[may][NC][qi2] = [Poll(46,48,1401)]
months[may][NV][ec2] = [Poll(44,45,1000)]
months[may][PA][bi2] = [Poll(46,47, 803)]
months[may][PA][ec2] = [Poll(45,47,1000)]
months[may][WI][bl2] = [Poll(44,48, 703)]
months[may][WI][ec2] = [Poll(45,47,1000)]
"""
months[may][WI][qi2] = [Poll(50,44,1497)]

# @save "../objs/may_polls.bson" months


7 changes: 4 additions & 3 deletions _assets/scripts/state_level.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
include("bayes_head.jl")

function filter_empty_entries(dict::Dict{Pollster, Vector{Poll}})
return Dict(poll=> polls for (poll, polls) in dict if !isempty(polls))
end

using BSON: @save, @load
@load "../objs/apr_polls.bson" months
#@load "../objs/apr_polls.bson" months

MO = apr
ST = GA
MO = may
ST = WI

current_mon = filter_empty_entries(months[MO][ST])

2 changes: 2 additions & 0 deletions _layout/sidebar.html
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@
<li class="pure-menu-item {{ispage menu7/*}}pure-menu-selected{{end}}"><a href="/wi/" class="pure-menu-link">Wisconsin (10)</a></li>
<li class="pure-menu-item {{ispage menu8/*}}pure-menu-selected{{end}}"><a href="/nv/" class="pure-menu-link">Nevada (6)</a></li>
<li class="pure-menu-item {{ispage menu11/*}}pure-menu-selected{{end}}"><a href="/12th/" class="pure-menu-link">Tie vote</a></li>
<li class="pure-menu-item {{ispage menu11/*}}pure-menu-selected{{end}}"><a href="/newvoters/" class="pure-menu-link">New voters</a></li>
<li class="pure-menu-item {{ispage menu11/*}}pure-menu-selected{{end}}"><a href="/voting/" class="pure-menu-link">Election rules</a></li>
<li class="pure-menu-item {{ispage menu11/*}}pure-menu-selected{{end}}"><a href="/method/" class="pure-menu-link">Methodology</a></li>
<li class="pure-menu-item {{ispage menu10/*}}pure-menu-selected{{end}}"><a href="/doc/" class="pure-menu-link">Resources</a></li>
<li class="pure-menu-item {{ispage
Loading

0 comments on commit 9d09dda

Please sign in to comment.