Data Table Titles

Hi! I think I’ve figured out how to use require in the ISLE editor preamble to import data, and then I’ve been able to put the data in a table using <DataTable/>. However, the title of the table is always “Data”. Is there a way I can edit this title?


Hi there,
to supply a custom title, one may supply a “name” property to the “dataInfo” object, e.g.

    dataInfo={{ "name": "Infection" }}

dataInfo may also have an info property, containing a descriptions of the dataset, and variables containing descriptions for the different variables. Here is a full example of a dataInfo object for a dataset on hospital infections:

	"name": "Infections",
	"info": [
		"The Study on the Efficacy of Nosocomial Infection Control (or SENIC) project was an effort to determine whether infection surveillance and control programs were associated with a reduced rate of nosocomial infections in United States hospitals.  (Nosocomial means that the infection was acquired after the patient was admitted to the hospital.)",
		"We have information about a random sample of 113 hospitals and are interested in understanding the factors that might be associated with changes in infection rate."
	"variables": {
		"Infections": "the average estimated probability of acquiring an infection in the hospital (in percent; higher is worse)",
		"StayLength": "the average length of stay of all patients in hospital (in days)",
		"Age": "the average age of patients (in years)",
		"Beds": "the average number of beds in hospital during study period",
		"MedSchool": "whether the hospital is affiliated with a medical school",
		"Region": "geographic region (NE = Northeast, NC = North Central, S = South, W = West)",
		"Nurses": "average number of nurses during study period"

If supplied, the dataset description can be opened when clicking on the title above the table. Alternatively, one may set showOnStartup to true inside of dataInfo, which will open the modal window with the dataset description when the lesson is loaded.

1 Like

Thanks! That reallly helps. Will it always say “Data” after the name of the dataset? (i.e. “Infections Data”)

The data table was changed so as to not always append a “Data” to the name of the data set. This gives one more flexibility in what title one would like to display.