everypolitician / commons-builder

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

Issues with generate_legislative_index for South Korea #23

Open alexdutton opened 6 years ago

alexdutton commented 6 years ago

Running generate_legislative_index against everypolitician/proto-commons-south-korea results in a file that only lists The National Assembly (Q494162), and none of the FLACSen or cities.

If we loosen the query to also include P1001 (applies to jurisdiction) we'd pick up a few Provincial/City Government → Province/City relationships, but…

These Provincial/City governments are modelled as instances of local government, not legislature or legislative house as we had before. local government is also applied to e.g. Incheon Metropolitan City Office of Education.

I think we should add legislature types to the Provincial/City Governments, alongside their existing local government types.

We can probably cope with being looseness of ?body (wdt:P194/wdt:P527?)|^wdt:P1001 ?legislature, unless anyone thinks wdt:P194 should be the One True Way.

http://tinyurl.com/ybey28qp provides context.

https://gist.github.com/alexsdutton/0eb41f525d916453a0639bc4ea512a06 is legislature/index.json with both of these things loosened. It would include unhelpfully the Offices of Education if they had P1001s, which it would be reasonable for them to have.

alexdutton commented 6 years ago

Tagging @tmtmtmtm and @ostephens

ostephens commented 6 years ago

I think Government is a larger item, of which the Legislature is a part. That would point to a slightly different approach of creating (or identifying) additional items which specifically represent the legislature as part of the Government.

So we are looking for https://www.wikidata.org/wiki/Q16096697 rather than https://www.wikidata.org/wiki/Q16097618 I think

Query for councils in South Korea http://tinyurl.com/y8mak8a9

tmtmtmtm commented 6 years ago

Yes, in general we want legislatures, not governments. However Q16096697 was an instance of Q4358176 (council) [which isn't a subclass of legislature], so I've fix that to Q3154693 (city council). We'll probably also need to correct others too, judging by the query linked to by @ostephens above.

ostephens commented 6 years ago

I've changed all the metropolitan councils to be instances of Q3154693, but at the moment not obvious what the provincial councils should use.

ostephens commented 6 years ago

Just realised once a P31 to Q37002670 (unicameral legislatures) is added to each* then this will mean these are all ultimately subclassed from legislature anyway which I think should be sufficient for g_l_i as long as other appropriate statements are in place

* or if they are bicameral (don't think they are) we'll need to do some more work to add the appropriate houses