Everyone can agree that having a high quality of life is a good thing. That's easy. Pegging what exactly goes into it is a bit trickier. Fortunately the folks at Numbeo did it using data and put together a list of cities in North America that have the highest quality of life.

Seattle ranked 12th on the index with an overall index score of 188.9. We placed just ahead of Portland, Oregon, and just behind Dallas, Texas, on the index. Spokane also ranked among the top 20 at 18th — just ahead of Sacramento and just behind Calgary, Alberta, Canada.

Here's how Seattle ranked in each category:

Purchasing power: 139.50

Safety: 54.76

Health care: 72.69

Cost of living: 84.10

Property price to income ratio: 6.12

Traffic commute time: 42.92

Pollution: 28.13

Climate: 91.73

Raleigh has the highest quality of life in North America, according to the index. The North Carolina city scored 215.24 overall and ranked 2nd in buying power, 5th in safety, 6th in pollution and 14th in property price to income ratio out of 59 cities. Raleigh also ranked 15th for health care, 19th in climate, 29th in traffic commute time and 34th in cost of living. Here are the top 10 cities on the index:

Raleigh, NC Madison, WI Charlotte, NC Ottawa, Canada Columbus, OH Victoria, Canada Austin, TX San Diego, CA San Jose, CA Quebec City, Canada Detroit ranked dead last on the index with a score of 132.83. Michigan's largest city was the least safe of all cities and had the single worst commute time, even ahead of Los Angeles. Detroit was also among the worst in the nation for buying power, health care and pollution.

New York City had the second-lowest quality of life on the index, followed by Winnipeg, Regina and Toronto, all in Canada. Miami, Los Angeles, Philadelphia and Las Vegas were the next-lowest.