We've looked at which states are leading the U.S. in solar power and which ones recycle the most, and thanks to WalletHub's latest report, we now know which states are the greenest in 2017.

In order to rank each state and unveil the greenest ones, analysts used 20 key metrics to determine each state's environmental quality and eco-friendliness of its policies. Factors such as "highest air quality," "most LEED-certified building per capita," and "highest percentage of energy consumption from renewable sources" were taken into account.

Here's a look at the top 10 greenest states:

  1. Vermont
  2. Massachusetts
  3.  Oregon
  4. Washington
  5. Connecticut
  6. Maine
  7. Minnesota
  8. New York
  9. New Hampshire
  10. Rhode Island

Did your state make the top 10? If not, hover over the map below to see where your state ranks.

Source: WalletHub

Vermont is officially the greenest state in 2017, but when analysts broke it down by category, other states took the tops spots. For instance, New York ranked No.1 for "lowest gasoline consumption" and "lowest energy consumption per capita," while Missouri claimed bragging rights for having the "lowest total municipal solid waste per capita."

Overall, Wyoming was the least eco-friendly state and ranked among the lowest in categories for "lowest soil quality," "highest energy consumption per capita," and "highest gasoline consumption (in gallons) per capita."

Red States Vs. Blue States

If you take an even closer look at the study's results, do you notice a pattern? It turns out that a state's political affiliation is closely linked to how eco-friendly they are. Blue states such as Vermont, Massachusetts, Oregon, Washington, and Connecticut rank much higher than red states like Oklahoma, North Dakota, West Virginia, Montana, and Wyoming.

Though there are many exceptions, this study reveals that overall, blue states are more likely to take the environment into account when it comes to enforcing stricter laws regarding renewables, resource conservation, and pollution.