2017: the year Hurricane Harvey raged, Brexit bit and a 13-tonne fatberg was found floating in an east London sewer. Good riddance to bad rubbish, right? Not so fast. While the last term seems to have rivalled 2016 – AKA the Year of Celebrity Deaths – for sheer misery, a closer look reveals it wasn’t all bad. Here are some reasons to be cheerful you may have forgotten:

China banned the the ivory trade. The world’s second-largest economy – and largest ivory market – said that it would stop the commercial processing and sale of ivory by 31 March 2017, and the ban came into effect on Sunday, the last day of the year. The move has been hailed as a game-changer for wildlife conservation.

Humans are living longer than ever. Thanks to regenerative medicine, organ replacement, gene therapy and other brain-busting breakthroughs, humans are living longer than ever before. If we can make the necessary adjustments in elderly care, the next few decades could be an unprecedentedly comfortable time to grow old.

More people are entering the global middle class. An average of 160 million people are set to join the middle class every year for the next five years. That's a hell of a lot of lattes. Soon, in fact, the middle class will account for a majority of the global population, and a third of its economy – with more lifted out of poverty than ever before.

There are more women technology CEOs than ever. There are more women in executive positions than at any time in history, says the 2016 Bloomberg Pay Index – with tech giants such as IBM, Xerox and Yahoo all recently helmed by women. The picture isn't entirely cheery, however: the total of 27 female CEOs among S&P 500 companies – though a record high – is still a fairly dismal showing.

Saudi women are hitting the road. With the Saudi Arabian government lifting its ban on women at the wheel, a fleet of first-time female drivers will appear from 2018. Not only that, women will be permitted to go to sporting events (with their families), while girls can now take classes in physical education and play sport at schools. It's not all good news in the Gulf country, though: though Saudi Arabia’s archaic male guardianship system has been relaxed this year, it remains largely in place for the foreseeable future.

A Saudi woman checks a car at a showroom in Riyadh.
A Saudi woman checks a car at a showroom in Riyadh.
Image: Reuters/Faisal Al Nasser

Big gains for health. The year's big news in health was the creation of a new malaria vaccine. Given that the World Health Organization reported 212 million cases of the illness in 2015, the drug could be a life-changer. Also, 2017 featured the lowest number of polio cases ever, while scientists studying Huntington’s disease hailed a “game-changing” breakthrough after an experimental drug seemed to lower toxic proteins in the brain. But the cherry on the cake was Johnson and Johnson’s announcement of early tests of a possible HIV vaccine. Though still in development, a drug that shields against the virus could save millions of lives a year.

Boko Haram gave us our girls back. Or some of them anyway. Three years after the militant group kidnapped 276 Nigerian schoolgirls, 82 were released in exchange for five Boko Haram leaders. Some went back to school this autumn, while two even visited the White House. Sadly, almost 200 remain in captivity.

Australia voted in favour of gay marriage – and it wasn’t the only country to do so. In Austria, same-sex marriages were declared legal after its supreme court found that denying marriage licences due to gender was discriminatory. Germans voted in favour of legalization in June, while Malta's parliament returned a vote of 67 to 1 in favour. After years of debate in parliament and the media, Australia became the 24th country worldwide to recognize same-sex marriage, and held its first ceremonies in December.

Lots of countries are joining the fight against climate change. China announced it was committing $361 billion to clean energy in the years up to 2020, and took steps towards banning petrol-powered cars and tightening emissions standards – good news for everyone, given that country that is still the largest emitter of greenhouse gases. India, the UK and France, meanwhile, all unveiled plans to ban petrol cars in the near future. Ireland went one better by announcing a complete divestment from fossil fuels, and putting up a $1 billion incentives pot for organizations that opt to go renewable. Best of all, though, was the example of Costa Rica, which ran on renewable energy for over 300 days this year.

#MeToo appears to have worked, according to a study. Since allegations of sexual misconduct against film producer Harvey Weinstein went public, thousands of women have come forward on social media to disclose their experiences of sexual assault and harassment. Protest marches have taken place all over the world, and it seems that progress is finally being made. Time Magazine declared the “Silence Breakers” – including actors Rose McGowan, Terry Crews and Ashley Judd, who went public about sexual harassment – as a collective 2017 Person of the Year.

See – perhaps 2017 wasn't so bad, after all. In 2018, if the temperature soars, the economy wobbles or the London fatberg announces a run for president, cling to this: behind the scenes, in a few key areas, human beings are still bravely staggering forward.