Step 2: Import Datasets

2024-04-15

An easy way to create a new dataset is to use a data file and infer an initial set of field names and data types to create the dataset structure and importing the initial set of data simultaneously.

In this step, we will import four datasets:

  • Demographics - This dataset describes the participants in the study.
  • Physical Exam - A record of vital signs (pulse, blood pressure, etc.) measured over the course of the study.
  • Lab Results - This dataset contains various white blood cell counts.
  • Viral Load PCR - Contains the viral counts measured using a polymerase chain reaction method.
Because this is a "visit-based" study, LabKey will align these datasets based on the ParticipantId and SequenceNum fields. (If it were a "date-based" study, it would align the datasets based on the ParticipantId and Date fields.) This alignment makes reporting and analysis of the data much easier, as we will see in step 4 of the tutorial.

Download Datasets

Import Demographics.xls

In this step, we create a dataset based on the Demographics.xls spreadsheet data.

  • Click the Manage tab.
  • Click Manage Datasets.
  • Click Create New Dataset.
  • On the Create Dataset Definition page, first define Dataset Properties:
    • Name: Enter "Demographics"
    • Under Data Row Uniqueness, select Participants only (demographic data).
  • Click the Fields section to open it.
  • Drag the Demographics.xls file you downloaded into the Import or infer fields from file target area.
  • You will see the fields inferred.
    • If necessary, you could make changes here. The exception is that key fields, in this case "ParticipantId" are "Locked" and cannot be changed.
    • Learn about editing and adding new fields in this topic: Field Editor.
  • Review the field names and data types that were inferred, but make no changes for this tutorial.
  • Scroll down to see the Column Mapping section.
    • Here the server has made a best guess at the fields that will map to your keys.
    • In this case, the inferral for participant information is correct: the "ParticipantId" column.
    • For the Visits dropdown, select SequenceNum. Notice this locks the "SequenceNum" field.
  • Below this, the Import data from this file upon dataset creation? section is set up by default to import the data as the dataset is created. You see a preview of the first few lines. Make no changes for this tutorial.
  • Click Save to create and populate the dataset.
  • Click View Data and you will see this dataset.

Import PhysicalExam.xls

  • Repeat the import process above for the PhysicalExam.xls file, with one difference:
  • Under Data Row Uniqueness, leave the default selection Participants and Visits.
  • Continue to infer fields, set mappings, and import the data.

Import LabResults.xls

  • Repeat the import process above for the LabResults.xls file.

Import ViralLoadPCR.xls

  • Repeat the import process above for the ViralLoadPCR.xls file.

Confirm Data Import

  • To confirm the data import, click the following tabs, and see how the presence of data has changed the dashboards on each:
    • Overview tab, click the Study Navigator.
    • Participants tab, click a participant ID.
    • Clinical and Assay Data tab, see your datasets listed.

Previous Step | Next Step (3 of 4)