Sort:  

I don't have any code that references that data on github. I did however find an old chunk of code when I was working on converting some of the C++ logic into JS. The code is probably 8 months old now though, so I have no idea how accurate it actually is anymore.

https://gist.github.com/aaroncox/b94f49f831b9f0c984bac084d472fb8c

It's fantastic! A least I can grasp the the approach you've taken.