Description Usage Arguments Details Value See Also Examples
Launches a Shiny App that provides a visual representation of the relationships between a collection of tables
(data.frames) with some relational structure. If given a dump of dozens of flat files and without a formal schema or
documentation on your data, this app will help explore and understand the underlying schema - which tables can be joined
which other tables, which variables can be used to join which tables, etc, It also gives a read on how strongly each variable with
the same name in multiple tables actually connects tables (how many of the values of the linking variable x
that are in
table1
are also in table2
.
1 | tableNet(dfL)
|
dfL |
list of data.frames used to generate schema. This is easily generated from |
Note, the Key-strength tables can be slow to display because these computations actually dive into the contents of the
data.frames and perform set operations on every row of the variable of interest. It is possible to use the isKey
function
to compute these similarity matrices ahead of time to prevent the Shiny app from doing these computations each time.
Shiny App
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
## download some baseball data. NOTE This will download 30MB of data (25 csv files) into a temporary directory
temp <- tempfile()
localDataDir <- paste0(tempdir(), '\\lahman2012-csv-onYourComp.zip')
download.file('http://seanlahman.com/files/database/lahman2012-csv.zip', localDataDir)
unzip(localDataDir, exdir=paste0(tempdir(), '\\lahman2012-csv-onYourComp')) ## may not be necessary
## create a list of data.frames from .CSVs
dfL <- dir2dfList(paste0(tempdir(), '\\lahman2012-csv-onYourComp'), ext='.csv', exclude=NULL, sep=',', stringsAsFactors=F)
## launch app
tableNet(dfL)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.