Which is more worthwhile? I generally build one farm and spam economic improvements. Is this wise?
Actually you can calculate which is better.
In this case you're comparing the income of one planet at one pop and number of econ buildings versus the income of the same planet with a different pop and number of econ buidings. In this case most of the terms of the income formula drop out of the equation and all you need to do is to establish precisely how many tiles (i.e. stockmarkets) one has to give up to achieve the higher population.
The income equation from the Wiki Tax article is.
constant * sqrt(population_in_billions) * tax_rate * (1 + (sum from buildings on planet)) * (1 + (sum from racial bonuses/maluses) )
However in this case, the constant, your tax rate and your racial bonuses are all constant and the equation reduces to.
sqrt(pop) * (1 + N*0.25) where N is the number of stockmarkets on the planet (econ cap = 2 SM)
Now all we have to do is to decide what two pop levels to try and achieve and precisely how many tiles you need to give up for farm/morale buildings to achieve it. I happen to use two points, 13B and 20B which is one or two farms and have found in general that I can have 1 farm and no morale buildings at 13B or 2 farms and 2 VRC's at 20B. This says that I need to give up 3 SM's for farms/VRC's in the 20B case.
To find at what point it's worthwhile to have a second farm I just need to find out at what value of N
sqrt(20) * (1 + N*0.25) > sqrt(13) * (1 + (N+3)*0.25)
where now N is the number of SM's left on the planet once I overbuild 3 SM's with a farm and 2 VRC's. The point is that I just require that these two values be close because with a (reasonably) similar income I prefer the higher pop (i.e. both pop and income are score determinents).
In this case (if I have to give up 3 tiles) then plugging all of this into excel I get as long as the higher pop planet has 8 or more SM's on it then I consider it worthwhile to have the higher pop. But if instead I determined I needed 1 farm and 3 VRC's (i.e. I have to give up 4 tiles) then that changes N to about 12.
Also simple approval and farm bonuses can make a huge difference. Let's just consider a 100% farm or 100% approval tile that reduces the number of tiles I need to give up from 3 to 2. In this case it's worthwhile with N as low as 4.
Basically what I end up doing is to leave PQ6 and less at 6B, PQ7 to PQ10 (i.e. planets without the 10% high PQ morale bonus) at 13B and only have 20B on planets PQ11+ where I can have enough SM's to make it worthwhile based on the above calculation but certainly if a planet has a food or approval bonus (and is PQ11+) then it's always going to 20B. This turns out to be a noticeable percentage of planets at 20B, usually close to half of all my planets.