Inputting data using minCombinR

minCombinR provides a simple input function that allows users to easily input various types of data.
By using the minCombinR input function, it's possible to standardize how data is represented and it makes it easier to plot your data.

To load your own data and to get it ready for minCombinR, you need to do the following:

input_data(file = "path/to/your/file.ext", dataType = "choose_data_type")
# where choose_data_type can be one of table, tree, dna, spatial, or image

To demonstrate the features of minCombinR, we are using data from the 2014-2016 Ebola Outbreak.

This data is available from several sources:

Metadata and tree data is available via micoreact : https://microreact.org/project/west-african-ebola-epidemic

Genomic data (guinea only) is available via the following github repo: https://github.com/nickloman/ebov/tree/master/consensus/good

Spatial (shape file) data is available via : https://data.humdata.org

This data is automatically downloaded when minCombinR is installed, and can be accessed using the commands below:

devtools::load_all() # TODO: temporary once things are done

# Table data
tab_dat <- input_data(file = system.file("extdata", "ebov_metadata.csv", package = "mincombinr"),
                      dataType = "table")

# Tree data
tree_dat <- input_data(file = system.file("extdata", "ebov_tree.nwk", package = "mincombinr"),
                       dataType = "tree")

# Genomic data
genomic_dat <- input_data(file = system.file("extdata", "ebov_GIN_genomic.fasta", package = "mincombinr"),
                          dataType = "dna")

# Shape files
# Shape files require that .shp, .shx, and .prj files at a minimun to be in the same directory.
# If you would like to add metadata to the shape file, you can also add .dbf files.
gin_shape_dat <- input_data(file = system.file("extdata", "gin_admbnda_adm1_ocha_itos.shp", package = "mincombinr"), 
                            dataType = "spatial")

lbr_shape_dat <- input_data(file = system.file("extdata", "lbr_admbnda_adm1_ocha.shp", package = "mincombinr"), 
                            dataType = "spatial")

sle_shape_dat <- input_data(file = system.file("extdata", "sle_admbnda_adm1_1m_gov_ocha_20161017.shp", 
                                               package = "mincombinr"),
                            dataType = "spatial")

Essential minCombinR commands

Some helper commands These commands let you know what parameters you can provide to the base chart specification and all of the base chart types To see examples of different charts type check out http://gevit.net

# To see all of the supported chart types
base_chart_types()

# To see all of the required and optional parameters for specifications of a chart type, in this example, bar chart
base_chart_specs(chart_type="bar") 


sfisher4/gevitR documentation built on Feb. 10, 2020, 6:29 p.m.