Skip to content

DK: an id per edition, and two editions with no crop at all - #258

Open
ivorbosloper wants to merge 1 commit into
mainfrom
split/dk
Open

DK: an id per edition, and two editions with no crop at all#258
ivorbosloper wants to merge 1 commit into
mainfrom
split/dk

Conversation

@ivorbosloper

Copy link
Copy Markdown
Collaborator

Part of the publish-portolan split (#231-#257). Nineteen editions, 2008-2026, 11.4M field-years.

The identifier changes halfway through the series

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".
  • Before 2014 the source names the applicant instead — Ansoeger until 2011, KUNDE_LB in 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 on publish-portolan is not in this PR.

Note for whoever merges

This adds the same "<id>#<label>" test mechanism as #243 (three lines in test_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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant