Figuring that out sounds like a fun but non-trivial project.
Since crypto currencies have different mining schemes one would need to keep track of the hash/$ ratio for each one.
I guess the simplest way to do so would be to cross-reference the different mining market places that exists.
Do you have other ideas for figuring out the hash/$ ratio?