DK: an id per edition, and two editions with no crop at all - #258
Open
ivorbosloper wants to merge 1 commit into
Open
DK: an id per edition, and two editions with no crop at all#258ivorbosloper wants to merge 1 commit into
ivorbosloper wants to merge 1 commit into
Conversation
Marknr numbers a field within one application, so on its own it repeats across holdings — 38 of 100 sampled 2026 rows shared one. From 2014 the source names the application (Journalnr) and the pair identifies a field; where the application is missing (70 of 599,008 rows in 2015, the worst edition) the id is left empty and the row is dropped downstream, rather than every such row sharing an id of "nan". The older editions name the applicant instead — Ansoeger until 2011, KUNDE_LB in 2012 and 2013 — and that pair genuinely repeats: 5,124 keys cover 11,534 of the 678,347 fields of 2008, mostly distinct polygons of distinct size. Nothing there identifies a field, so the row index does, which is safe because an edition is one file. 2008 and 2009 carry no crop columns at all. The HCAT mixin now returns the frame untouched when an edition has none, instead of failing on a column it cannot find, so those two convert as boundaries. A fixture for 2008 covers the older shape, through an entry of the form "<id>#<label>" that runs a second edition of one converter from the same folder of input files. Nineteen editions (2008-2026) are built and published, 11.4M field-years. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG
This was referenced Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the
publish-portolansplit (#231-#257). Nineteen editions, 2008-2026, 11.4M field-years.The identifier changes halfway through the series
Marknrnumbers a field within one application, so on its own it repeats across holdings — 38 of 100 sampled 2026 rows shared one.Journalnr) and the pair identifies a field. Where the application is missing (70 of 599,008 rows in 2015, the worst edition) the id is left empty and the row is dropped downstream, rather than every such row sharing an id of"nan".Ansoegeruntil 2011,KUNDE_LBin 2012-2013 — and that pair genuinely repeats: 5,124 keys cover 11,534 of the 678,347 fields of 2008, mostly distinct polygons of distinct size. Nothing there identifies a field, so the row index does.2008 and 2009 carry no crop columns at all
The HCAT mixin returns the frame untouched when an edition has none, instead of failing on a column it cannot find, so those two convert as boundaries. That is four lines in
commons/hcat.py; the other HCAT work onpublish-portolanis not in this PR.Note for whoever merges
This adds the same
"<id>#<label>"test mechanism as #243 (three lines intest_convert.py), so whichever of the two merges second will want a trivial conflict resolution.Original commits: 7d5d9aa, f6e3ab5 (the dk half), 10a8cbf.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DVx9uQV2QPM8ecPAY3ZjXG