Data Explorer

This component is used by students to briefly summarize data as it is presented and perform various statistical tests. This component may be used as a standalone feature in a lesson.

Example

In creating a data explorer, one needs a .json dataset. This step may be accomplished by including the following in the header of a .isle file:

require:
    dataName: "./dataName.json"

Consider a dataset called "heartdisease" with the following variables:

  • Gender: Categorical
  • Drugs: Categorical
  • Complications: Categorical
  • Cost: Continuous
  • Age: Continuous
  • Interventions: Continuous
  • ERVisit: Continuous
  • Comorbidities: Continuous
  • Duration: Continuous

We will include the explorer with the following code:

<DataExplorer 
    id="heartdisease"
    data={heartdisease} 
    categorical={[ 'Gender', 'Drugs', 'Complications' ]}
    continuous={[ 'Cost', 'Age', 'Interventions', 'ERVisit', 'Comorbidities', 'Duration' ]}
    tests={[]}
/>

Open interactive preview

Options:

  • categorical | array: array of strings indicating the name of each categorical variable. Default: [].
  • continuous | array: array of strings indicating the name of each continuous variable. Default: [].
  • data | object: data object or array to be viewed. If it is an object, the keys correspond to column values while an array will expect an array of objects with a named field corresponding to each column. If you wish to allow students the ability to import a .csv file, set the data option to be false. Default: {}.
  • dataInfo | object: object containing the keys \'name\', whose value is a string, \'info\', whose value is an array of strings in which each element in the array is a new line and \'variables\', an object with keys as variable names and values as variable descriptions. Default: { 'info': '', 'name': '', 'variables': null }.
  • distributions | array: array of strings indicating distributions that may be used in calculating probabilities. This functionality exists independently of the dataset provided. Currently limited to normal, uniform and exponential distributions. Default: [ 'Normal', 'Uniform', 'Exponential' ].
  • editorProps | object: object to be passed to MarkdownEditor indicating properties to be used. Default: none.
  • editorTitle | string: string indicating the title of the explorer to be displayed. Default: 'Report'.
  • hideDataTable | boolean: boolean value indicating whether to hide the data table from view. Default: false.
  • histogramDensities | boolean: boolean value indicating whether to display histogram densities. Default: true.
  • models | array: array of strings indicating models that may be fit on the data. Default: [ 'Simple Linear Regression' ].
  • opened | string: page opened at startup. Default: none.
  • plots | array: array of strings indicating which plots to show to the user. Default: [ 'Bar Chart', 'Pie Chart', 'Histogram', 'Box Plot', 'Scatterplot', 'Heat Map', 'Mosaic Plot', 'Contour Chart' ].
  • questions | node: node indicating surrounding text and question components to be displayed in a tabbed window. Default: none.
  • showEditor | boolean: boolean indicating whether to show the editor to the user. Default: false.
  • showTestDecisions | boolean: boolean indicating whether to show the decisions made for each test based on the calculated p-values. Default: true.
  • statistics | array: array of strings indicating which summary statistics may be calculated. Default: [ 'Mean', 'Median', 'Min', 'Max', 'Range', 'Interquartile Range', 'Standard Deviation', 'Variance', 'Correlation' ].
  • tables | array: array of strings indicating which tables may be created from the data. Default: [ 'Frequency Table', 'Contingency Table' ].
  • tabs | array: array of objects and keys indicating any custom tabs to add. Default: [].
  • tests | array: array of strings indicating which hypothesis tests to include. Default: [ 'One-Sample Mean Test', 'One-Sample Proportion Test', 'Two-Sample Mean Test', 'Two-Sample Proportion Test', 'Correlation Test', 'Chi-squared Independence Test', 'One-Way ANOVA' ].
  • transformer | boolean: boolean indicating whether one wants to display a variable transformer. Default: false.

results matching ""

    No results matching ""