everypolitician / commons-builder

Build scripts for Democratic Commons repositories
MIT License
1 stars 0 forks source link

Handle legislatures where membership is expressed as being for a specific term. #52

Closed crowbot closed 6 years ago

crowbot commented 6 years ago

This is the case in Estonia, (e.g. https://www.wikidata.org/wiki/Q616356) and the UK (https://www.wikidata.org/wiki/Q234182)

crowbot commented 6 years ago

Handle the modelling of representatives in wikidata as belonging to a specific term

alexdutton commented 6 years ago

My thinking is that it'd make sense to add position_item_id as an optional item to terms in the index, collected at index generation time, e.g.:

  {
    "comment": "Riigikogu",
    "house_item_id": "Q217799",
    "position_item_id": "Q21100241",
    "terms": [
      {
        "comment": "13th Riigikogu",
        "term_item_id": "Q20530392",
        "position_item_id": "Q33129158"
      }
    ]
  }

and then look for that in the membership query, in preference to the generic position item.