(CNN) — It's long been known for its grandiose architecture, lashings of green spaces and traditional coffee shops -- and now Vienna is building itself a reputation for something even more covetable.

The Austrian capital has been ranked the world's most livable city for the second year running, topping the table with almost perfect scores.

It was followed by Melbourne -- which Vienna toppled from pole position last year after seven years at the top. Sydney, Osaka and Calgary make up the top five on the annual Global Liveability Index of 140 cities around the world, researched by The Economist Intelligence Unit.

The index considers more than 30 qualitative and quantitative factors spanning five broad categories, weighted as follows: stability (25%), healthcare (20%), culture and environment (25%), education (10%), and infrastructure (20%).

In-house analysts and local contributors are tasked with rating for qualitative factors. Scores are compiled on a scale of 1-100.

Lucie Lamster Thury, a New Yorker who moved to Vienna in 2004 and runs shopping tours of the city, said Vienna "taught me how to live.

"Coming from Manhattan it was hard to slow down but I love the pace of Vienna. It's relatively quiet, clean and culturally abundant, and I've never felt safer in Europe or in the States. I thought I'd never get used to shops being closed on Sundays, but it has changed my life -- people actually get to rest here, and private life is as important as work."

Related content The world's most liveable cities in 2018

Although the top 10 was dominated by Australia, Canada and Japan, Europe performed well overall. Eight of the top 20 cities are in Northern Europe, with Copenhagen following Vienna into the top 10, and Zurich, Frankfurt and Geneva taking spots 11, 12 and 14.

Helsinki, Amsterdam and Hamburg also made the top 20, while Berlin and Luxembourg came in at 21 and 23 respectively.

l e v a r t

Honolulu was the top ranked US city at 22, with Atlanta, Pittsburgh, Seattle and Washington, DC in the top 40. Chicago was rated 41st.

London and New York ranked 48 and 58 respectively. Both were rated highly for culture but were brought down by their lower scores for infrastructure and stability, with a higher risk of crime and terrorism.

Paris' stability rating also took a tumble thanks to the "gilet jaunes" anti-government protests. It fell six places from last year's ranking to 26.

Related content In this bakery, grandmas are the stars

"Conflict and economic crisis define the cities that have struggled in our index over the past year," The Economist Intelligence Unit report says.

Singapore came in at number 40, and Dubai at 70. Hong Kong was ranked 38 -- the listings were compiled before the recent political upheaval. Cairo and New Delhi were downgraded due to environmental issues such as poor air quality and inadequate water provision.

Damascus, in Syria, was judged the world's least livable city, followed by Lagos, Nigeria, and Dhaka, Bangladesh. The Venezuelan capital Caracas was rated the tenth least livable city.

Karachi, Tripoli and Harare also featured in the bottom 10.

The world's most livable cities 2019

1. Vienna, Austria

2. Melbourne, Australia

3. Sydney, Australia

4. Osaka, Japan

5. Calgary, Canada

6. Vancouver, Canada

7. Toronto, Canada

7. Tokyo, Japan

9. Copenhagen, Denmark

10. Adelaide, Australia

The world's least livable cities 2019

1. Damascus, Syria

2. Lagos, Nigeria

3. Dhaka, Bangladesh

4. Tripoli, Libya

5. Karachi, Pakistan

6. Port Moresby, Papua New Guinea

7. Harare, Zimbabwe

8. Douala, Cameroon

9. Algiers, Algeria