Here is a ResourceFunction. I will never be able to polish it in time for the real Wolfram Function Repository and, if I did, it would need to be far more general. But here is a resource function dealing with the 2020 US Presidential election. The computation is done as a “Biden fraction,” but one can readily obtain the Trump fraction if one is so inclined. No advanced math whatsoever, but it still strikes me as useful. I’ve also written a little FormFunction to create a very unpolished web app. The code of the function and form page is embedded below.
– you have earned Featured Contributor Badge ![]()
Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!
Biden needs half of the votes remaining in Georgia to win the race. Thanks @Seth Chandler for the function and form page.
I used the resource above with data from Pennsylvania Secretary of State —
I entered the ballots counted for Trump and Biden up through November 3rd in Pennsylvania.
Trump 2,730,751 - Biden 1,408,658.
Trump won 66 of 67 counties the first day, Biden won 1 county. The total above was 60.6% of the final when all mail ballots were counted.
The final data gave Biden 13 counties with amazing margins, the extra votes were not uniformly distributed some counties really loved the mail
Biden needed only 76% of those votes, enough to win but not needing 100%.
The mail votes were Trump 594,156 - Biden 1,993,186. Biden had 77% just short of 2,000,000, wow, what a victory. But this resource could have predicted that.


