How many Members of Parliament were lesbian, gay, bisexual or transgender at the time of the 2017 General Election? A niche question, for sure, but until a few weeks before that election there was no easy answer.
You could try searching Google but youād end up none the wiser. Wikipedia did not have the answer. In fact, it was (and still is in some cases) listing MPs based on tabloid gossip. There were some sources that did snapshots in time, like the The LGBT Representation and Rights Research Initiative at the University of North Carolina at Chapel Hill, but ā as snapshots ā these lists were quickly out of date.
Back in 2017, I worked in the LGBT Policy Team in the Government Equalities Office. Like every government team, we had top lines that included useful facts and statistics. The number of LGBT MPs was one of those facts we liked to include. When the election rolled round, we didnāt know the answer. At best, we knew the answer we had would be out of date in a matter of weeks and we didnāt know how quickly a third party would do the sums.
That was a problem I decided I could fix.
Start with user needs
I could have simply figured out the answer by doing a lot of Google searches and left it at that. That would have given us the answer we needed in the aftermath of the election but it wouldnāt have been a long term solution.
We needed something that was responsive to change1 so that our key facts were always correct in the moment. We also needed to be confident the sources were truthful and accurate; something most third parties couldnāt offer because their methodologies for collecting the data were unclear.
Put another way, I had a pretty straight-forward user need:
As a policy official, I need regularly updated and independently verifiable information about LGBT MPs, so that I can use the information in my work
Make things open: it makes things better
A clever bunch of people once came up with some design principles for what a good service looks like. For this project, perhaps the most important one is this:
Make things open: it makes things better.
Thatās exactly what I decided to do.
I created a website backed up by a simple dataset. Itās open source, meaning it can be easily updated, interrogated, verified or extracted for use elsewhere.
Itās built using Jekyll, which means I have been able to host it freely on Github2. Anyone can contribute to the code, because the repository is public.
Anyone can contribute data to the dataset too, and itās as easy as updating a spreadsheet because thereās no database. Itās nothing more than a couple of CSV files.
Iterate. Then iterate again
I started with the minimum viable product: a dataset that listed those MPs who were LGBT on the date the dataset was compiled. Then, I created a probably overkill, but very pretty3 website to display that data more interestingly. The website was generated dynamically as the dataset was updated. āJob doneā, I thought, but the minimum viable product ā the dataset ā quickly became less-than-minimum.
The original dataset only captured the MP, their constituency, and the source of the data. Following the election, some MPs changed constituencies, some lost their seats, and others joined Parliament for the first time. During the 2017 to 2019 Parliament, some MPs changed parties and groups too; sometimes multiple times. That meant the dataset as conceived on day 1 was, practically, no more useful than the snapshot dataset I was trying to improve on. So I iterated.
I changed the dataset to include the date an MP took their seat, their last day in office or any changes in constituency or party if applicable. I also created a separate dataset to show all the parties in a given Parliament, even if they had no sitting LGBT MPs in their party. And I kept iterating.
Now the dataset and website allow you to see current LGBT MPs in Parliament, but also go back to snapshots for previous Parliaments. It took a lot of trial and error iteration, but now the dataset is in a format that can be easily and continually updated in a future-proofed way.
It meets the user need
As a policy official, I need regularly updated and independently verifiable information about LGBT MPs, so that I can use the information in my work
Does this dataset and website meet the user need it was intended to? Yes.
Creating this dataset meant that, when I had needed the answer for work, there was a baseline source for the information that I felt like I could trust. It also meant my colleagues could easily get the answer too.
Making the data freely available on the open web has improved the available data as well. Other people have come looking for this data, and theyāve contributed their own information sources4.
The dataset substantially improves on what came before it, because it shows how we know each MP is LGBT. Many of the sources are directly attributable to the MP themselves, rather than third parties.
Possibly the most important way I know this has been a useful endeavour though, is because itās been used beyond just me and my old team. The dataset has been used by the BBC5, Sky News6, and Quartz7.
Made something open: it made the thing better
If thereās a moral to this story, itās that I made an open dataset and making it open made it better.
This dataset isnāt the end state. There are things that need to be iterated on. You currently canāt find out how an MP identifies; which is important, because as far as we know all these MPs have a minority sexual orientation but none of them are transgender. The dataset also doesnāt discriminate between those who were out when they came into office, versus those who came out in office. So thereās still work to do.
Looking a bit wider, the code and principles behind the work provide a foundation for other projects too: Iāve now started compiling a list of LGBT ministers in the UK Government.
And you never know, maybe one day Iāll be able to start a list of LGBT Prime Ministers too.
Visit āLGBT MPā to find out which Members of Parliament are lesbian, gay, bisexual or transgender.
Footnotes
Given how much changed during the 2017 to 2019 Parliament, we needed that more than we could have realised at the time! ↩︎
Github lets you host projects for free on their website if youāre building them in Jekyll. The domain name costs me about Ā£20 a year. ↩︎
It gave me an excuse to create this pride inspired portcullis. A different portcullis is part of the UK Parliamentās official brand identity. ↩︎
I, of course, looked to update the dataset in the wake of the December 2019 general election. In the days after the poll, I had people tweeting at me that Iād never met, letting me know which MPs Iād missed and even sending me sources. My favourite was perhaps where someone had pointed me towards a speech of newly appointed Darlington MP Peter Gibsonās in which he thanks his partner for their support during the campaign. ↩︎
BBC News, 11 June 2017, Election results 2017: The most diverse Parliament yet; and 17 December 2019 Election 2019: Britainās most diverse Parliament. ↩︎
Sky News, 16 December 2019, General election: 2019 heralds the most diverse parliament for gender and ethnicity. ↩︎
Quartz, 17 December 2019, The UKās new parliament is its most diverse ever. ↩︎