Advanced Usage of Timetables
Learn about advanced preprocessing and analysis techniques to analyze time-stamped data in timetables including techniques to retime, synchronize, filter, and aggregate your data.
For more information about date and time data types, including datetime, duration, and calendarduration, check out this video, Working with Dates and Times in MATLAB
For an introduction to the creation and basic uses of a timetable, check out this video, Basics of Managing Time-Stamped Data
Published: 10 Aug 2022
Hello, and welcome back to another MATLAB video. Today we're talking about some of the advanced functions and methods for working with timestamp tabular data via timetable. As many MATLAB users know, data of this fashion is common in an assortment of real world applications. A timetable in MATLAB is an array of information from any number of data types, all attached to timestamp metadata. For more information on the basics of creating and using a timetable, check out the timetables basics video.
Here we will cover methods of synchronizing data to common times, interpolating data to regularly spaced intervals, and using the group star family of functions. Here we have a second timetable with nearly identical time metadata, but unique data regarding the flow of bike traffic. Synchronize is a function that matches data from two timetables to a common time vector, and re-samples or aggregates data from said timetables.
For example, we can synchronize these two data sets into one table to produce an hourly count. Is missing is a function that returns an array of logical values indicating whether a data entry exists in a given field. Remove missing can remove any entry that has an empty data field, while fill missing fills missing entries with the constant value or an interpolated one.
Retime allows you to resample or aggregate data in a timetable to a uniform time interval and allows you to resolve duplicate or irregular intervals. Using retime, you can specify what time interval you'd like to retime to and by what method you'd like to interpolate between values. The group star family of functions allows us to work with and apply analysis to data while leaving said data inside the timetable. Here we are looking at a timetable comprised of data regarding thunderstorms.
Group summary returns a data summary of a specified entry. Group count computes the number of data entries in totality or in a specified time range. Group transform can apply specific transform to a set of data entries. In this example, we've added the days of the week to our thunderstorm data.
Group filter filters data entries to fit under a given constraint. Here we have filtered our table to only include entries in which the precipitation was between 1 and 2 centimeters. For more information on group star functions, check out the documentation page.
In this video, we've discussed advanced functions and methods for working with timestamp tabular data via timetable. Now that we have a better understanding of the advanced tools available to us we can use these data arrays more efficiently and effectively. Thanks for watching, and I'll see you guys in another video.