The good

In a 2013 survey, Rio de Janeiro was ranked the world’s happiest city – quite an achievement considering it had yet to host the Fifa World Cup (2014) or the Olympics (2016). A great climate certainly creates a sense of well-being, as does a string of decent beaches on which to soak up all that sunshine.

Immortalised in song, Ipanema is worth a visit, if only to find out whether sunbathers really are as “tall and tan and young and lovely” as the bossa nova classic suggests. Less crowded is family-friendly Leme Beach, a continuation of crescent-shaped Copacabana, Rio’s alpha strand of sand.

While we’re on the subject of happiness, this week sees the world’s biggest carnival get under way as millions of Cariocas (Rio residents) and tourists dress up, dance and drink until they drop. Hundreds of street parties, or blocos, take place across the city; some at fixed locations, others following parade routes. The free gatherings are usually organised by samba schools – the musical genre and dance style that evolved in Rio at the start of the 20th century.

To clear a hangover and get a sense of how the land lies, join a hiking tour to Dois Irmãos (“two brothers”) hill, from where there are spectacular vistas of the city and Guanabara Bay. Trips begin with a bite to eat and a look around the Vidigal favela before heading along a forested trail to the lookout point. Tours of favelas, or slums, are currently in vogue, particularly since pacification initi­atives have made many of the neighbourhoods safe. Will Smith, Kim Kardashian and Beyoncé have all visited
while David Beckham and Madonna are rumoured to have bought houses in Vidigal.

‘City of God’ finally has its say - spectacular opening ceremony sends message of hope to the world

In 2011, United States president Barack Obama kicked a ball with local children in the City of God – the shanty town that gained global recognition thanks to an Oscar-nominated film of the same name – and members of the England football team visited Rocinha, the largest informal settlement in Brazil.

No sightseeing circuit of Rio is complete without a cable car ride up Sugarloaf Mountain and a drive through dense rainforest to the statue of Christ the Redeemer, who stands, arms outstretched, at the summit of Corcovado and is listed as one of the new Seven Wonders of the World. Round off the day at a churrascaria, a traditional all-you-can-eat barbecue restaurant, or tuck into a hearty bowl of feijoada, a pork-and-bean stew that appears on menus across the Portuguese-speaking world and pairs perfectly with a caipirinha, Brazil’s national cocktail.

The bad

Happiest city? About one in five of Rio’s population live in the ramshackle favelas, where levels of contentment are not renowned for being high, regardless of which celebrities drop by to polish their compassion credentials.

Many guided tours are organised by agencies that aren’t based in the hillside communities and do little to benefit locals. “Favela chic” (trendy art galleries and stylish eateries catering to wealthy foreigners) might be all the rage but when ethical travel lobby group Tourism Concern asked residents in Rocinha about the advantages and changes tourism had brought to their community, the most common answer was “none at all”.

Rocinha has been in the news for all the wrong reasons recently, after the army was called in to quell gunfights between police and drug gangs that led to the closure of schools, businesses and roads. An average of three murders a day are committed in Rio and the language used to report incidents – “intense gun battles between rival factions” and “950 soldiers deployed” – is reminiscent more of a war zone, or a scene from City of God, than a low-income residential neighbourhood.

Photographer equips favela children with cameras to illustrate their passion for soccer

Talking of God – or more accurately, his son – tourists are being advised against walking up the jungle trail to Christ the Redeemer after a Polish man was stabbed while doing so. Thieves ambush hikers on a regular basis – 58 people, including the unfortunate Pole, were robbed within a 10-day period last July.

In August, a British tourist survived being shot twice when she unintentionally drove into a favela, and in October, police shot dead a Spanish sightseer when the car she was in failed to stop at a roadblock in Rocinha. Celebrities aren’t immune from attacks either. While out for a walk to “family-friendly” Leme Beach in September, Pet Shop Boys singer Neil Tennant, who penned the hit, Opportunities (Let’s Make Lots of Money), had cash and a phone stolen.

Increasing numbers of armed robberies, shoot-outs and stray bullets mean Rio is perhaps the world’s most dangerous place in which to be a bystander. Or a police officer. In 2016, 437 were murdered and one study suggests Rio cops are more likely to be killed on duty than a US soldier was in Vietnam. The flip side is that many Cariocas blame a heavy-handed law enforcement approach for escalating the violence. Police officers killed at least 4,224 people in 2016.

Morale in the force is at rock bottom. Brazil is suffering its worst recession in history and as Rio hovers on the brink of bankruptcy, police salaries have been “delayed” and half of all patrol cars are out of service. As a result, the cash-strapped city has requested backup from federal troops to strengthen security during this year’s carnival.

1.5 tonnes of cake: as Brazil battles recession, president’s ludicrous shopping list is too hard to swallow

Morale is also low among residents. Thousands took to the streets before both the World Cup and Olympics to protest that the money would have been better spent on education, housing and health care. They had a point – within months of the closing ceremony, Olympic venues had been abandoned and fallen into disrepair.

Meanwhile, allegations of corruption continue despite a former state governor receiving a 14-year jail sentence for bribery and the impeachment of president Dilma Rousseff for illegally manipulating govern­ment accounts. Disillusioned and con­cerned about the future, educated Cariocas are emigrating in record numbers.

The ugly

In an alarming report on crime and safety in Rio, the US State Department warns of carjackings, cybercrime and armed robbery. “Quicknapping”, where gangs kidnap ATM users at gunpoint and hurry them around a succession of cash machines where they are ordered to withdraw money, is also on the increase.

World’s happiest city? Depends who you talk to.