Hi there, noob here.

68 views
Skip to first unread message

mark jones

unread,
Mar 30, 2015, 4:02:47 PM3/30/15
to theywor...@mysociety.org
Hi all,
 
Just wanted to say hello.  I am a currently working on a prototype for a new political app, for which I am hopeful that the MVP will go live in next couple of weeks.
 
As such I am really interested in the data available from TWFY and public whip. I have so far found that the results I get from the TWFY API are a bit of a mixed bag. I have also tried running the python scripts to generate the XML (if I can get it working I will run it in an azure webjob), but I get errors, and have had no luck so far.
 
Anyways, just wanted to say hi, and warn you that I may loiter here as I try and get these data sources working in a way I can use.
 
Regards
 
Mark

Nick Jackson

unread,
Mar 30, 2015, 4:18:38 PM3/30/15
to theywor...@mysociety.org
Hi Mark,

If you let us know the problems you're having with the TWFY API we might be able to offer some suggestions!

Nick

mark jones

unread,
Mar 31, 2015, 2:25:02 AM3/31/15
to theywor...@mysociety.org
Hi Nick,
 
Thanks for your reply.
 
 I do not seem to be able to get only the debate on a specific bill easily, and am finding a lot of data included in my results that is irrelevant. I am hoping you might be able to provide some advice on how to best query the API to get the kind of results I am looking for.
 
For example, I am able to see on the government website a number of debates around the Childcare Payments Act 2014
 
http://services.parliament.uk/bills/2014-15/childcarepayments/stages.html
 
If I perform a search with the following query:
 
http://www.theyworkforyou.com/api/getDebates?type=commons&search=Childcare+Payments+Act+2014&num=200&output=js
 
I only get back 2 results, however I know there is much more to get. Also I have noticed with other searches that I am getting results back for many other debates. Obviously it is because I am searching for a string, and it is being matched against other bills. In some instances I have seen a result come back with a low relevance, but is actually it is related to the bill I am interested in.
 
Ultimately I want to pull back everything for a given bill, so I have tried the Hansard data too, but that is even more complex as it is all so full of debates from other houses such as NI or Scotland. My understanding of the political system is not that detailed, but ordinarily would I not only expect to find debates in the commons or the house of lords for a bill such as the Childcare Payments Act? 
 
Mark

Matthew Somerville

unread,
Mar 31, 2015, 4:15:41 AM3/31/15
to theywor...@mysociety.org
On 31 March 2015 at 07:25, mark jones <aradic...@googlemail.com> wrote:
> If I perform a search with the following query:
>
> http://www.theyworkforyou.com/api/getDebates?type=commons&search=Childcare+Payments+Act+2014&num=200&output=js
>
> I only get back 2 results, however I know there is much more to get.

You're searching for Act, whereas before it is passed and received
royal assent, it is not an Act, but a Bill (and won't have a year
either). Searching for Childcare Payments Bill returns more results;
some won't be that relevant, as that's just searching for things
containing all those words, unless you put the phrase you want in
quotes to produce a phrase search (search options are explained e.g.
on the right hand side of http://www.theyworkforyou.com/search/ ).
Searching for "Childcare Payments Bill" (with quotes) gives me the
1st, 2nd, programme, and 3rd stage debates, plus some "Business of the
House" debates referring to the bill, all seem relevant.

To get the Public Bill Committee, there's only one per bill, so might
be easier to just locate
http://www.theyworkforyou.com/pbc/2014-15/Childcare_Payments_Bill/ but
a search with getHansard including section:pbc should find it (though
there does appear to be a bug with the "listurl" returned there, but
you can work it out easily enough).

> ordinarily would I not only
> expect to find debates in the commons or the house of lords for a bill such
> as the Childcare Payments Act?

Yes, the Parliament page you linked to above lists them all.

Hope that's helpful.

ATB,
Matthew
Reply all
Reply to author
Forward
0 new messages