I have a simple equation that captures the reason of being happy in a situation:
Happiness = (Reality- Expectation) x Attitude.
Both reality and expectation are composed of multiple factors. Take for example, the location you select to live. In that case, reality may include year-round weather, closeness to a city, possible outdoor activities, the quality of the neighborhood, the quality of school system, job opportunities, and so on. There will be a corresponding set of expectations.
So, the happiness equation is really a sum of reality minus expectations for every factor important to you. A positive outcome means you are happy, a negative, unhappy and zero indicates an equanimous situation.
This gets amplified by attitude. A person with a positive attitude will amplify factors that are positive (i.e., reality exceeds expectation), and ignore those that are negative. The reverse will be true for a person with negative attitude. For them, it is the negative factors that matter and worthwhile whining about. The positive factors don’t matter much.
Expectation is very important in deciding happiness. If it is low, one can be happy more easily, and the reveres is true if it is high. That applies to every factor, not just lump sum. So, one would have an expectation for what the weather or the neighborhood should be like, and so on.
What factors to include in this equation depend on the stage of your life. The expectation related to job opportunities will disappear as a factor once you retire. During that phase, the expectation related to weather may become more important. To be more accurate, each expectation has a weight attached to it, which changes depending on phase of life.
The level of expectation you have for a specific factor is also dependent on how competitive you are. For example, if you want to keep up with the Joneses, you may establish a high expectation for, say, the size of the house you want to live in. Not that you need it, but because your friend has one. In that case, a perfectly reasonable but small house will bring unhappiness.
Finally, there is a time element associated with the happiness thus calculated. It declines over time. As the newness wears off, a perfectly good situation may start getting boring. Unless, of course, attitude kicks in and puts sanity back again.