Impact of earthquakes vs. heat waves on the socioeconomic losses of buildings