BalanceMate

A Package to manage, pre-process, and process postural data

Image credit: chatGPT

BalanceMate is live on GitHub: https://github.com/JeanMoneger/BalanceMate

Documentation: https://jeanmoneger.com/book/


I had the opportunity to work at the Université Paris Cité, where I got to experiment a bit with force plates. The position came with some fascinating technical challenges. The first was to either do what had always been done—run OpenSesame on an archaic computer (Windows XP)—or modernize the setup.

I decided that my salary might as well justify modernising things a bit. I updated the computer to Windows 10 (a fifteen-year leap into the future) and managed to synchronize the force plates with stimulus presentation run in PsychoPy. Along the way, I discovered the fascinating universe of parallel ports. Because it was more challenging than one might assume, I feel compelled to tell readers right away: if you’re facing a similar challenge, you can contact me. I might (or might not) be able to help. I wrote a guide to synchronising PsychoPy with force plates, which should be released soon alongside a paper currently under review for publication.

In any case, synchronising force plates with PsychoPy is not the topic of this post. This post is about the second technical challenge I faced, which was loosely related to the first—both sharing a common root. The company distributing the force plates (AMTI) doesn’t sell enough of these bad boys to justify maintaining a full technical team. If you’re familiar with AMTI force plates, you’re surely familiar with some of their obscure software, such as NetForce or BioAnalysis. In short, NetForce handles data acquisition—it’s okay, I guess, but would definitely benefit from a UX-focused update—and BioAnalysis is allegedly designed to analyse the acquired data.

Now, I say allegedly because, as it stands, it does a poor job of allowing flexibility in data analysis. It’s suspected to transform the signal in some obscure, undisclosed way, cannot handle complex experimental designs used during data acquisition (e.g., deleting data associated with training blocks, inter-trial intervals, etc.), or perform epoch computations—should you want to dissect your data in, say, 1-second bins.

To be sure, BioAnalysis might be aimed at professionals (as opposed to researchers) who do not have any experimental design per se. They just let someone hop on the device, tell them to stay still, and voilà—you have your mean Centre of Pressure displacement.

For researchers, though, the software is pretty much useless. Fortunately, the AMTI team was kind enough to let users export their acquired data in a .txt file format, making it possible to process the data elsewhere. My favourite language is R.

So, I made an R package. It was an interesting challenge to get into R package development. I tried to follow best practices: internal tests, version control, and clear documentation. I also tried to include as few external packages as possible to avoid future problems.

If I get motivated enough to correct the typos CRAN didn’t like in my last attempt to deploy the package on their servers, I might make it more widely available to interested researchers.

In the meantime, the package is live on GitHub: https://github.com/JeanMoneger/BalanceMate

I’ve also made a book to accompany the package and provide guidance on what it can and cannot do: https://jeanmoneger.com/book/

I hope someone finds these things useful. If they help even a single person, my job here is done.

Jean Monéger
Jean Monéger
Post-Doctoral Researcher

My research interests include social cognition and fun.