Silicon Valley coder wants to defend Indonesia’s democracy with election vote counter and neat data visualizations



Tomorrow is a monumental day in Indonesia, when the Elections General Commission (KPU) will be announcing who’s the next president of Indonesia based on the official voting tally. In the two weeks since the vote took place, both candidates declared that they have won based on different quick count results, and neither of them are backing down from their claims today. Because of this, many people in the country have turned to tech, creating initiatives such as online crowdsourced vote counts that aim to make the contested count more transparent. The most “open source” initiative of them all is 1.

As with the other vote counting sites that have popped up since the July 9 general election, Pilpres2014 lets you see the counting results based on the vote tally documents released on KPU’s website. Furthermore, visitors can also see data visualizations based on the tallies, like bubble graphs and deep bar hierarchies (which I personally love; see the video below). The data is updated every two hours.

What sets this website apart is how the person behind it, Henry Tan Setiawan, developed it in a 24-hour hackathon session at his home. And he did so all the way from the US, where he’s now based.

Developing an API for all to use

Anyone in the world can use Pilpres2014 via its open API. “I was following [the presidential election] in Indonesia and I saw an opportunity to apply some of my skills and time for a good cause,” says Setiawan.

He was asking himself about what he could do quickly, all the way from the US, to help Indonesia’s democracy at a time when the nation faces a constitutional crisis. He realised that the available data is tough to navigate, which could deter a lot of online helpers; a user would have to click on each district level one by one and look at the scanned documents to see the numbers. He quickly coded a crawler that could get the data from KPU’s DA1 documents directly, get the number of votes, and sort it based on each district level.

The code enables you to process the data without doing any manual counting. Setiawan concedes the API might not always work, but he’s refining it all the time. He claims that the data crawler can finish crawling the entire KPU site in about 30 to 45 minutes.

See: As Indonesia’s democracy is on the verge of crisis, hackers and fakers attack crowdsourced vote counts

He then shared the code behind Pilpres2014 on Github so that somebody else can capitalize on the data for something else, perhaps for making a mobile app out of it. Setiawan adds, “I was hoping that […] there will be others that will capitalize on that small code I wrote because once you have the table and capitalize on the knowledge that I reverse engineered from the KPU website, anyone can write something interesting on top of those tables, using the API and some data.”

Getting things done from Silicon Valley


Setiawan works as a principal software developer engineer at Microsoft in Silicon Valley, with two programming patents to his name. The vote-tracking API is his personal project with no affiliation to any organizations or companies. He says that his biggest challenge in developing the program was the time needed – and explaining to people at home why he was doing this. “They were concerned that suddenly I was sitting on my work table at home for 24 hours doing a hackathon, forgetting to do anything else,” explains Setiawan.

He built the technology stack using popular open source programs like jQuery, KnockoutJS, C# for backend code, Microsoft Typescript, Visual Studio, and D3 visualization.

“Since I am a technical-minded person, doing this [site] is a joy in itself. I have only one motivation for it: let the truth be told and let the process of democracy in Indonesia be done cleanly and honestly. That is the only hope from the deepest part of my heart as an Indonesian from afar,” says Setiawan.

For those of you who want the code behind Pilpres, you can find it all here.

Besides Pilpres2014, other notable tech initiatives for the election counting process are Kawal Pemilu, Kawal Suara, and C1 Yang Aneh.

(Photo from Flickr user Isabel Esterman)

  1. Pilpres is an abbreviation of Pemilu Presiden, which means “presidential election.”
Editing by Steven Millward
(And yes, we're serious about ethics and transparency. More information here.)

Read More