Skip to content

Explorer Configuration

jwildfire edited this page Jul 20, 2017 · 14 revisions

After major updates in v1.2, the webcodebook.createExplorer() method now adds a "Files" tab to the web-codebook, thereby allowing users to use the web-codebook library on several different data sets from a single web page. Parameters for the settings object are described in detail below.

settings

object

an object passed to webcodebook.createExplorer() which controls the settings and appearance of the explorer.

settings.files

array of objects required

An array of objects describing files and settings used to create codebook objects. Each file object must have a path and settings parameter as described below. Any other parameters in the object will be included as metadata in the listing created on the "Files" tab of the codebook.

default: none

files[].path

string required

The location of a csv file to be parsed using d3.csv() and then used to create a codebook.

default: none

files[].settings

object

A settings file appropriate for webcodebook.createCodebook(). See config documentation here.

default: {}

settings.labelColumn

string

Specifies a property for objects in the settings.files[] array to be used as the label in listing on the "Files" tab. The label column is highlighted and triggers the creation of a new codebook for the given file when clicked.

default: "path"

settings.ignoredColumns

array of strings

An array of column names that should not be shown in the listing on the "Files" tab. Note that system variables ["['settings', 'selected', 'event'] are automatically hidden.

default: []

Clone this wiki locally