-
Notifications
You must be signed in to change notification settings - Fork 5
Explorer Configuration
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.
object
an object passed to webcodebook.createExplorer()
which controls the settings and appearance of the explorer.
array
of objects
required
An array of objects describing files and settings used to create codebook
objects. Each file object must have a settings
parameter and either a path
or json
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
object
A settings file appropriate for webcodebook.createCodebook()
. See config documentation here.
default: explorer.settings.defaultCodebookSettings
(which defaults to {}
)
string
The location of a csv file to be parsed using d3.csv()
and then used to create a codebook.
default: none
array
of object
JSON content for the file formatted as one object per row with one key per column (like the output of d3.csv()
. If JSON content is provided, the files[].path
is ignored. Added in v1.3.
default: null
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: The first key in the first settings.files[]
object is used.
object
A valid configuration for a codebook
object. Added in v1.5.
default: {}
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: []
object
An valid webcharts table configuration object that controls the appearance and features of the files listing. Added in v1.2.1
default:
{
sortable: false,
searchable: false,
pagination: false,
exportable: false
}
array
of object
s
Added in v1.2. Metadata objects passed to the codebook settings.meta
parameter by the explorer for the current file. Objects have the same expectation as the codebook with one additional custom parameter.
default: []
string
required
Parameter specifying the file for the metadata item matching settings.files[config.labelColumn]
.
boolean
Specifies whether to add a control that allows users to add local files at the top of the files tab. Added in v1.5.
default: false