@ballardw wrote:
You have enough going on that you should provide some example data and what the final result for that data would be.
Also, are your data point datetimes the begining, end or middle of a period? Are the reported times fixed interval (every 5 minutes) or variable interval?
If they are variable how are going to caluclate "minutes of precipitation"? I would expect a calcultion like that to come from a start/end time. Are you working from someone else's summarized data?
Hello. In the previous reply I updated a sample dataset (yes, sorry I did not provide) and answered some of your questions. Reported times are every minute -- but only when there is precipitation. I'm working from my own data. The original data does have start/end times, but I thought it would be cleaner just to note what was happening every minute. Also, I will typically have a numerous entries in a row (0501, 0502, 0503, ...) for, say, -RA, but not always. Here's a fuller sample dataset (again, building on the sample provided earlier)
data have; infile cards dsd; informat site $4. datetime datetime. precipitationtype $3.; format site $4. datetime datetime. precipitationtype $3.; input site datetime precipitationtype; cards; kbos,01JAN2016:05:00:00,-RA kbos,01JAN2016:05:01:00,-RA kbos,01JAN2016:05:10:00,+RA kacy,03JAN2016:07:20:00,-SN kacy,03JAN2016:07:51:00,SN kacy,03JAN2016:07:52:00,+SN
kbos,03JAN2016:16:21:00,-RA kbos,03JAN2016:16:22:00,-RA kbos,03JAN2016:16:26:00,+RA kacy,04JAN2016:05:20:00,-SN kacy,04JAN2016:07:51:00,SN kacy,04JAN2016:07:52:00,+SN ; run;
NOTE: I did not see that the earlier reply (from Steelers_In_DC) had different dates, so my short description of what is happening at 0500, 0501, etc. is correct, but the observations are occuring on different dates. I changed some of these and added more dates. This is more typical: a few observations (or many, actually, up to 1440) on a given day.
Thanks, Bruce
... View more