I'm confused... you already have the hourly observed rainfall data, right? Isn't that exactly what you want?
Or do you want the grand total of all rainfall for the preceding 7x 24 hours for every hour?
Convert the date/times of each measurement to epoch, then convert them to points using the vertex creator and x=epoch y=0.
Taking your point (time) of interest, add another vertex 7 days ago (subtract the number of seconds off the epoch) and again using the vertex creator, ADD a vertex. You now have a line representing the time period that intersects 166 points representing hourly data.
You can now use spatial operations to group and sum the preceding 7 days of rainfall for each hour
Convert the date/times of each measurement to epoch, then convert them to points using the vertex creator and x=epoch y=0.
Taking your point (time) of interest, add another vertex 7 days ago (subtract the number of seconds off the epoch) and again using the vertex creator, ADD a vertex. You now have a line representing the time period that intersects 166 points representing hourly data.
You can now use spatial operations to group and sum the preceding 7 days of rainfall for each hour
thanks @hkingsbury , sounds like an interesting way of doing it. I don't quite follow though. Is there 3 vertex creators in there?
I'm confused... you already have the hourly observed rainfall data, right? Isn't that exactly what you want?
Or do you want the grand total of all rainfall for the preceding 7x 24 hours for every hour?
So for each hour, i want the sum of the preceding 7days worth of hourly rainfall. So it is effectively a moving 7day sum
thanks @hkingsbury , sounds like an interesting way of doing it. I don't quite follow though. Is there 3 vertex creators in there?
No, just two. First to create points representing individual measurements, then a second to create a line representing the time frame to sum
thanks @hkingsbury , sounds like an interesting way of doing it. I don't quite follow though. Is there 3 vertex creators in there?
Thanks - got that bit working! Just need to figure out how to sum them Any suggestions? I'm trying InlineQuerier but not sure this is the right tool
thanks @hkingsbury , sounds like an interesting way of doing it. I don't quite follow though. Is there 3 vertex creators in there?
A spatial relator or point on line will allow you to place the lines id (will need to generate that) on the point, you can then use an aggregator to sum them together using groupby
Are you able to share some sample data?
If doing this in FME I would probably clone each data point then use the copy number to alter the datetime so that you have 166 data points sharing the same datetime, then aggregate by this. Fairly inefficient.
A python solution would be my go to if dealing with a lot of data.
Are you able to share some sample data?
If doing this in FME I would probably clone each data point then use the copy number to alter the datetime so that you have 166 data points sharing the same datetime, then aggregate by this. Fairly inefficient.
A python solution would be my go to if dealing with a lot of data.
HI @ebygomm , here's the data. Inefficiency isn't an issue for me if I can get a working solution Thanks.
HI @ebygomm , here's the data. Inefficiency isn't an issue for me if I can get a working solution Thanks.
Hopefully this makes sense, you would need to do a bit of tidying for the end of the dataset.
(Also you have one duplicate data point in your sample, not sure if you are aware)
thanks @hkingsbury , sounds like an interesting way of doing it. I don't quite follow though. Is there 3 vertex creators in there?
@John Kreft here's an example with the data you shared below
@John Kreft similar approach described here