Let’s go directly to the point. I really like two things: dataviz and gadgets. On this first point, I have to admit that I fell in love with Roambi. It’s, to me, the datavizest BI tool I’ve been working with. On this second point, in the middle of many other gadgets, I own a Basis watch, which collects data all the time I'm wearing it.
An object that collects data…
A tool that reports data…
You’ve got it? Yeah, I spent some time to generate the dataflow from the device to the human eye. 8 pomodoros (btw, Pomodoro could be the subject of a next post) to be exact.
1. Get daily csv from Basis
First step, collect Basis’ data. Basis has already a sync mechanism that push data from watch to smartphone via bluetooth, and from smartphone to cloud via http. But Basis do not have an API. Fortunately, I found a script on GitHub to request the data.
Btroia’s script uses PHP. So, first step is to get the script, install PHP if it isn’t already, and we’re almost ready to get some data:
C:\php\php.exe -f "C:\basis-data-export-master\basisdataexport.php" -- -u[LOGIN] -p[PASSWORD] -d[YYYY-MM-DD] -fcsv
It generates a csv file, for the given date and a given frequency (set directly in the script), containing 1 dimension (time axis) and 6 indicators: day, time, heart rate, steps, calories, gsr, skin temperature and air temperature.
2. Automatize data pulls
Second step is to make that request an automated one and to consolidate multiple csv files. I needed a (free) tool, able to execute the query, to manipulate the data and to generate a flat file (ideally an XLS file). Well, Talend appeared as the most relevant one for these tasks.
Basis' heart rate measure isn't that frequent, so I smoothed every 3*10 minutes data to obtain more accurate data (each 30 minutes). That's what the tAggregateRow component does.
Then, a final command line refresh the roambi view we're just about to create, each day, with a new source file (last 3 months rolling).
To get the best and easiest fit with Roambi, I optimized Talend’s dataflow to get the perfect file structure.
3. Create the Roambi view
Third step, the nicest one! Let’s create the view in Roambi Business: cloud-based way to create the mobile-first views. The data I got, right here in my consolidated xls file, has just the perfect structure to feed some Roambi views. For this example, I chose the Pulse view to focus on one indicator at a time.
Feel free to give me your feedbacks via twitter: @2is0.