Now that your study has multiple datasets with shared participant and time information, you can start to take advantage of the integrated data. In this step you will:

Create Quick Visualizations

There are two quick ways to visualize the data in a column:

Column Visualizations

These plots are shown within the data grid itself and can be saved as part of a grid view.

  • Click the Clinical and Assay Data tab, then click Demographics.
  • Click the header for the Country column and select Pie Chart.
  • A pie chart showing relative prevalance of each value in the country column will be added to the top of the grid.
  • Hover over the message "The current __ view is unsaved." to reveal buttons for reverting, editing, or saving this grid with the chart included.
  • Click Save and Save again in the popup to save this as the default view of this data.

The type of visualization available depends on the datatype in the column selected. Numeric columns (such as Height) include a box and whisker plot style, for example.

Hovering over the column visualization itself will reveal an 'x' for deleting it if desired. When you click a column visualization, you open that 'instant' chart in the plot editor UI, described below.

Quick Charts

These charts can be created in one step from a single grid view of data, but are saved separately from the grid data display.

  • Return to the Demographics dataset if you navigated away. Click the Clinical and Assay Data tab, then Demographics.
  • Click the header for the Country column again and this time select Quick Chart.
  • LabKey Server will make a "best guess" visualization of the column. In this case, a bar chart plotting the count of each value, including a column for blank values.
  • Click Save, name the plot "Quick Chart: Country", and click Save.
  • Click the Clinical and Assay Data tab. Notice that the chart has been added to the list.

Join Datasets

What if you want to see how viral load (from the "Lab Results" spreadsheet) might vary with different ARV treatments (recorded in the "Physical Exam" spreadsheet)? Now that the spreadsheets have been imported to the LabKey study as datasets, we can easily create a combined, or joined view, of the two.

  • Click the Clinical and Assay Data tab.
  • Click the Lab Results dataset.
  • Select Grid Views > Customize Grid.
  • In the Available Fields panel, scroll down and open the node Datasets.
    • You may notice that Datasets is greyed out, as are the names of the datsets themselves. This only means that these are not "fields" or columns to select for display, but you can open, then select the columns they contain.
  • Open the node Physical Exam and select (place checkmarks next to) ARV? and ARVRegimen Type. This indicates that you wish to add these columns to the grid you are viewing. Notice they are added to the list in the Selected Fields panel.
  • Click Save.
  • In the Save Custom Grid View dialog, select Named and enter Lab Results with ARV Information. Click Save.

You now have a joined data grid containing columns from both the Lab Results and Physical Exam datasets. Notice the view name in the header bar, and you can also open it from the "Grid Views" menu.

Create More Complex Visualizations

Using the joined grid you created above, we will introduce the common plot editor using the example of visualizing the viral load levels for various ARV treatments.

Plot Integrated Data

  • Click the column header ARV? and select Filter....
  • In the popup, click the label "true" so that you will see only patients receiving ARV treatments.
  • Click OK to apply the filter.
  • On the filtered grid select Charts > Create Chart. This opens the common plot editor where you can create and customize many types of chart. The Bar chart type is selected by default.
  • For X Axis Categories, select ARV Regimen Type by dragging it from the list of columns on the right into the box.
  • For the Y axis, select Viral Load.
  • By default, the "sum" of viral load will be plotted. In this case the average value might be more useful, so use the pulldown for Aggregate Method to select "mean".
  • Click Apply.
  • Click Save, name the report "Mean Viral Load by ARV Regimen", and click Save in the popup.
  • Your chart will now be listed on the Clinical and Assay Data tab.

Plot Trends Over Time

A key part of study research is identifying trends in data over time. In this example, we will create a chart that shows lymphocyte levels for the two cohorts over the course of the study.

As you explored the plot editor, you may have clicked the "Time" option on the left and noticed there were no columns to select for the axes. Time charts require that columns used have been explicitly marked as "measures". To do so we edit the dataset definition:

  • Click the Clinical and Assay Data tab.
  • Click the Lab Results dataset.
  • Click Manage in the header bar of the grid, then click Edit Definition.
  • Scroll down to the Dataset Fields and click the row for Lymphs.
  • The field properties editor (set of tabs) will appear to the right.
  • Select the Reporting tab, and check the box next to Measure.
  • To increase your charting options, repeat for the other 3 fields. Notice that switching rows leaves the same tab open in the property editor.
  • Click Save.

Now we are ready to make a time-chart plotting lymphocyte levels.

  • Click View Data to return to the "Lab Results" data grid.
  • Select Charts > Create Chart.
  • Click the Time chart icon on the left in the popup. Notice the columns you marked as measures are listed on the right.
  • Drag the Lymphs column to the Y Axis box.
  • Click Apply.
By default, the time chart plots for the first 5 individual participants in the data grid. To instead compare trends in the cohorts:
  • Click Chart Layout where you can customize the look and feel of a chart.
  • Change the Subject Selection to Participant Groups.
  • Click Apply.
There are now two lines, one for each cohort now, but the data is relatively noisy making it hard to see a general trend. Let's try fewer data points along the X-axis.
  • Click Chart Type this time.
  • In the X-axis panel, change the Time Interval pulldown to "Months".
  • Click Apply.
Now we see a clear trend where lymphocyte levels in the HIV negative cohort generally trend up over time, while those in the Acute HIV-1 cohort generally trend somewhat down over the 20 months studied.
  • Click Save.
  • Name your time chart "Lymphocyte Trends" and click Save in the popup.

What's Next?

Using the plot editor lets you explore various ways of visualizing data in one place, with no need to save as you go or start from scratch each time. You can edit Chart Type or Chart Layout using the header bar links. Change any plot to another plot type by clicking the plot type buttons on the left. You can also open the common plot editor by clicking any column visualization, like the pie chart we created above. You needn't save anything until you are satisfied with the look and overall layout.

Related Topics

Previous Step | Next Step

discussion

Discussion

Search 

Pages 

previousnext
 
expand all collapse all