Today, the conversation about LGBT rights has come to include many aspects affecting the lesbian, gay, bisexual and transgender community. In the 18th century, however, the question was simply one of whether it was legal or illegal. The most liberal place in the world, where homosexuality was decriminalized at the time, was central Africa, according to a new database set up by the Free & Equal UN Campaign for LGBT Equality.

The interactive map below, which starts as far back as 1790 and charts the following centuries, shows how homophobia spread throughout the world and lead to the outlawing of homosexuality in several places. It also shows how some countries lead the way forward, and sadly sometimes backwards, on LGBT rights.

One of the factors contributing to changes in LGBT legislation is political upheaval. For example, Iran decriminalized homosexuality in 1974, but reversed the decision in 1980. Throughout history Russia's political shifts can also be detected in LGBT policies that sway to and fro between criminalizing (1850, 1950) and decriminializing (1920, 1994).

In the above map, the world is divided according to contemporary borders. Like all data concerning global LGBT rights, the UN notes that "unfortunately, there are information gaps when it comes to the status of laws in some countries during particular periods of history. Please consider this a work in progress: if you have historical or legal sources that can help us to plug holes or correct inaccuracies, please get in touch."

The right to love whom we please remains at the centre of political debate. In 2015, numerous countries, including the United States and Ireland, legalized same-sex marriage. Worldwide, that progress continues to be challenged. In many countries, same-sex relationships are still illegal. Mauritania, Sudan, Iran, Saudi Arabia and Yemen all have active legislation leading to the death penalty for LGBT people.

Even in the West, the issue continues to be contentious. Just last week, Switzerland voted against constitutionally defining marriage as between one man and one woman by the narrowest of margins. Many US presidential candidates are also promising to reverse a US Supreme Court decision of last year, considered threatening to LGBT rights.