I would like to ask how to use three separate sliders (hour, day, month) to extract data of a specific hour of a year. For example, I want to get dryBulb Temperature data (from importEPW component) of today. I am wondering if there are any LadyBug components that help me to do that, or there are anyway to do that with Grasshopper components.
Please kindly help me to answer my question! I am looking forward to your helps!
Hello Anthony,
I don’t remember seing a component like this in LB tools but maybe I’m wrong.
What you can do here is some manipulations with your list of data. Use the date to HOY component converter to find the indices to cut your list. You have the example in the file attached.
Maybe you should consider to fully understand how to manipulate data with GH because this IS really usefull. This is a very good starting point : https://vimeopro.com/rhino/grasshopper-masterclass-with-david-rutten
NB : Please note that you may have to think about the boundaries of your domain, maybe you have to shift the HOY indice of +/-1 to have the correct period. As I did on the first component. I let you solve that
Thank you so much for your kind reply! I have not tried your recommendation out yet, but I will and get back to you soon. I will be back to my work early next week. So I will let you know about my solving at that time.
Your question is a bit fuzzy, do you want value for only 1 hour or hourly values for a specific time range?
The answer from @EmmanuelR is for a time range, which there’s already exists a component for it. For only 1 specific hour then you can just use list item.
import datetime
sampleDate = datetime.date(year[20], month, day) ##year[20] from modelYear list
dateFormatted = sampleDate.strftime("%j")
Index = ((int(dateFormatted)-1)*24)+hour-1 ##range of input hours between (1,24)