tableNet: Shiny app to visualize schema of relational tables

Description Usage Arguments Details Value See Also Examples

Description

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.

Usage

1
tableNet(dfL)

Arguments

dfL

list of data.frames used to generate schema. This is easily generated from dir2dfList

Details

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.

Value

Shiny App

See Also

dir2dfList isKey

Examples

 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)

brooksandrew/Rsenal documentation built on May 13, 2019, 7:50 a.m.