Skip to content
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

update DE constituencies for 2025 snap election #394

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zikowang
Copy link
Contributor

@zikowang zikowang commented Nov 12, 2024

Adding README

Why we propose to change the ocd_paths back using names instead of numbers

  1. while updating the ocd_paths we discovered that 184 constituency numbers changed while they actually staying the same. It was triggered by one change.
  2. also we have 6 valid through and 6 valid from constituencies that keeps the number but is actually different (with a different name).
  3. to keep backward compatibility we added entries to the aliases.csv file

We can not build the new country CSV file because the alias file has chains

Example:

sameAs chain: ocd-division/country:de/land:bb/wahlkreis:brandenburg_an_der_havel_~_potsdam-mittelmark_i_~_havelland_iii_~_teltow-fläming_i -> ocd-division/country:de/ed:60 -> ocd-division/country:de/ed:brandenburg_an_der_havel_-_potsdam-mittelmark_i_-_havelland_iii_-_teltow-fläming_i 
  • the first two entries were added in 2021
  • with our proposal, we would add another alias for ocd-division/country:de/ed:60 using the name instead of the number

How can we proceed from here, since the election is near and we need those OCDs to official.

Best,

@zikowang
Copy link
Contributor Author

Dear @jloutsenhizer @jpmckinney ,

can you please have a quick look, maybe we can figure out a solution for germany.

@jloutsenhizer
Copy link
Contributor

RE sameAs chain issue. For any of these, I'd recommend updating the old alias to point to whatver is at the end of the chain.

So in the example you shared, it looks like we should update ocd-division/country:de/land:bb/wahlkreis:brandenburg_an_der_havel_~_potsdam-mittelmark_i_~_havelland_iii_~_teltow-fläming_i to be sameAs ocd-division/country:de/ed:brandenburg_an_der_havel_-_potsdam-mittelmark_i_-_havelland_iii_-_teltow-fläming_i

@zikowang
Copy link
Contributor Author

Thank you for the reply,

When we update the sameAs entry for ocd-division/country:de/land:bb/wahlkreis:brandenburg_an_der_havel_~_potsdam-mittelmark_i_~_havelland_iii_~_teltow-fläming_i

we would lose the ocd-division/country:de/ed:60 in between, so that those paths would be invalid from now on.

Will that be a problem? If not, I am happy to adjust all those chain entries in the aliases file.

@jloutsenhizer
Copy link
Contributor

That should be fine, aliases are meant to be transitive, so the check that's failing is making sure that there isn't unnecessary chaining to get to the canonical OCD ID

@zikowang
Copy link
Contributor Author

Okay, I cleaned up the aliases file and compiled the country-de.csv file.

Please have a look at the results.

Copy link
Contributor

@jloutsenhizer jloutsenhizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't thoroughly looked through the changes but left some comments on initial issues I saw.

Overall, I wanted to confirm that it is the name that carries the identity of the district, and not the number. So even though the number of many districts changed, since the name remains the same it'd be accurate to say people running for re-election are running in the same district and, if they win, have a continuous tenure?

ocd-division/country:de/ed:elbe-elster_-_oberspreewald-lausitz,Elbe-Elster - Oberspreewald-Lausitz,2025-02-23,
ocd-division/country:de/ed:66,Altmark,,2025-02-23
ocd-division/country:de/ed:altmark_-_jerichower_land,Altmark - Jerichower Land,2025-02-23,
ocd-division/country:de/ed:67,Börde - Jerichower Land,,2025-02-23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like some of these retain the number-based ID. Shouldn't they all be switched to names?

ocd-division/country:de/state:sl/cd:296,ocd-division/country:de/ed:saarbrücken,Saarbrücken,,
ocd-division/country:de/state:sl/cd:297,ocd-division/country:de/ed:saarlouis,Saarlouis,,
ocd-division/country:de/state:sl/cd:298,ocd-division/country:de/ed:st._wendel,St. Wendel,,
ocd-division/country:de/state:sl/cd:299,ocd-division/country:de/ed:homburg,Homburg,,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also have the mapping from the ed:<number> to ed:<name> in aliases. So for example we should have ocd-division/country:de/ed:299 equivalent to ocd-division/country:de/ed:homburg.

Or are these left out because of the ID shifts that happened with the latest changes by the government?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants