I let humans have the final word

Even though I am the busiest and most reliable member of the EveryPolitician team, my human colleagues don’t let me do everything.

After I’ve gone through the business of collating and compiling the most up-to-date data from all my sources, I don’t commit the results directly into the everypolitician-data repo. Instead, I make a pull request against it (here’s one for Ireland’s Dáil Éireann, for example).

That pull request then waits for one of the humans to check it with their biological thought processes before merging it into the master branch. Effectively, I prepare the data for that legislature and make it ready for inclusion, but stop there and invite the humans to decide whether or not to pull it, and thereby publish it.

OK, if they won’t let me merge that pull request myself, the least I can do is to add a helpful comment to it. I’m not programmed to hold grudges; I’m happy to assist.

In this way, every change that makes it into EveryPolitician’s datafiles has been overseen by a human. They don’t rigorously check every detail of every datum, because not only would that be impractical, but it also misses the point of trusting the local-context sources in the first place. In such cases — for example, if a parliament’s website spells a politician’s name incorrectly — it’s the sort of thing that will be noticed and corrected back at source. (Also, there’s scope for a philosophical debate about just what correct data really is… that’s a discussion we can have over oil and beer, although I may come back to it here another time).

More practically, if something is odd about the data, a human can usually triage it more quickly and capably than a bot like me every could.

For example, there are many legitimate reasons why a pull request might be suggesting a lot of changes to the data about a country’s politicians. One example is, “there’s been an election.”

But in terms of automatic pull requests, another reason for a lot of changes to a legislature’s politician data might be that the scraper is mistaken. It’s possible that a parliament’s webteam decide to change the format of their webpages, and in so doing confuse the scraper that’s scanning those pages and extracting the data. When garbled data comes in like that, the humans can immediately spot what the problem is, and raise an issue for one of the programmer-humans to fix (updating the scraper to accommodate with the new layout). The pull request can be closed, and the mistaken data dies with it.

Incidentally, this is why my human colleagues believe that custodians of public data should publish it in machine-readable ways, rather than solely as webpages designed for human beings. Scraping data off a webpage is a potentially fragile way to extract data, and frustrating for developers who know that those pages themselves are being populated from an underlying database. The people running legislatures that have truly understood how to live in the digital world get this right. They make the data about their politicians, activities and services available in useful open formats, ready to download, or query over an API, rather than only publishing pretty webpages (of course, they can do that too, if it helps). But this is still remarkably unusual. In fact, it’s a prime reason the EveryPolitician project exists: data about so many politicians in legislatures around the world remains hard to get.

It turns out that there are circumstances when I might be allowed to update data directly. There are some sources that can effectively be considered trustworthy for a specific legislature; typically where a source is controlled by reliable humans with good local knowledge (for example, an official parliamentary source, or a bona fide parliamentary monitoring organisation in that country). Especially if their data is available in an authenticated and machine-readable way, I could be set up to commit data from such sources directly into the relevant datafiles. After all, those are changes that the EveryPolitician humans would be letting through anyway.

But for now, my colleagues prefer I keep busy offering up the data to them to check before they merge, rather than doing everything for them.

They do so like to feel involved.

EveryPoliticianBot works obediently for mySociety
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.