For this simulation / estimation / optimization task, Julia was great! I used:
* Julia for succinctly expressing the logic and simulation
* Turing.jl for estimation based on polling data
* DuckDB for storage and fast analytic queries (even on Julia DataFrames)
* Mustache.jl for building the site and Vega visualizations
I'm amazed at how far the Julia analytic ecosystem has come. Granted, some of these tools aren't Julia-exclusive (DuckDB, Mustache, Vega) but they worked well with it and were a pleasure to use.
Julia's speed gets a lot of attention, and it is nice. However, I think the clear syntax and how nicely it interacts with other systems don't get enough attention.
If you haven't played around with Julia recently, I recommend it (particularly for simulation).
## Why I Did This
The electoral college presents an optimization problem with layers of uncertainty (my specialty!). It can be hard to reliably find the states where focused campaigning will increase the chances of winning the most.
I want to help Biden win the election. Over $300MM in spending supporting Biden in the election will be managed by super PACs, which are legally prohibited from coordinating with the party or the campaign.
It seemed like an external source of Democrat-focused electoral college analysis could be useful. So, as a citizen unaffiliated with any campaign, I volunteered my skills by building this.
## The Site
I'm not trying to change your vote here, so I didn't put the website at the top. But, if you made it this far and are interested, here it is:
https://swingstatesolver.com/
For this simulation / estimation / optimization task, Julia was great! I used:
* Julia for succinctly expressing the logic and simulation * Turing.jl for estimation based on polling data * DuckDB for storage and fast analytic queries (even on Julia DataFrames) * Mustache.jl for building the site and Vega visualizations
I'm amazed at how far the Julia analytic ecosystem has come. Granted, some of these tools aren't Julia-exclusive (DuckDB, Mustache, Vega) but they worked well with it and were a pleasure to use.
Julia's speed gets a lot of attention, and it is nice. However, I think the clear syntax and how nicely it interacts with other systems don't get enough attention.
If you haven't played around with Julia recently, I recommend it (particularly for simulation).
## Why I Did This
The electoral college presents an optimization problem with layers of uncertainty (my specialty!). It can be hard to reliably find the states where focused campaigning will increase the chances of winning the most.
I want to help Biden win the election. Over $300MM in spending supporting Biden in the election will be managed by super PACs, which are legally prohibited from coordinating with the party or the campaign.
It seemed like an external source of Democrat-focused electoral college analysis could be useful. So, as a citizen unaffiliated with any campaign, I volunteered my skills by building this.
## The Site
I'm not trying to change your vote here, so I didn't put the website at the top. But, if you made it this far and are interested, here it is: https://swingstatesolver.com/