Libra

Importing a database in the .csv format

Libra uses the comma-separated values format for manual import and export of the database:

  • It can be opened in a spreadsheet program like Excel or Google Sheets.
  • It’s a simple text file making it easy to edit manually.
  • Is a common way for health apps to export their own data, making it somewhat portable.

A sample Libra CSV looks like so:

#Version: 6
#Units: kg

#date;weight;weight trend;body fat;body fat trend;muscle mass;muscle mass trend;log
2023-10-16T05:19:20.000Z;70.0;70.4;11.0;11.1;56.0;56.3;
2023-10-17T05:07:48.000Z;69.8;70.3;11.1;11.1;55.7;56.2;
2023-10-18T04:12:51.000Z;69.9;70.2;10.9;11.1;56.0;56.2;
2023-10-19T05:21:10.000Z;69.1;70.1;11.0;11.1;55.2;56.1;

2008-09-05T06:00:00.000Z;83.1;83.1
2008-09-06T06:00:00.000Z;83.3
2008-09-07T06:00:00.000Z;83.7;;15.6
2008-09-08T06:00:00.000Z;84.1;83.3;15.3;15.3;This is a comment
  • The version is optional, but if present needs to be 5 or 6
  • This sample is in kg, use #Units: lbs for Pounds
  • The date and weight are mandatory, all other fields are optional
  • Trend values are ignored and regenerated on import

Date format

The date format follows the ISO 8601 standard in UTC: YYYY-MM-DDTHH:mm:SS.mmmZ

In other words: year-month-dayThour:minutes:seconds.millisecondsZ

Other standard date formats are accepted but may have unexpected results. In particular if no time is specified, Libra assumes midnight, which can cause issues with daylight changes such as entries appearing in the preceding or following day.

Notes

Imported .csv files are merged with the existing database, so it is possible to perform multiple imports separately.

Libra will attempt to give helpful feedback when the import fails, but if you’re struggling to import a .csv file, please reach out at support@libra-app.eu.