-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
6d0056b
commit 9d09dda
Showing
29 changed files
with
10,896 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.