Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a generic mkseas_df() helper function to create a seas data.frame #5

Open
mwtoews opened this issue Aug 20, 2018 · 1 comment
Open
Assignees

Comments

@mwtoews
Copy link
Owner

mwtoews commented Aug 20, 2018

From Paul Whitfield:

[Suggesting to] add a function that would let the user create that dataframe from other files or data-frames. It seems to me that it might be quite simple to do this, but it would be best done within an update to seas instead of being done independently or outside of seas.

What I envisage is a function that takes a dataframe that contains the meteorological variables and a data and then adds the default information that gets attached in seas and create the same data structure as mkseas

So an example source "mdata" might have columns [date, min temp, max temp, precip, snow]

And the new function "mkseas_df" might be called like:

new_data <-mkseas_df (date=mdata[,1], tmin=mdata[,2], tmax=mdata[,3], rain=mdata[,4], snow=mdata[,5], is="myid", name="station name")

which looks to be all that is needed for creating the data structure used in seas. I suspect the function will need to be constrained to an existing list of possible variables. We could do this in the new CSHShydrology package, but I think it would be best if we could create this option within seas.

@mwtoews mwtoews self-assigned this Aug 20, 2018
@PaulWhitfield
Copy link

Mike:

How is progress on this item?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants