Adds start_reason and end_reason data to memberships from London Assembly.
For start_reason, defaults to unknown, except for if:
The membership has an "elected in" property, in which case start_reason is regional_election, or;
For memberships where the person has previously ended a membership with changed_party, if the end date of that membership matches the start date of this one, assume the start reason is also changed_party.
For end_reason, will default to unknown but will raise a warning whilst doing so (this should usually be provided explicitly in Wikidata). Mappings between Wikidata IDs and ParlParse reason codes are in the END_REASON_MAP hash.
Adds
start_reason
andend_reason
data to memberships from London Assembly.For
start_reason
, defaults tounknown
, except for if:start_reason
isregional_election
, or;changed_party
, if the end date of that membership matches the start date of this one, assume the start reason is alsochanged_party
.For
end_reason
, will default tounknown
but will raise a warning whilst doing so (this should usually be provided explicitly in Wikidata). Mappings between Wikidata IDs and ParlParse reason codes are in theEND_REASON_MAP
hash.