Skip to content

Keep persons without a listed child in biobirth - #109

Open
hmgaudecker wants to merge 3 commits into
mainfrom
feat/childless-in-biobirth
Open

hmgaudecker wants to merge 3 commits into
mainfrom
feat/childless-in-biobirth

Conversation

@hmgaudecker

Copy link
Copy Markdown
Collaborator

biobirth is reshaped to one row per child and every empty enumeration slot is dropped. That also drops everyone who lists no child, so number_of_children (sumkids) is never 0 in the cleaned module and the childless cannot be told apart from persons without a fertility biography.

  • drop_unlisted_children keeps the slots holding a child and, for each person without any, one row with the child variables and child_number missing.
  • child_number becomes a nullable integer (int8[pyarrow]); the catalogue entry is updated by hand.
  • Tests for parents, the childless and the missing child number.

https://claude.ai/code/session_01QikUNrBdk7tPGjgDTTMPUz

Dropping every empty enumeration slot dropped the childless, so their
number_of_children (sumkids = 0) never reached the cleaned module. Each
person without a listed child now keeps one row with the child variables
and child_number missing; child_number becomes a nullable integer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QikUNrBdk7tPGjgDTTMPUz
@read-the-docs-community

read-the-docs-community Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 soep-preparation | 🛠️ Build #35288528 | 📁 Comparing 6cff4e7 against latest (ecc42c5)

  🔍 Preview build  

1 file changed
± variables/index.html

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QikUNrBdk7tPGjgDTTMPUz
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/soep_preparation/clean_modules/biobirth.py 77.77% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Grouping by the person dropped rows with a missing hh_id_original.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QikUNrBdk7tPGjgDTTMPUz
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