mysociety / popit

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained
https://goo.gl/Vvej4Q
Other
76 stars 33 forks source link

How to know if a post is vacant? #234

Closed jpmckinney closed 11 years ago

jpmckinney commented 11 years ago

A post is a position in an organization that can exist without anyone holding it, like the posts of Members of Parliament. It does not seem possible to represent, with PopIt, that a post is vacant, e.g. the post "Member of Parliament for Aldershot". PopIt's positions model seems to map to a join model between people and these posts, and not to a posts model itself.

Of course, not all positions are posts. Committee membership is often a more direct relationship between people and organizations (committees, in this case). The seat a person occupies in a committee typically doesn't exist without their holding it, except maybe in the case of the chair, or in the case where the committee has a fixed size.

In order to model that a post is vacant, it seems necessary to have more, richer ways of representing positions.

evdb commented 11 years ago

There was a discussion about this issue between @jpmckinney, @dracos, @mhl and @evdb over IRC (transcript).

Summary is that the current positions modelling in PopIt might be too simplistic. Instead it might be necessary to model the following (using, I think, the terminology from http://www.w3.org/TR/vocab-org/):

(NB Agent could be a person or an organisation. For our purposes it will only be a person) NB We'd need to attach 'Place' to 'Post' to model things like Members of Parliament, and to resolve the issue that started this ticket.

So a "CEO" would be a role, "CEO at IBM" would be a post, and "Bob the CEO at IBM" would be a membership.

For some memberships there might not need to be a post - for example "Party Member", but then there is a complication that to create the membership "Sue is a Party Member of the Conservative Party" the org would have to be in the membership unless you were to create a "Member" post for each party.

Some unresolved questions:

dracos commented 11 years ago

"If several Post entries are created (eg one for each "Councilmembers At-Large in Philadelphia")" - no, I don't think you would ever do that.

jpmckinney commented 11 years ago

@dracos You can do that to represent that there are exactly six "Councilmember At-Large" Posts. If the city charter adds or removes at-large members, you just add or remove Post documents. It's entirely possible for six people to hold identically named posts, without holding the same post. There may be a confusion between "posts" and "roles" here. All councilmembers (whether at-large or for a specific ward) fulfill the role of "councilmember" within the city council. However, each of them occupies a different seat (or post) within the council.

What is your alternative? To put a "maximum_appointments" and "minimum_appointments" field on the Post, both equal to six, in order to express that city council expects exactly six councilmembers at-large? All that just to avoid adding a few rows or documents to a database? I think it's much simpler to implement the more direct method described above. Anyway, curious to know what's wrong with making six Posts.

jpmckinney commented 11 years ago

@evdb Going through your four questions:

  1. It's possible to get away without Roles (as defined by the W3C doc). It depends on your requirements. I'm not using it in my work.
  2. Posts and Memberships are alternative ways of representing the person-org relation. They are not mixed together. The options presented by W3C are (using Turtle RDF notation so you can more easily look up properties in the doc):

    • ex:person org:memberOf ex:organization. (person-organization)
    • ex:person org:hasMembership ex:membership. ex:membership org:organization ex:organization. (person-membership-organization)
    • ex:person org:holds ex:post. ex:post org:postIn ex:organization. (person-post-organization)

    You'd use the first if it's the simplest possible membership (one where you don't even need to track start and end dates). If you want to track metadata, you have two options: a Membership object or a Post object. This section of the doc explains why you may prefer one over the other.

    In terms of implementation, the first two are probably not that different, since the first would usually require a collection/table to express the many-to-many relation, at which point it's not hard to add metadata to each document/row and make it a full-fledged Membership.

    I like having the option to use either/both Membership and Post, as they do have distinct use cases.

  3. For party member, I would prefer not to create a Post, and link the Person to the Organization using one of the first two options. That's because there is no Post "Party Member" that exists without someone holding it. If a member leaves the party, there is no Post that becomes vacant. (Tangentially, if using the second option, I can add a role of "party member" if I want to be more explicit.) For party leader, I would create a Post, because it does exist in the absence of a person acting as party leader.

    Re: which Person gets assigned to which "Councilmember At-Large" Post, does it matter?

  4. I think things will seem complicated until we find an appropriate way to implement them. The concepts here are not hard. It's figuring out a clean way to convert the concepts to code that is. If it helps, I need this, and I expect others will need it, especially as more apps are built on top of PopIt.
dracos commented 11 years ago

@jpmckinney I misunderstood what At-Large meant, ignore me :)