How can I prevent a negative happiness rating when choosing an ideology?
Solution 1:
When you pick an ideology, Public Opinion can reduce your happiness if it is not their preferred ideology. Preferred ideology is based on the tourism of other civilizations compared to your tourism. If a civilization with high tourism and/or multiple civilization a different ideology from you, this generates unhappiness.
The easiest way to avoid this is to give in to peer pressure and switch to their ideology. It may not be ideal and you'll take a turn of anarchy but it'll get rid of the happiness penalties.
You can also reduce these penalties by generating more tourism through Great Works, Wonders and the Aesthetics policy tree. Since the penalty is based on the ratio of that ideology's tourism to your ideology's tourism, generating more will reduce the penalty.
Finally, you can mitigate the penalty by gaining happiness elsewhere. Every ideology has policies which increase happiness- they're a good place to start.
Solution 2:
It's based on the ratio of the opponent's tourism to your culture, not your tourism. Increase your culture output.
You can also use world congress to vote your ideology as the world ideology.