diff --git a/_assets/objs/2024_whatif.csv b/_assets/objs/2024_whatif.csv new file mode 100644 index 0000000..f8850c7 --- /dev/null +++ b/_assets/objs/2024_whatif.csv @@ -0,0 +1,57 @@ +st,biden_pop,trump_pop,margin,biden_col,trump_col +AK,153778,189951,-36173,0,3 +AL,849624,1441170,-591546,0,9 +AR,423932,760647,-336715,0,6 +AZ,1672143,1661686,10457,11,0 +CA,11110639,6006518,5104121,54,0 +CO,1804352,1364607,439745,10,0 +CT,1080831,714717,366114,7,0 +DC,317323,18586,298737,3,0 +DE,296268,200603,95665,3,0 +FL,5297045,5668731,-371686,0,30 +GA,2473633,2461854,11779,16,0 +HI,366130,196864,169266,4,0 +IA,759061,897672,-138611,0,6 +ID,287021,554119,-267098,0,4 +IL,3471915,2446891,1025024,19,0 +IN,1242498,1729857,-487359,0,11 +KS,570323,771406,-201083,0,6 +KY,772474,1326646,-554172,0,8 +LA,856034,1255776,-399742,0,8 +MA,2382202,1167202,1215000,11,0 +MD,1985023,976414,1008609,10,0 +ME,435072,360737,74335,1,0 +ME1,266376,164045,102331,1,0 +ME2,168696,196692,-27996,0,2 +MI,2804040,2649852,154188,15,0 +MN,1717077,1484065,233012,10,0 +MO,1253014,1718736,-465722,0,10 +MS,539398,756764,-217366,0,6 +MT,244786,343602,-98816,0,4 +NC,2684292,2758775,-74483,0,16 +ND,115042,235751,-120709,0,3 +NE,374583,556846,-182263,0,1 +NE1,132261,180290,-48029,0,1 +NE2,176468,154377,22091,1,0 +NE3,65854,222179,-156325,0,2 +NH,424937,365660,59277,4,0 +NJ,2608400,1883313,725087,14,0 +NM,501614,401894,99720,5,0 +NV,703486,669890,33596,6,0 +NY,5244886,3251997,1992889,28,0 +OH,2679165,3154834,-475669,0,17 +OK,503890,1020280,-516390,0,7 +OR,1340383,958448,381935,8,0 +PA,3458229,3377674,80555,19,0 +RI,307486,199922,107564,4,0 +SC,1091541,1385103,-293562,0,9 +SD,150471,261043,-110572,0,3 +TN,1143711,1852475,-708764,0,11 +TX,5259126,5890347,-631221,0,40 +UT,560282,865140,-304858,0,6 +VA,2413568,1962430,451138,13,0 +VT,242820,112704,130116,3,0 +WA,2369612,1584651,784961,12,0 +WI,1630866,1610184,20682,10,0 +WV,235984,545382,-309398,0,4 +WY,73491,193559,-120068,0,3 diff --git a/_assets/scripts/whatif.jl b/_assets/scripts/whatif.jl new file mode 100644 index 0000000..be7d4b8 --- /dev/null +++ b/_assets/scripts/whatif.jl @@ -0,0 +1,83 @@ + +eighth = 0.99875 +quart = 0.9975 +half = 0.995 +full = 0.99 +oneqt = 0.9875 +onehf = 0.985 +oneful = 0.98 +twoqt = 0.9775 +twohf = 0.975 +twoful = 0.97 +fiver = 0.95 +tener = 0.9 +threeq = 0.75 +fifty = 0.5 + +start.full = start.biden_pop .* full +start.half = start.biden_pop .* half +start.quart = start.biden_pop .* quart +start.eighth = start.biden_pop .* eighth +start.oneqt = start.biden_pop .* oneqt +start.onehf = start.biden_pop .* onehf +start.oneful = start.biden_pop .* oneful +start.twoqt = start.biden_pop .* twoqt +start.twohf = start.biden_pop .* twohf +start.twoful = start.biden_pop .* twoful +start.fiver = start.biden_pop .* fiver +start.tener = start.biden_pop .* tener +start.threeq = start.biden_pop .* threeq +start.fifty = start.biden_pop .* fifty + +start.eighth_margin = start.eighth .- start.trump_pop +start.quart_margin = start.quart .- start.trump_pop +start.half_margin = start.half .- start.trump_pop +start.full_margin = start.full .- start.trump_pop +start.oneqt_margin = start.oneqt .- start.trump_pop +start.onehf_margin = start.onehf .- start.trump_pop +start.oneful_margin = start.oneful .- start.trump_pop +start.twoqt_margin = start.twoqt .- start.trump_pop +start.twohf_margin = start.twohf .- start.trump_pop +start.twoful_margin = start.twoful .- start.trump_pop +start.fiver_margin = start.fiver .- start.trump_pop +start.tener_margin = start.tener .- start.trump_pop +start.threeq_margin = start.threeq .- start.trump_pop +start.fifty_margin = start.fifty .- start.trump_pop + +for col in names(start) + if eltype(start[!, col]) == Float64 + start[!, col] = convert.(Int64, round.(start[!, col])) + end +end + +result_eighth = start[(start.margin .> 0) .& (start.eighth_margin .< 0) :] +result_quart = start[(start.margin .> 0) .& (start.quart_margin .< 0), :] +result_half = start[(start.margin .> 0) .& (start.half_margin .< 0), :] +result_full = start[(start.margin .> 0) .& (start.full_margin .< 0), :] +result_oneqt = start[(start.margin .> 0) .& (start.oneqt_margin .< 0), :] +result_onehf = start[(start.margin .> 0) .& (start.onehf_margin .< 0), :] +result_oneful = start[(start.margin .> 0) .& (start.oneful_margin .< 0),:] +result_twohf = start[(start.margin .> 0) .& (start.twohf_margin .< 0), :] +result_twoful = start[(start.margin .> 0) .& (start.twoful_margin .< 0),:] +result_twoqt = start[(start.margin .> 0) .& (start.twoqt_margin .< 0), :] +result_fiver = start[(start.margin .> 0) .& (start.fiver_margin .< 0), :] +result_tener = start[(start.margin .> 0) .& (start.tener_margin .< 0), :] +result_threeq = start[(start.margin .> 0) .& (start.threeq_margin .< 0), :] +result_fifty = start[(start.margin .> 0) .& (start.fifty_margin .< 0), :] + + +result_eighth[:,[1,10,11]] +result_quart[:,[1,7,8]] +result_half[:,[1,12,13]] +result_full[:,[1,14,15]] +result_oneqt[:,[1,16,19]] +result_onehf[:,[1,17,20]] +result_oneful[:,[1,18,21]] +result_twohf[:,[1,24,25]] +result_twoful[:,[1,22,23]] +result_twoqt[:,[1,26,27]] +result_fiver[:,[1,28,29]] +result_tener[:,[1,30,31]] +result_threeq[:,[1,32,33]] +result_fifty[:,[1,34,35]] + diff --git a/index.md b/index.md index ac285a3..686c0e8 100644 --- a/index.md +++ b/index.md @@ -2,7 +2,13 @@ title = "Latest" +++ -## Overall assessment +## Superseding event + +As of July 22, 2024, Vice President Harris will replace President Biden as the nominee of the Democratic Party and a new model will need to be developed to reflect that change. The plan is to aggregate the polls conducted in July prior to July 21, 2024 (when Biden withdrew) as the prior distribution, after introducing some variability to partially account for the added uncertainty. + +For polls conducted through the end of the month, the model will be updated and every fortnight thereafter. Consideration will also be given to reassessing swing states, depending on initial results. It is expected that most Blue and Red states will remain as such, but some swing states will move. + +## Overall assessment for polling through June ### Stringent view