Converting time strings into numbers
From a CSV, I have got a list of times in the format MM:SS, but I wish to convert these times to values that I can use for the radiuses of circles. Any ideas how I can achieve this.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Frederik De Ble... on 18 Mar, 2014 08:48 AM
We need time nodes!
Do you just have hours and seconds? Do you want to have a full day converted to 360 degrees?
2 Posted by tomshorey on 18 Mar, 2014 04:16 PM
from these times I want to create circles with the radius proportional to the time... so 1:00 equals a radius of 1... 2:30 equals a radius of 2.5
I've attached the .csv... the field I want to use is the timeto field
Support Staff 3 Posted by Frederik De Ble... on 19 Mar, 2014 09:26 AM
This requires a bit of custom code. Here's a custom Python script that does the conversion:
What it does:
t
and splits it on the ":". This separates the hours from the minutes. Hours are stored in a variableh
, minutes are stored in a variablem
.int(h)
.I've uploaded a video that shows the process of creating a custom node and how to link it to NodeBox: https://vimeo.com/89486032
4 Posted by Tom Shorey on 19 Mar, 2014 10:49 AM
Brilliant! Many Thanks!
Frederik De Bleser closed this discussion on 20 Mar, 2014 09:46 AM.