SIMILE Timeplot graphing hours minutes seconds

less than 1 minute read

All of the examples for SIMILE Timeplot are in YYYY/MM/DD format. I was wanting to plot data down to the minute/second. Looking around I found that the date format of the data (.txt) file should be ISO8601. I tried, but still had problems parsing the time part. Thanks to this blog I saw two problems I was having. First, the time format should be: YYYY-MM-DD HH:MM:SS. So a [time,data] file would look like [2009-02-12 15:10:00,23.407]

Next is with the index.html that loads the plot data. Look for the line

timeplot1.loadText(dataURL, " ", eventSource);

What I did not immediately recognize was that the " " bit is actually a field separator. So for comma separated values that line should be:

timeplot1.loadText(dataURL, ",", eventSource);

Once done everything worked as expected. SIMILE Timeplot and Timeline are great tools. Hope this saves you some research time.
http://www.simile-widgets.org/timeplot/

Tags:

Updated:

Leave a Comment