Earlier in a post on Habré, I wrote about the very first step for creating an API for ROI - unloading existing data using a parser.
API for the Russian public initiative. Step 1: data collection and analysis
But this step, of course, although important, is not the last in understanding what we want to do. There is one more step - to see what others have done. There are a lot of projects on electronic petitions in the world, we will consider several of them from the point of view of API and open data.

')
UK Electronic Petitions (epetitions.direct.gov.uk)
The UK was one of the first countries to introduce the practice of collecting petitions from citizens and the obligation to consider them.
Through the British project
epetitions.direct.gov.uk passed several tens of thousands of petitions of which -
- open 5,741 petitions
- 18,323 petitions closed
- 21,030 petitions rejected
all numbers on November 5, 2013Details on the website
http://epetitions.direct.gov.uk/petitions?state=openRussian petitions are somewhat similar to the British ones, it is also necessary to collect 100 thousand signatures there and no more than 1 year is given to everything.
However, UK petitions have several important features:
- The petition is sent to the executive branch. Filling it, you yourself choose to which department it belongs and the petition is checked by the staff of this particular department. Thus, they confirm that what is written in the petition is in principle possible and all actions take place within the authority of the government, and not in the powers of the courts or parliament.
- The creation of petitions is non-anonymous and their authors are known - this is published on the petition page
- There is no tight binding to a person like us with a portal of public services. To vote or to register a petition, just fill out a small form by entering your address, email and zip code.
- The project is created in open development mode and its source code is available on github https://github.com/alphagov/e-petitions
- The project has an open API, more details on which are written here - http://epetitions.direct.gov.uk/faq#question11
Petitions are divided into two parts.
The 1st is a list of all petitions with details and the 2nd is the ability to update petition vote data in real time.
A list of all petitions is available at:
http://epetitions.direct.gov.uk/api/petitions.json (approximately 36 megabytes)
A description of a separate petition looks like this:
{ "petition":{ "id":10, "created_datetime":"2011-07-28T23:35:39Z", "response":null, "department_name":"Cabinet Office", "title":"resign", "creator_name":"Nigel Woodcock", "description":"We, the people of the United Kingdom of Great Britain and Northern Ireland, call upon Prime Minister David Cameron to resign with immediate effect and to call a general election. This is required due to his lack of mandate, the Conservative Party having gained only 36% of the vote in the 2010 general election. It is doubtful that anyone who voted Liberal Democrat would endorse the neoliberal policies currently being pursued by the coalition government. Therefore a general election is required in order to validate or repudiate current governmental policies. ", "last_update_datetime":"2012-08-04T18:00:09Z", "closing_datetime":"2012-02-04T15:07:57Z", "state":"open", "signature_count":1849 } }
In this petition calling for David Cameron to resign, we have all the information we need on the petition page.
But for real-time data, the data do not contain details on each petition, but contain details on the voting geography.
Data is available via links in
epetitions.direct.gov.uk/api [petition number] .jsonfor example, like this -
http://epetitions.direct.gov.uk/api/petitions/44403.jsonGeography is described in the form of postal codes, and that is, the detail is even higher than if we have detailed into municipalities.
They do not publish historical data, assuming that those interested can independently monitor the API and upload data on a regular basis.
Pros and cons of approach
Clear advantages:
- + API in REST + JSON format
- + the possibility of mass unloading of the petition base
- + data is updated in real time
- + there is a binding of petitions to the authorities
- + there is information on the responses from the authorities
- + high detail geolocation polls
And obvious cons:
- - API documentation is weak, simple data, but a couple of lines they could lead
- - there is no possibility to follow the voting in time section - by months and days
- - there is no possibility to make complex requests, you need to regularly download the entire base of petitions
It is still too early to compare ROIs and UK electronic petitions in content. Meaningfully, we are just at the start, but in terms of technological quality it is quite possible.
In the next step 2.2, I will write about the US electronic petition system and how it discloses data on each petition.