g0v / api.ly

api.ly.g0v.tw - ly api endpoint
14 stars 6 forks source link

data integrity check: committee reports and bills #41

Open clkao opened 10 years ago

clkao commented 10 years ago

we should produce a list of reports and bills that we don't have proposed amendment extracted.

we can simply do a query (or corresponding api.ly query):

ly=# select bill_id from bills where summary like '報告%' and bill_ref is not null

all items should contain data field with lawdiff content

ditto for bills.

clkao commented 10 years ago
select * from (select bill_id, data ~> '@content.length' as diff from bills
    where summary like '報告%' and summary  !~* '總預算案' and bill_ref is not null) z where diff::text = '0';