Data can be plotted and used for analysis in several ways. One can use the Shiny App to take a quick look at the absorbance data and the contents of the database. No downloading of data is needed to use the interactive Shiny App.
Alternatively, one can download the data and then plot and analyze it within any appropriate software. Example scripts for loading and graphing data within Matlab are provided below. These can be modified to meet the user’s goals.
Plot in real time with Shiny App
Use our Shiny App to select and plot specific data from the dataset. This is a good way to explore the database and to check data that you export and plot outside of the database.
Plot data in Matlab
The example MATLAB codes below demonstrate how to plot absorbance, Zmag, and Zang for different types of datasets from this database. The script can be modified to look at other datasets of a similar type. The script requires you to tell it how to access the data from the database, further detailed at Download Data.
EITHER:
(1) Download most up to date data (directly from database) via MySQL Workbench and save Measurements.csv in the same folder as the .m script.
OR
(2) Download data directly from here (saved on date in file name) and save the file in the same folder as the .m script.
Measurements table: WAI_Measurements_2022-06-06.csv
Subjects table: WAI_Subjects_2022-06-06.csv
Example 1: One session, one ear
Demonstrates how to plot the mean absorbance, mean Zmag, and mean Zang for a dataset that has one session per subject and one ear per session. The two codes show two different ways to accomplish the same task.
Code: ExampleMATLABcode_Sun2016_2022_06_07.m
Result: ExampleMATLABcodePlot_Sun2016_2022-06-07.pdf
OR
Code: ExampleMATLABcode_Groon2015_2022_06_07.m
Result: ExampleMATLABcodePlot_Groon2015_2022_06_07.pdf
Example 2: Multiple sessions, split by right/left ear
Demonstrates how to plot the mean absorbance, mean Zmag, and mean Zang for a dataset that has multiple sessions and the data is split by right/left ears.
Code: ExampleMATLABcode_Abur2014_2022_06_07.m
Result: ExampleMATLABcodePlot_Abur2014_Indv_2022-06-07.pdf
Example 3: Multiple sessions, different sweep directions, split by ages
Demonstrates how to plot the mean absorbance, mean Zmag, and mean Zang for a dataset that has multiple sessions, multiple sweep directions, and the data is split by age groups.
Code: ExampleMATLABcode_Hunter2016_2022_06_07.m
Result: ExampleMATLABcodePlot_Hunter2016_2022-06-07.pdf
Example 4: Multiple ear pathologies, different sweep directions, one session
Demonstrates how to plot the mean absorbance, mean Zmag, and mean Zang for a dataset that includes multiple different ear pathologies, sweep directions, and has one session for each subject.
Code: ExampleMATLABcode_Keefe2017_2022_06_07.m
Result: ExampleMATLABcodePlot_Keefe2017_202206-07.pdf
Example 5: Incorporating the Subject Table, one session, split by male/female
Demonstrates how to plot the mean absorbance, mean Zmag, mean Zang with the data split by male/female, thereby incorporating the Subject Table.
Code: ExampleMATLABcode_Rosowski2012_2022_06_07.m
Result: ExampleMATLABcodePlot_Rosowski2012_2022-06-07.pdf
Example 6: Individual Subjects, Multiple sessions, split by right/left ear
Demonstrates how to plot each of the sessions of the individual subjects split by right/left ear. Plots absorbance, Zmag, and Zang.