DOI: 10.12688/wellcomeopenres.26730.1 ISSN: 2398-502X

nocturn: an online tool and R package for sleep data visualisation

Daniel Thedie, Andrew Millar
Background Both researchers and self-trackers commonly record sleep times. The methods used to do so are varied, but some of them - e.g. actigraphy or radar devices - allow recording sleep data over several weeks or months. In this context, it is essential to have open, extensible, device-agnostic tools to explore the collected data, both for quality-checking and reporting purposes. Methods nocturn was designed to enable rapid and easy exploration of sleep data, regardless of the data collection method used. It provides a graphical user interface using R shiny, as well as functions that can be imported as an R package. nocturn is particularly suited to the visualisation of large longitudinal sleep datasets, e.g. ranging over several months. It allows producing high-quality visuals to report to a large audience, from technical specialists to the broader public. Results nocturn allows filtering data, generating visualisations and metrics to assess sleep regularity, and creating engaging sleep reports for a non-specialist audience. The graphical interface makes the app easily usable without any programming experience, while the functions available in the R package are aimed at power-users who wish to produce their own automated workflows. Conclusion nocturn is an entirely open-source package dedicated to sleep data visualisation and quality control. It uses a permissive license (MIT), making it easy to modify, extend, or reuse in other projects.

More from our Archive