Overview:
The suggestion in the rule book is to use weights equal to the base cards, which has 8 buildings and 4 of everything else per age.
The semi-official variant is to use card limits. I think limiting the cards is a much easier way to refill the progress board in person. In the online implementation, that doesn't need to be a consideration. Also, there is not a single set of limits. For instance, there's
this simpler one and
this more precise one.
Two problems with the suggestion in the rule book though are that the base set doesn't have natural wonders and that it doesn't scale with the number of players. I've taken a stab at using weights, like in the rule book, and scaling with natural wonders included:
Details:

- CardWeights.png (25 KiB) Viewed 601 times
"Deck" shows the number of cards in each age deck with all of the cards included. (The Age 1 deck has one fewer golden ages (8), and the Age 4 deck has one fewer natural wonders (4).) "Base" is just the base cards per age (no advanced, expert, or Dynasties cards). "Total" is the sum of the weights across all card types. "Board" is the number of progress cards on the board at the beginning of each round. "Ratio" is Total/Board.
You can see that the base set has 8 buildings per age and 4 of everything else. In other words, buildings are about 2x the other types of cards. For different player counts, I have scaled the weights with similar ratios to each other and to the number of cards on the board. I bumped up the priority of militaries since that can be a sore spot.
Analysis:
Here is the effect on 2-player for buildings. This time, the middle is using the simple card limits linked above, not what's implemented on the site now.

- weighted_6.png (6.52 KiB) Viewed 601 times
You can see that for both the hard limit and the weighted probability, the chance of getting 0 or 1 building went down. You're most likely to get 2 or 3. With weighted, you have some chance to get 6 or 7, but with very small probability. The result is that limits and weighted are similar for 2-player.
The story is slightly different for 4-player:

- weighted_7.png (6.84 KiB) Viewed 601 times
You can see above that the hard limit cuts off the Gaussian distribution at the limit and adds the probabilities of 7+ to the probabilities of 5 and 6. The weighted card draw allows the distribution to continue beyond 6 while tightening the standard deviation, making it less likely you get 1 or 2 buildings.
Conclusion:
Overall, I like this approach. It uses the rule book's suggestion, and I think it results in desirable distributions.
I am undecided on whether to reset the weights between the A and B rounds of each age. The potential downside is that it makes the B rounds too predictable, but since the ratios are about 2.75, not 2.0, you won't be able to predict the exact distribution.
I think, as I said before, that I won't include the leftover cards in the counts. So the question is whether to reset between every round or not.
Thoughts?