-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate country:uk ids to country:gb v2 #188
base: master
Are you sure you want to change the base?
Conversation
$ ./scripts/country-gb/build.py $ ./scripts/compile.py gb processing identifiers/country-gb/uk_parliament_consitituencies.csv processing identifiers/country-gb/combined_authorities.csv processing identifiers/country-gb/police_force_areas.csv processing identifiers/country-gb/naw_consitituencies.csv processing identifiers/country-gb/scottish_parliament_regions.csv processing identifiers/country-gb/naw_regions.csv processing identifiers/country-gb/country-uk.csv processing identifiers/country-gb/scottish_parliament_consitituencies.csv types pcon 650 spc 73 pfa 40 nawc 40 cauth 9 spr 8 nawr 5 country 1 fields id 826 100% name 826 100% gss_code 826 100%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good to me, I spot checked some random UK parliament constituencies to make sure they show up in the new file with the expected part.
My only comment is to restore the parts.csv file so there can be OCD IDs defined for those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdmgoogle Since you commented on #184 |
It generally LGTM. The only part I'd like to get more clarity on is why Parliamentary constituencies hang off Wales, Scotland, etc, when it sounds like the level at which they're created and administered is at the UK level. I'll defer to an in-country expert, but would like to at least see the argument as to why they're this way when
and
For example, if a US state had a law saying that state legislative districts couldn't cross county boundaries, would we say that the sldu and sldl identifiers had to hang off the counties and not the state itself, even though the boundaries are set and administered by the state? |
|
From my perspective (as the PR author), I'd like to get the existing IDs migrated from the Another (probably more useful) way you could think about introducing hierarchy would be: Instead of thinking about the constituent countries (or "parts" as they've been labelled) as geographic containers for divisions (which is what we're doing with the approach in this PR) we could get rid of that concept and think about divisions as children of legislatures they elect to. i.e: you say:
..and so on Maybe that way of introducing hierarchy is closer to the way @jdmgoogle is thinking about this but less in line with the angle @jloutsenhizer and @sguenther85 see it from? Correct me if I'm wrong.. |
My original argument for having the UK parliament constituencies hang off of each of the constituent countries was because they each have a boundary commission which define the boundaries of these constituencies, which felt to me in-line with USA. I think doing the hierarchy on the basis of which governmental body administers the constituencies make sense, and can get this unblocked. This model aligns with the current US gp-units since each US State determines their own districting. So I'm in support of moving forward with this proposed solution by @chris48s. Does this sound good to you, @jdmgoogle? |
We now have only 1 week left until the election. i repeat again my request to merge this now please after the election. |
Sorry for being the hold-up. SGTM. Approving and merging. |
Actually, let me sync with JustinL this morning and we'll resolve this ASAP. |
Discussed offline with @jdmgoogle. We'll hold off on merging until after the UK election on December 12th. |
Thanks, this is very helpful. |
@jdmgoogle Now that the elections over, let's revisit merging this |
This totally slipped the radar. @chris48s @sguenther85 any concerns with merging this PR now? If no, I'll proceed with merging it. |
@jloutsenhizer no concerns from my view. Like i thumbed up you last post: lets merging this :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change uk to gb in identifiers/country-eu.csv (and we can deal with brexit separately)
Otherwise LGTM -- thanks!
Happy if you want to go ahead with it in this form, or make changes based on the comments in #188 (comment) I think the issue tailed off somewhat unresolved. |
Thanks for calling that out, I had misremembered and thought that the changes from that comment were already in place. I just want to double check my understanding of the diff from the current PR would be: Is that correct? If so then I think that change sounds good to me and would be good to include in the current PR before mering. |
I was thinking we'd remove the
With Combined Authorities and Police Force Areas just hanging off |
Thanks for the explanation and examples. I don't think we should be going this route of adding in legislature clauses, since OCD IDs are meant to represent political geography and ocd-division/country:gb/legislature:uk_parliament isn't a piece of political geography (can't be drawn on a map). |
I see. If the constituent nations are just bounding boxes for divisions but don't encode any notion of a division's relationship to a legislature that representatives are elected to, it is probably equally meaningful or meaningless to apply that rule consistently to all boundaries ( i.e: #188 as it stands ) or none of them ( i.e: #186 as it stands ). |
The general heuristic I use as to what an OCD-ID is is that it's a structured name for a shape on a map. Some of those shapes exist solely because of legislative bodies, but those legislative bodies themselves are not shapes on maps. E.g., |
Makes sense.. so What is the heuristic for deciding when an identifier should/shouldn't also encode the concept of "this shape on a map is inside this other shape on a map"? |
The problem with
There was some discussion here: #181 (comment) OCDIDs are meant to identify geographies, not to encode their hierarchy. In general, we only include as much hierarchy as is needed to produce a stable identifier. For identifiers that are defined by authorities, we sometimes follow the hierarchy provided by that authority, if it'll better guarantee stability. This isn't always the case. For example, Canada Census subdivisions are within Census divisions, but we have OCDIDs like In #188, I suggested less hierarchy but later agreed to an extra level of hierarchy for UK parliamentary constituencies, on the understanding that these are set by different boundary commissions, who aren't guaranteed to coordinate unique names. If that understanding is incorrect, I'd rather |
👍
|
I'm not sure I agree that the only use of hierarchy is to prevent ID collision. If that's the case you could move all of the hierarchy necessary into the types, which is what is done in #186. where we use In that vein, you could rewrite the identifiers for US counties as I think what was previously suggested and would keep the amount of hierarchy away from either extreme is using the government in charge of the divisioning to determine the amount of hierarchy. So in this case you'd hang all of the UK parliament constituencies off of |
I agree with @jloutsenhizer's proposal. To expand on the use of hierarchy: There are many factors at play. Another factor is to avoid a proliferation of types within a jurisdiction, which increases complexity and reduces comparability. Most of the types in this PR are for electoral divisions. There isn't a conceptual difference between a Scottish parliamentary constituency and a Welsh parliamentary constituency; as such, they don't deserve their own types, as their semantics are essentially the same. For example, in Canada, there is a legal difference between provinces and territories, so we use the We sometimes proliferate types across jurisdictions to use local terms instead of generic terms, especially in cases where no generic type or correspondence is agreed (#170). In short: the type shouldn't encode hierarchy at all (unless that hierarchy is essential to its semantics – for example, a Census subdivision is essentially a child of a Census division), and the OCDID as a whole should generally only encode as much hierarchy as necessary. |
I've pushed some commits to this branch that apply the constituent nation (or
Just to clarify: #186 doesn't move hierarchy into the types - its just a straight migration from the
There is some difference in the sense that the Scottish Parliament and Welsh Assembly aren't exactly analagous - they have different powers. As one example, the Scottish Parliament has powers to vary the basic rate of income tax while the Welsh Assembly is reliant solely on funding by UK central government. Hence being the elected representative for a SP Region means you have different powers than an elected representative for a NAW Region does. So while they do both use the same words to describe their subdivisions, they're not just the exact same type of body in two different places. Maybe that is a bit like how a Province is different from a Territory, or perhaps it is not 🤷♂️ |
The difference you’re describing could be used to argue for a different type for Scotland and Wales instead of both using The constituencies on other hand are semantically the same. (Adopting a model where every difference at a higher level is inherited by sub-levels would create an extremely large taxonomy of types, which wouldn’t be useful and doesn’t make much sense since the function of types is categorization, not identification.) It’s important not to conflate political divisions, bodies (legislatures) and roles (representatives). |
Thanks for the changes @chris48s. I'm happy with the state of this PR now, @jpmckinney mind taking a look to see if there are any other concerns from your side before I merge? |
OK. I think I see where you're going with this now. I'm going to attempt to summarise your perspective, what we've changed, and why.. In 09a5a9a In 1c87a1c rather than just seeing the So whereas with the previous scheme, if we were going to add an idenfifier for Cardiff Council (for the love of god lets not try and get into adding IDs for more areas in this PR, but just as an example), you would have made the ID something like Is that summary correct, or am I still wide of the mark on understanding your thinking? |
Hmm, not quite. Political divisions are never just shapes on a map. Having a shape is a necessary condition, not a sufficient condition. It's also important to note that the shape needn't be agreed or stable, e.g. Western Sahara. Another necessary condition is that the shape must have some political identity (instead of splitting hairs on that one, I'll just defer to academic work in political geography, which is the theoretical basis for this project).
On your third summary: First, we'd never add an identifier for Cardiff Council, because OCDID's aren't for political bodies. But we can add one for Cardiff. I don't know the political processes by which UK councils are created, managed, merged, split, etc. or how their jurisdictions and territories are determined. If they are managed directly by the UK Parliament (by-passing the Welsh Assembly), then they could be under
Coming back to this, as it seemed to be a point of confusion:
We considered the reuse of |
Alternate solution for #184 incorporating a clause for constituent nation (England/Wales/Scotland/Northern Ireland) as proposed in #184 (comment)
This branch has the same commits as #186 with 6f59a09, 4c369fd and 09a5a9a added on top so its easier to compare the two. If you want to merge this version instead of #186 , let me know and I'll rebase to tidy the history up.