knitr::opts_chunk$set(echo = TRUE) # set options #packages library(knitr) library(RODBC) library(nwos) #download data TABLES <- sqlQuery64("SELECT * FROM FS_NWOS.TABLES") FIELDS <- sqlQuery64("SELECT * FROM FS_NWOS.FIELDS") CODES <- sqlQuery64("SELECT * FROM FS_NWOS.CODES") TABLES <- TABLES[order(TABLES$TABLE_NAME),] #reorder FIELDS <- FIELDS[order(FIELDS$TABLE_NAME,FIELDS$COLUMN),] CODES <- CODES[order(CODES$TABLE_NAME,CODES$FIELD_NAME,as.numeric(CODES$CODE)),]
This document contains a current and up-to-date catalog of tables, fields, and codes in the NWOS Database (NWOS-DB).
The DB contains r nrow(TABLES)
tables, including administrative tables and survey tables, those tables containing information about the sampling frame, survey organization, and raw data.
kable(TABLES[,c("TABLE_NAME","DESCRIPTION","TYPE")],row.names=F)
The DB contains r nrow(FIELDS)
individual fields among the r nrow(TABLES)
tables.
kable(FIELDS[,c("TABLE_NAME","FIELD_NAME","DESCRIPTION","DATA_TYPE")],row.names=F)
r length(unique(CODES$FIELD_CN))
fields in the DB have coded values.
kable(CODES[,c("TABLE_NAME","FIELD_NAME","CODE","MEANING")],row.names=F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.