everypolitician / everypolitician-data

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

Tonga #160

Closed duncanparkes closed 9 years ago

duncanparkes commented 9 years ago
duncanparkes commented 9 years ago

Scraper here: https://morph.io/duncanparkes/tonga

This doesn't currently include parties, as there is not data on them on the official site, and I couldn't immediately see it anywhere else. There is one noble listed without a constituency - this matches what's on the official site.

tmtmtmtm commented 9 years ago

Parties are rather important in a Tongan context, as this is only the second Parliament since the reforms under the new king, where they first became allowed, and there was lots of haggling over them (with the lead party offering ministry positions to independents if they would join up, so that they could form a majority and not have a Nobles-led government)

However, even more importantly, this data doesn't include an id column; has mis-matching Term data (the records all say they're for the 2010 Term, but the terms table only lists the 2014 Term); and has quite a few invalid URLs in the images column too.

duncanparkes commented 9 years ago

Images now %quoted to get rid of spaces:

https://github.com/duncanparkes/tonga/commit/79466eaf9358d84d776c05c9f0bc97b8b37e3fba

duncanparkes commented 9 years ago

Term for the records set to 2015 to match the terms table (I believe I chose 2015 rather than 2014 as the date the session started rather than the date of the election).

https://github.com/duncanparkes/tonga/commit/c37e537ebf6eab2aabfeb3e5992171dd4fe4790c

duncanparkes commented 9 years ago

Use final part of details_url as id:

https://github.com/duncanparkes/tonga/commit/0761df8749f14f2003df56c538247c5426e84dc4

duncanparkes commented 9 years ago

I still can't see who's in what party anywhere. It looks like parties are still basically unofficial.

tmtmtmtm commented 9 years ago

Closed by #229