everypolitician / everypolitician-data

data for national legislatures worldwide
http://everypolitician.org/
237 stars 54 forks source link

Kenya: Improve Mzalendo scraper #119805

Open tmtmtmtm opened 8 years ago

tmtmtmtm commented 8 years ago
chrismytton commented 8 years ago

identifier__mzalendo column added in https://github.com/tmtmtmtm/kenya-mzalendo/commit/663f1606c4e520d04133ebae005b5d5c732f6296.

mhl commented 8 years ago

You can now find historic terms (well, currently the one historic term) via: http://info.mzalendo.com/sessions (that unadvertised URL is likely to be renamed with mysociety/pombola#2179).

Note that the people shown on each page are picked because they have a position which matches the ParliamentarySession house / position_title and the position's start_date / end_date overlap with that session's start_date / end_date. However, many of the position start_date / end_date values are approximate dates, so a position from 2003 to 2007 (approximate dates) is almost certainly meant to mean just someone in the 9th Parliament of Kenya (2003 -> 2007) term of parliament, but the code currently will assume this overlaps with the 10th Parliament of Kenya (2007 -> 2013) because its start date is 2007-12-28 .

So there may be some false positives for the moment - the scraper will need to check the person's page and look at the dates. Or there are a couple of ways to deal with that on the Pombola end.

Related to: mysociety/pombola#2171 (PR: https://github.com/mysociety/pombola/pull/2172 )