Set in 1832 West Yorkshire, England, Gentleman Jack, an eight-episode drama series premiering April 22 on HBO, is inspired by the true-story and coded diaries of Anne Lister (1791–1840), and follows her attempt to revitalize her inherited home, Shibden Hall. The show’s official trailer is above, but before you watch, here’s what you should know about the remarkable life of this 19th century landowner, entrepreneur, intrepid traveler and mountaineer, considered Britain’s ‘first modern lesbian’.

In the mid-1980s, after graduating from university at the age of 52, historian Helena Whitbread was looking for a research project to dive into. That’s when she uncovered the story and diaries of Anne Lister, reading (and painstakingly decoding) each and every word the 19th century diarist had written about her life. Helena realized Anne’s story was important as “it painted a completely different picture than the women in other popular and classic English novels of the time, including Jane Austen and the Bronte sisters.” She saw Anne for what she was… “a revolutionary in her time for women’s roles, appearances and behaviour. Anne was bold, fiercely independent, a landowner, industrialist, traveller – and lesbian.” That’s when Helena decided to share Anne’s story with the world, which she’s continued to do ever since.

Anne Lister was born into a family of wealthy mill-owners and cloth merchants. According to AnneLister.co.uk, a site dedicated to Helena’s historical and biographical work, when her Uncle James died in 1826 Anne started to manage the family’s sprawling Tudor-style home, Shibden Hall. She became the sole owner of the home and Estate in 1836, following the deaths of her aunt and father.

Anne, a true nonconformist – in every way – who always dressed in black, became known to locals as ‘Gentleman Jack’. She took the challenge of managing the Estate very seriously with the goals of improving its condition and maximizing the income it generated (from the Estate’s reserves of coal, water, stone and timber, as well as from canal shares, Turnpike Road Trusts, in addition to rents from the farms and cottages on the Estate). The Anne Lister site notes, “Her entrepreneurial flair, her acquired knowledge, over the years, of mathematics, geology and engineering and her sharp negotiating skills with her male business rivals made her a formidable businesswoman in the newly-emerging world of industrialisation.”

Anne began to write in personal diaries at age 15, “a practice she continued throughout many years of her life until her untimely death from an insect sting, at age forty-nine, while travelling in Russia.” In total, her journals run 6,600 pages and are comprised of an estimated 4 million words. They are an extremely detailed day-to-day account of Anne’s life, including “entries documenting her first love, a fellow pupil, Eliza Raine, at the Manor School in York.”

One-sixth of her diaries are written in a secret code, which Anne devised herself so she could chronicle her sexuality and the intimate side of her life, during a time and in a world bound by convention. Based on a combination of algebra and the Greek alphabet, Anne called her code ‘crypthand’, and she used it to “document her passionate love affairs with other women.” She was “convinced that no-one would ever be able to decode her crypthand, and her secret encounters were recorded for her enjoyment alone.” She was wrong.

Decades later, in the mid 1890s, John Lister, a descendant of the Lister family, discovered Anne’s diaries and broke her code. Her sexuality was discovered … and then quickly buried, again. John, who was gay, “did not want to draw attention to his own sexuality by revealing his discovery of the diaries.”

Anne’s diaries remained a secret until Helena Whitbread found and decoded them nearly a hundred years later, uncovering the story of “one of the most fascinating characters of the 19th century.”

The Gentleman Jack drama series, set for its HBO premiere next week, was filmed on location at Shibden Hall during 2018, and explores Anne’s life and those who lived in the Hall and Estate. It stars Suranne Jones as Anne Lister, and is written, directed and executive produced by BAFTA-winning writer Sally Wainwright.