Sam Wang has thoughts on his model.
If you want an estimate that uses national polls, see The Upshot. I’m a little concerned that FiveThirtyEight’s code double-counts the swings in national and state polls. They’ve been a bit underconfident and volatile.