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

Tables in DB missing from metadata #11

Closed
deepayan opened this issue Oct 23, 2023 · 4 comments
Closed

Tables in DB missing from metadata #11

deepayan opened this issue Oct 23, 2023 · 4 comments
Assignees
Milestone

Comments

@deepayan
Copy link

deepayan commented Oct 23, 2023

The following tables are in the database (can be retrieved using nhanes(name)) but do not appear in the metadata table Metadata.QuestionnaireDescriptions.

The commonality seems to be that their nhanesCodebook() is also broken.

@rsgoncalves
Copy link
Contributor

What seems to be happening with these is that nhanesA::nhanesTables() isn't returning them—a bug in nhanesA likely.

For example, the table SSANA_A isn't among the 1999-2000 survey tables obtained via:

tables_99 <- nhanesTables(data_group="LAB", year=1999, details=TRUE, includerdc=TRUE)

@deepayan
Copy link
Author

Thanks, I'll take a closer look. Interestingly,

nhanesTables(data_group="LAB", year=1999, details=TRUE, includerdc=TRUE)

run without the DB finds a few more tables, but none of the ones listed above:

"LAB05"    "L11_2_R"  "L09RDC_A" "L05RDC_A" "L06_2_00" "VID_2_00" "L10_2_00" "L18_2_00" "L13_2_R"  "L19_2_R" "L16_2_R"  "L25_2_R"  "VIT_2_R"

@deepayan
Copy link
Author

So, it looks like

nhanesTables(data_group="LAB", year=1999, details=TRUE, includerdc=TRUE)

doesn't include SSANA_A because it and its variables are not included in

https://wwwn.cdc.gov/Nchs/Nhanes/search/variablelist.aspx?Component=Laboratory&CycleBeginYear=1999

which is where nhanesTables() looks. This looks like a bug in the NHANES website.

I am not sure how we can work around this. Changing nhanesTables() doesn't really make sense. We probably need to work off a different source of tables (like the nhanesA::nhanesManifest() recently added by @rgentlem).

@rsgoncalves rsgoncalves self-assigned this Nov 16, 2023
@rsgoncalves rsgoncalves added this to the v3.8.0 milestone Nov 30, 2023
rsgoncalves added a commit that referenced this issue Dec 1, 2023
…chTableNames(). Add EnglishInstructions to nhanes_variables.tsv

Closes #9 #11 #17 #18 #20
@rsgoncalves
Copy link
Contributor

rsgoncalves commented Dec 5, 2023

Thank you @deepayan. Using nhaneManifest() we now have all the listed tables in the metadata release https://github.com/ccb-hms/NHANES-metadata/releases/tag/v3.8.0 (to be included in the NHANES DB in the next iteration).

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

No branches or pull requests

2 participants