How to Fix a Bad Mood: Book a Vacation

The science is in: Bad weather puts you in a bad mood.

A study released this week from an environmental economist at Stanford University investigated the relationship between weather conditions and the emotions that people express on social media.

According to the study, people tend to use more positive phrases on social media when the weather is more pleasant. Bad weather — whether extreme temperatures, rain or humidity — causes the exact opposite effect.

Related: The Best Places to Travel in October

The study examined 3.5 billion posts from Facebook and Twitter from millions of users across 75 different U.S. metropolitan areas. Researchers measured the positivity or negativity of each post and compared it with local weather conditions.

Researchers concluded that not only did weather have an impact on mood, that impact was “statistically significant” and manifested itself even when users were talking about something other than the weather.

Related: How to Enjoy Perfect Weather Year Round

For those who find themselves posting negatively on social media, it may be time for a warm weather escape. Or perhaps even a relocation.

In the United States, Los Angeles leads the pack with the most nice days (183) per year, according to government weather data. In fact, all of California is great for those looking for the most pleasant weather year-round. Runners up were San Diego and San Francisco.

For those who are willing to travel internationally for better weather, Las Palmas in Gran Canaria, Spain, is consistently ranked at the top the world’s most pleasant cities for its long streaks of beautiful days.