This is a small python script to calculate the best possible layout for https://github.com/flide/8VIM/.
The discussion regarding this program can be found here: 8VIM/8VIM#138
Read every Readme found here (there about be around 2) and follow the steps described in them.
A great resource is this website. http://practicalcryptography.com/cryptanalysis/letter-frequencies-various-languages/ I'm sure there also are other amazing websites out there, but I'm quite happy with it. You should be able to use most of their bigram-files with 8vim_keyboard_layout_calculator.