Closed jacksonj04 closed 5 years ago
OOI, why not add the constituencies? It seems like useful information and we do it on WTT so it would make sense to be consistent between them.
The aim of this is to allow Mayor's Questions to be included, and the constituency a member is elected to isn't really relevant to that. It's not an inordinate amount of work to add since the data is already in Wikidata, but it does mean adding more Popolo tooling to match areas and posts through arbitrary ID schemes.
I just think that come time for elections allowing people to look up "what my AM has been asking about" is kind of core TWFY functionality. Not sure what we said in the grant proposal for this though.
Adds a script to add London Assembly Members.
This runs the following SPARQL query against the WDQS endpoint to retrieve memberships of the London Assembly. One entry will be returned for each membership.
Matching/Creating People
It then tries to match members to
people.json
, or create new ones if it can't. Specifically, it:wikidata
identifier matching the query result.twfy_id
of the Wikidata object isn't set, it'll raise an info message to prompt improving Wikidata.twfy_id
of the Wikidata is object is set and doesn't match, it'll raise a warning for someone to investigate.--create
.--create
to mint new IDs.--create
, it'll mint new ParlParse IDs for new people.Matching/Creating Memberships
wikidata
identifier matching the snak identifier in the result. 9105e031a2801b7900fe165632e708aaad2bf68b has changes which enable this._max_member_id()
to support new memberships tolondon-assembly
in the ID range 200,000+. See 7c7c8d27a89a7bc7850b8f03f19c03b7eead8027.Constituency Members vs Additional Members
The 'Member of the London Assembly' role in this doesn't include a constituency; Members are elected using AM so although we could add a distinction between Constituency and Additional Members (this is sort of modelled in Wikidata) I don't think there's a benefit to doing so.
"What are all these warnings about?"
If you're reviewing this and run the script, you'll get lots of warnings telling you that ParlParse IDs aren't in Wikidata. This is because it wouldn't make any sense to add the IDs to Wikidata until this is merged, since the identifiers aren't actually reliable until they're committed.