Jazzmail
King
There's a few exceptions where you might want a temple instead of a lib here:There is a point where a temple or library can be justified in order to work a whale tile. A library is without question the better choice here (if available).
1. town is corrupt: just a few coins means a 50% science bonus doesn't do much or anything at all. That temple, making the fish tile available and making another happy farmer/fisher can support some scientists, producing more beakers, at a smaller initial investment.
2. the town is actually quite good (shields,river,food,etc.) and close to the capital, but you also want to build a Wonder there, so you build the temple and you let it grow to support many more productive citizens.
(increasing the lux slider here may be wasteful as you don't need too many happy faces in the smaller towns; you can add the lib later).