ccb-hms / nhanes-database

3 stars 4 forks source link

Tables mislabeled as limited access #151

Closed deepayan closed 6 months ago

deepayan commented 7 months ago
> ltd = nhanesManifest("limited")
> ltdTables <- nhanesQuery("select * from Metadata.ExcludedTables where Reason = 'limited access'")$TableName
> ltdTables[!ltdTables %in% ltd$Table]
[1] "SPXRAW" "PAXRAW" "CHLMDA" "CHLA"   "CHLM"   "LAB05"  "L05"    "PAXMIN"

None of these tables actually exist, except for LAB05.

LAB05 is one of those weird tables that are partially public (adults are public, youth are not). It is NOT, however, listed in the limited access manifest, so we should not be able to identify it as a limited access table.

The DB excludes it, but it is available from the CDC website:

> str(nhanes("LAB05"))
Error in .checkTableNames(nh_table) : 
  Table(s) LAB05 missing from database
> nhanesOptions(use.db = FALSE)
> str(nhanes("LAB05"))
'data.frame':   2101 obs. of  3 variables:
 $ SEQN  : num  6 12 15 20 21 27 28 34 42 45 ...
 $ URXUGC: Factor w/ 2 levels "Positive","Negative": 2 2 2 2 2 2 2 2 2 2 ...
 $ URXUCL: Factor w/ 2 levels "Positive","Negative": 2 2 2 2 2 2 2 2 2 2 ...