Air quality in Portland ranked as the second-worst among major cities worldwide on Thursday morning, according to a data visualization tool that tracks air quality.

AirVisual data showed air across the Pacific Northwest was some of the most unhealthy in the world. Portland, Vancouver B.C. and Seattle were all ranked in the Top 10 for worst air quality, with Portland ranking as high as second on Tuesday morning.

On Thursday morning, Portland ranked second with an air quality index of 159. Portland was behind only Dubai, United Arab Emirates (160). Vancouver B.C. (153) was fifth and Seattle (118) was 10th.

Ratings higher than 100 are considered unhealthy for sensitive groups, and a reading higher than 150 is considered unhealthy for everyone. AQI measures how many particles are in the air.

RELATED: Check air quality index in Oregon

Relief is on the way. Portland's air quality is expected to improve starting Thursday.

Shifting winds from the west Wednesday night started the process of clearing smoke from the Portland metro area, according to KGW chief meteorologist Matt Zaffino.

Forecast | 10-day forecast | Weather cameras

"East and northeast winds over the last few days pushed a lot of wildfire smoke offshore. Westerly winds aloft are now pushing the smoke back over us, so it’ll take until Thursday to rid our sky of the smoky haze," he said.

WATCH: Doctor says don't vacuum with wildfire smoke in air

Wildfire smoke has blanketed the Portland metro area since Sunday after shifting winds brought haze from fires in British Columbia.