-
Notifications
You must be signed in to change notification settings - Fork 104
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
Outfilling Dialog #9363
Comments
@Vitalis95 in the design above: First you may wish to install the Then in the diagram above: |
@jkmusyoka @lilyclements ,do we need to add |
@lilyclements , concerning the
|
Summarising @rdstern's requests for changes in the R code:
Just wanted to have this written together somewhere. I can make the changes in the R package |
Just to respond to the items above:
|
|
On 2, in the function is it for a maximum of 1 station, or can we have more in your Exclude. The current dialog is just for 0 or 1 station? |
@rdstern It can now have multiple stations excluded. Before you pointed that out, it could only have one excluded (so you need to redownload the package) |
@lilyclements I see the new version can also output to a variable. My concern now that we can exclude many stations is on our routine use of this function, if it is the only one we have. Let's take Eastern Province, where there are 5 main stations, then over 100 volunteer stations, and quite some automatic stations. So let's consider the work in 2 stages: |
@rdstern setting a seed is there under the parameters “set_seed” (default NULL) I am unsure if I 100% follow. The monthly parameter (adjustment?) values are the same for all rows (so across the stations) because of how the function is set up, I believe. In the code, the “monthly parameter” values are all set, and then there is a loop through each row of the data using these values to generate new values. I did check on the generation of random values (e.g. a random binomial distributed value). Setting a single seed does mean that when we randomly generate a variable it does alter for each iteration of the loop (so each row does get a randomly distributed value). |
@Vitalis95 here are my suggestions for minor revisions to the current outfilling dialog. Here it is: a) Move the Looking forward! |
Once this is all working, the item that remains is to make the Stations to Exclude a control that can exclude multiple stations that you select. It needs a checkbox for each station and we have that elsewhere. It is the control in the Filter from Factors sub-dialog, and also in the filter sub-dialog when you choose a factor to filter on. |
@N-thony this is mainly for @Vitalis95.
As part of our ePICSA work, we would like to construct a dialog to simplify the outfilling of station data using satellite estimates mainly for our current work in Zambia.
Below is the R script which we recently used in Zambia perform some outfilling. The outfilling uses @lilyclements
outfillingR
package.library(outfillingR) zambia_data <- data_book$get_data_frame(data_name="zambia_data") #perform outfilling infilled_data <- do_infilling( data = zambia_data, station = "station", date = "date", rainfall = "rainfall", rfe = "tamsat", lon = "longitude", lat = "latitude", station_to_exclude = "STATION A", rainfall_estimate_column = "tamsat", custom_bins = c(1, 5, 10, 15, 20), count_filter = 5, min_rainy_days_threshold = 30, target_months = c(5, 6, 7, 8, 9), distribution_flag = "gamma", markovflag = TRUE ) #display resulting dataframe data_book$import_data(data_tables=list(infilled_data=infilled_data))
See an initial design of the dialog below - largely based on the arguments of the
do_infilling
function in the script. I think this should be enough to get you @Vitalis95 started. Let me know any questions you may have.@lilyclements the script currently results in a new dataframe with the outfilled column. Wouldn't it simpler and neat if the outfilled column is just added to the dataframe we are trying to infill? Is this possible?
The text was updated successfully, but these errors were encountered: