autotyp / autotyp-data

AUTOTYP data export
Creative Commons Attribution 4.0 International
38 stars 20 forks source link

Add missing N.levels information from overview to metadata files #7

Closed xflr6 closed 6 years ago

xflr6 commented 6 years ago

According to readme.md, N.levels is mandatory, yet it is missing in 627 variable descriptions in metdata/*.yaml. This PR fills them from metadata_overview.csv (assuming correctness of the file).

xflr6 commented 6 years ago

Code is here: https://gist.github.com/xflr6/da45b87485626477406078fec54ea67a

tzakharko commented 6 years ago

Thanks for the report! You are right, there is an inconsistency here. The yaml generation only outputs N.levels for categorical variables, and it would make sense to do it for all variables. Instead of pulling this from another table, I prefer to fix it in the core code though. So I'm going to reject your pull request and make a note to fix the scripts for the next bugfix release.