Earth’s global surface temperatures in 2017 ranked as the second warmest since 1880, according to an analysis by NASA.