Skip to content

Commit

Permalink
refresh w/ new packages; another failed attempt at odbc
Browse files Browse the repository at this point in the history
ref #56
  • Loading branch information
wibeasley committed Oct 13, 2018
1 parent 3855951 commit cd709e7
Show file tree
Hide file tree
Showing 14 changed files with 3,186 additions and 824 deletions.
2 changes: 1 addition & 1 deletion LinksGui/App.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Application x:Class="LinksGui.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Gui97.xaml">
StartupUri="Gui79.xaml">
<Application.Resources>

</Application.Resources>
Expand Down
1,531 changes: 1,382 additions & 149 deletions analysis/eda/counts/counts.html

Large diffs are not rendered by default.

156 changes: 70 additions & 86 deletions analysis/eda/counts/counts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Row Counts of Tables
date: "Date: 2018-06-27"
date: "Date: 2018-10-13"
output:
html_document:
keep_md: yes
Expand Down Expand Up @@ -40,7 +40,7 @@ This report documents the basic properties of the input & output tables kinship
# Summary {.tabset .tabset-fade .tabset-pills}

## Notes
1. The current report covers 52 tables in the NLSY79 and 52 tables in the NLSY97.
1. The current report covers 50 tables in the NLSY79 and 50 tables in the NLSY97.
1. For the NLSY79, 1,642 variables are defined, and 1,606 variables are 'active'.
1. For the NLSY97, 551 variables are defined, and 551 variables are 'active'.

Expand All @@ -55,7 +55,7 @@ This report documents the basic properties of the input & output tables kinship
|schema name |table name | row count| column count|
|:-----------|:--------------------------|---------:|------------:|
|Archive |tblArchiveDescription | 56| 4|
|Archive |tblRelatedValuesArchive | 751,650| 24|
|Archive |tblRelatedValuesArchive | 794,486| 24|
|dbo |sysdiagrams | 4| 5|
|Enum |tblLUBioparent-not-used | 0| 2|
|Enum |tblLUExtractSource | 11| 4|
Expand Down Expand Up @@ -86,11 +86,9 @@ This report documents the basic properties of the input & output tables kinship
|Extract |tblLinks2004Gen1 | 3,890| 9|
|Extract |tblLinks2004Gen2 | 12,855| 5|
|Metadata |tblItem | 110| 7|
|Metadata |tblItem_97 | 7| 7|
|Metadata |tblMzManual | 208| 9|
|Metadata |tblRosterGen1Assignment | 50| 16|
|Metadata |tblVariable | 1,642| 10|
|Metadata |tblVariable_97 | 37| 10|
|Process |tblBabyDaddy | 178,993| 11|
|Process |tblFatherOfGen2 | 52,038| 7|
|Process |tblIRDemo1 | 0| 5|
Expand Down Expand Up @@ -1887,6 +1885,7 @@ and created a lot of noise in the Git difs
|Archive |tblArchiveDescription | 8| 3|
|Archive |tblRelatedValuesArchive | 27,709| 23|
|dbo |sysdiagrams | 0| 5|
|dbo |tblLUDeleteMe | 0| 4|
|Enum |tblLUExtractSource | 6| 4|
|Enum |tblLUGender | 3| 4|
|Enum |tblLUMarkerEvidence | 8| 4|
Expand All @@ -1896,7 +1895,7 @@ and created a lot of noise in the Git difs
|Enum |tblLURoster | 92| 4|
|Enum |tblLUTristate | 3| 4|
|Enum |tblLUYesNo | 6| 4|
|Extract |tblDemographics | 8,984| 8|
|Extract |tblDemographics | 0| 8|
|Extract |tblLinksExplicit | 8,984| 36|
|Extract |tblLinksImplicit | 8,984| 43|
|Extract |tblRoster | 8,984| 464|
Expand Down Expand Up @@ -2526,99 +2525,84 @@ Session info -------------------------------------------------------------------

```
setting value
version R version 3.5.0 Patched (2018-05-14 r74725)
version R version 3.5.1 Patched (2018-09-10 r75281)
system x86_64, mingw32
ui RStudio (1.1.446)
ui RStudio (1.2.907)
language (EN)
collate English_United States.1252
tz America/Chicago
date 2018-06-27
date 2018-10-13
```

```
Packages ------------------------------------------------------------------------------------------
```

```
package * version date source
assertthat 0.2.0 2017-04-11 CRAN (R 3.5.0)
backports 1.1.2 2017-12-13 CRAN (R 3.5.0)
base * 3.5.0 2018-05-15 local
bindr 0.1.1 2018-03-13 CRAN (R 3.5.0)
bindrcpp * 0.2.2 2018-03-29 CRAN (R 3.5.0)
bit 1.1-14 2018-05-29 CRAN (R 3.5.0)
bit64 0.9-7 2017-05-08 CRAN (R 3.5.0)
blob 1.1.1 2018-03-25 CRAN (R 3.5.0)
checkmate 1.8.6 2018-06-20 Github (mllg/checkmate@bc16595)
chron 2.3-52 2018-01-06 CRAN (R 3.5.0)
cli 1.0.0 2017-11-05 CRAN (R 3.5.0)
colorspace 1.3-2 2016-12-14 CRAN (R 3.5.0)
compiler 3.5.0 2018-05-15 local
config 0.3 2018-03-27 CRAN (R 3.5.0)
crayon 1.3.4 2017-09-16 CRAN (R 3.5.0)
datasets * 3.5.0 2018-05-15 local
DBI * 1.0.0 2018-05-02 CRAN (R 3.5.0)
devtools 1.13.5 2018-02-18 CRAN (R 3.5.0)
digest 0.6.15 2018-01-28 CRAN (R 3.5.0)
dplyr 0.7.5 2018-05-19 CRAN (R 3.5.0)
evaluate 0.10.1 2017-06-24 CRAN (R 3.5.0)
ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.5.0)
glue 1.2.0 2017-10-29 CRAN (R 3.5.0)
graphics * 3.5.0 2018-05-15 local
grDevices * 3.5.0 2018-05-15 local
grid 3.5.0 2018-05-15 local
gsubfn 0.7 2018-03-16 CRAN (R 3.5.0)
gtable 0.2.0 2016-02-26 CRAN (R 3.5.0)
highr 0.7 2018-06-09 CRAN (R 3.5.0)
hms 0.4.2.9000 2018-06-20 Github (tidyverse/hms@2e0a39a)
htmltools 0.3.6 2017-04-28 CRAN (R 3.5.0)
httr 1.3.1 2017-08-20 CRAN (R 3.5.0)
kableExtra 0.9.0 2018-05-21 CRAN (R 3.5.0)
knitr * 1.20 2018-02-20 CRAN (R 3.5.0)
labeling 0.3 2014-08-23 CRAN (R 3.5.0)
lazyeval 0.2.1 2017-10-29 CRAN (R 3.5.0)
magrittr * 1.5 2014-11-22 CRAN (R 3.5.0)
markdown 0.8 2017-04-20 CRAN (R 3.5.0)
memoise 1.1.0 2017-04-21 CRAN (R 3.5.0)
methods * 3.5.0 2018-05-15 local
munsell 0.5.0 2018-06-12 CRAN (R 3.5.0)
odbc 1.1.6 2018-06-09 CRAN (R 3.5.0)
OuhscMunge 0.1.9.9008 2018-06-27 local
pillar 1.2.3 2018-05-25 CRAN (R 3.5.0)
pkgconfig 2.0.1 2017-03-21 CRAN (R 3.5.0)
plyr 1.8.4 2016-06-08 CRAN (R 3.5.0)
proto 1.0.0 2016-10-29 CRAN (R 3.5.0)
purrr 0.2.5 2018-05-29 CRAN (R 3.5.0)
R6 2.2.2 2017-06-17 CRAN (R 3.5.0)
Rcpp 0.12.17 2018-05-18 CRAN (R 3.5.0)
readr 1.2.0 2018-06-20 Github (tidyverse/readr@05890c3)
rlang 0.2.1 2018-05-30 CRAN (R 3.5.0)
rmarkdown 1.10 2018-06-11 CRAN (R 3.5.0)
RODBC 1.3-15 2017-04-13 CRAN (R 3.5.0)
rprojroot 1.3-2 2018-01-03 CRAN (R 3.5.0)
RSQLite 2.1.1 2018-05-06 CRAN (R 3.5.0)
rstudioapi 0.7 2017-09-07 CRAN (R 3.5.0)
rvest 0.3.2 2016-06-17 CRAN (R 3.5.0)
scales 0.5.0 2017-08-24 CRAN (R 3.5.0)
sqldf 0.4-11 2018-06-20 Github (ggrothendieck/sqldf@169b104)
stats * 3.5.0 2018-05-15 local
stringi 1.2.3 2018-06-12 CRAN (R 3.5.0)
stringr 1.3.1 2018-05-10 CRAN (R 3.5.0)
testit 0.8 2018-06-14 CRAN (R 3.5.0)
testthat 2.0.0 2017-12-13 CRAN (R 3.5.0)
tibble 1.4.2 2018-01-22 CRAN (R 3.5.0)
tidyr 0.8.1 2018-05-18 CRAN (R 3.5.0)
tidyselect 0.2.4 2018-02-26 CRAN (R 3.5.0)
tools 3.5.0 2018-05-15 local
utf8 1.1.4 2018-05-24 CRAN (R 3.5.0)
utils * 3.5.0 2018-05-15 local
viridisLite 0.3.0 2018-02-01 CRAN (R 3.5.0)
withr 2.1.2 2018-03-15 CRAN (R 3.5.0)
xml2 1.2.0 2018-01-24 CRAN (R 3.5.0)
yaml 2.1.19 2018-05-01 CRAN (R 3.5.0)
package * version date source
assertthat 0.2.0 2017-04-11 CRAN (R 3.5.0)
backports 1.1.2 2017-12-13 CRAN (R 3.5.0)
base * 3.5.1 2018-09-11 local
bindr 0.1.1 2018-03-13 CRAN (R 3.5.0)
bindrcpp * 0.2.2 2018-03-29 CRAN (R 3.5.0)
bit 1.1-14 2018-05-29 CRAN (R 3.5.0)
bit64 0.9-7 2017-05-08 CRAN (R 3.5.0)
blob 1.1.1 2018-03-25 CRAN (R 3.5.0)
checkmate 1.8.5 2017-10-24 CRAN (R 3.5.1)
cli 1.0.1 2018-09-25 CRAN (R 3.5.1)
colorspace 1.3-2 2016-12-14 CRAN (R 3.5.0)
compiler 3.5.1 2018-09-11 local
config 0.3 2018-03-27 CRAN (R 3.5.0)
crayon 1.3.4 2017-09-16 CRAN (R 3.5.0)
datasets * 3.5.1 2018-09-11 local
DBI 1.0.0 2018-05-02 CRAN (R 3.5.0)
devtools 1.13.6 2018-06-27 CRAN (R 3.5.0)
digest 0.6.18 2018-10-10 CRAN (R 3.5.1)
dplyr 0.7.6 2018-06-29 CRAN (R 3.5.1)
evaluate 0.12 2018-10-09 CRAN (R 3.5.1)
fansi 0.4.0 2018-10-05 CRAN (R 3.5.1)
glue 1.3.0 2018-07-17 CRAN (R 3.5.1)
graphics * 3.5.1 2018-09-11 local
grDevices * 3.5.1 2018-09-11 local
highr 0.7 2018-06-09 CRAN (R 3.5.0)
hms 0.4.2.9001 2018-08-09 Github (tidyverse/hms@979286f)
htmltools 0.3.6 2017-04-28 CRAN (R 3.5.0)
knitr * 1.20 2018-02-20 CRAN (R 3.5.0)
magrittr * 1.5 2014-11-22 CRAN (R 3.5.0)
markdown 0.8 2017-04-20 CRAN (R 3.5.0)
memoise 1.1.0 2017-04-21 CRAN (R 3.5.0)
methods * 3.5.1 2018-09-11 local
munsell 0.5.0 2018-06-12 CRAN (R 3.5.0)
odbc 1.1.6 2018-10-13 Github (r-dbi/odbc@b4c6c3f)
OuhscMunge 0.1.9.9009 2018-07-14 local
packrat 0.4.9-3 2018-06-01 CRAN (R 3.5.0)
pillar 1.3.0 2018-07-14 CRAN (R 3.5.1)
pkgconfig 2.0.2 2018-08-16 CRAN (R 3.5.1)
purrr 0.2.5 2018-05-29 CRAN (R 3.5.0)
R6 2.3.0 2018-10-04 CRAN (R 3.5.1)
Rcpp 0.12.19 2018-10-01 CRAN (R 3.5.1)
readr 1.2.0 2018-10-13 Github (tidyverse/readr@156dc31)
rlang 0.2.2 2018-08-16 CRAN (R 3.5.1)
rmarkdown 1.10 2018-06-11 CRAN (R 3.5.0)
RODBC 1.3-15 2017-04-13 CRAN (R 3.5.0)
rprojroot 1.3-2 2018-01-03 CRAN (R 3.5.0)
rstudioapi 0.8 2018-10-02 CRAN (R 3.5.1)
scales 1.0.0 2018-08-09 CRAN (R 3.5.1)
stats * 3.5.1 2018-09-11 local
stringi 1.2.4 2018-07-20 CRAN (R 3.5.1)
stringr 1.3.1 2018-05-10 CRAN (R 3.5.0)
testit 0.8.1 2018-09-23 Github (yihui/testit@219f6f4)
tibble 1.4.2 2018-01-22 CRAN (R 3.5.0)
tidyr 0.8.1 2018-05-18 CRAN (R 3.5.0)
tidyselect 0.2.5 2018-10-11 CRAN (R 3.5.1)
tools 3.5.1 2018-09-11 local
utf8 1.1.4 2018-05-24 CRAN (R 3.5.0)
utils * 3.5.1 2018-09-11 local
withr 2.1.2 2018-03-15 CRAN (R 3.5.0)
yaml 2.2.0 2018-07-25 CRAN (R 3.5.1)
```
</details>



Report rendered by Will at 2018-06-27, 11:06 -0500 in 2 seconds.
Report rendered by Will at 2018-10-13, 18:21 -0500 in 1 seconds.
21 changes: 14 additions & 7 deletions dal/import-79-metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ requireNamespace("dplyr" ) #Avoid attaching dplyr, b/c its func
requireNamespace("testit" ) #For asserting conditions meet expected patterns.
requireNamespace("RODBC" ) #For communicating with SQL Server over a locally-configured DSN. Uncomment if you use 'upload-to-db' chunk.
requireNamespace("odbc" ) #For communicating with SQL Server over a locally-configured DSN. Uncomment if you use 'upload-to-db' chunk.
requireNamespace("OuhscMunge" ) # remotes::install_github("OuhscBbmc/OuhscMunge")

# ---- declare-globals ---------------------------------------------------------
# Constant values that won't change.
Expand Down Expand Up @@ -319,6 +320,13 @@ purrr::pmap_int(
function( d, table_name, schema_name ) {
# browser()
# DBI::dbWriteTable(
# conn = channel,
# name = DBI::Id(schema=schema_name, table=table_name),
# value = d,
# overwrite = FALSE,
# append = TRUE
# )
# DBI::dbWriteTable(
# conn = channel,
# name = table_name,
# schema = schema_name,
Expand All @@ -340,13 +348,12 @@ purrr::pmap_int(
# a <- ds_file$entries[[15]]
# table(a$ID)

# odbc::dbWriteTable(
# conn = channel,
# name = DBI::SQL("Metadata.tblvariable_97"),
# # name = "tblvariable_97",
# # schema = "Metadata",
# value = ds_file$entries[[16]],
# append = T
# DBI::dbWriteTable(
# conn = channel,
# name = DBI::Id(catalog="NlsyLinks79", schema="Metadata", table="tblv"),
# value = ds_file$entries[[15]][1:10, 2],
# overwrite = FALSE,
# append = F
# )

# for( i in seq_len(nrow(ds_file)) ) {
Expand Down
Loading

0 comments on commit cd709e7

Please sign in to comment.