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

Quality control for Rain #4595

Merged
merged 10 commits into from
May 11, 2018

Conversation

bethanclarke
Copy link
Contributor

Added R-code for Outliers in Climatic Check Data Rain Dialog

@shadrackkibet
Copy link
Collaborator

Reviewing and testing this.

@@ -399,6 +399,7 @@ lower_quart_label="lower_quartile"
upper_quart_label="upper_quartile"
skewness_label="summary_skewness"
summary_skewness_mc_label="summary_skewness_mc"
summary_outlier_limit_label = "summary_outlier_limit"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a list of summary functions where this label should be added like the other summary functions?
all_summaries=c(sum_label, mode_label, count_label, count_missing_label, count_non_missing_label, sd_label, var_label, median_label, range_label, min_label, max_label, mean_label,quartile_label, lower_quart_label, upper_quart_label, skewness_label, kurtosis_label, summary_coef_var_label, summary_skewness_mc_label, summary_median_absolute_deviation_label, summary_Qn_label, summary_Sn_label, cor_label, cov_label,first_label, last_label, nth_label, n_distinct_label, proportion_label, count_calc_label)

}

# kurtosis function
summary_kurtosis <- function(x, na.rm = FALSE, type = 2, ...) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this function is a duplicate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will delete this duplicate once you're finished testing

ucrChkOutlier.Enabled = False
ucrChkOutlier.Checked = False
ucrChkSkewedData.SetText("Skewed Data")
ucrChkSkewedData.Checked = False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you don't need this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you already have ucrChkSkewedData.SetRDefault("FALSE") and setvalues when checked and unchecked so this checkbox will be unchecked by default.

@@ -59,7 +59,9 @@ Public Class dlgClimaticCheckDataRain
ucrChkDryMonth.SetText("Dry Month")
ucrChkDryMonth.Enabled = False
ucrChkOutlier.SetText("Outlier")
ucrChkOutlier.Enabled = False
ucrChkOutlier.Checked = False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this.

Copy link
Contributor Author

@bethanclarke bethanclarke May 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do not need to specify whether its checked or not?

@@ -501,6 +502,30 @@ summary_skewness_mc <- function(x, na.rm = FALSE, ...) {
return(robustbase::mc(x, na.rm = na.rm))
}

# skewness outlier limit function
summary_outlier_limit <- function(x, coef = 1.5, bupperlimit=TRUE, bskewedcalc=FALSE, skewnessweight = 4,na.rm = TRUE, ...){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor formatting here; bupperlimit=TRUE, bskewedcalc=FALSE to be bupperlimit = TRUE, bskewedcalc = FALSE and a space after every ,

@shadrackkibet
Copy link
Collaborator

This is working great, just a few small issues to sort out on the designer.

  1. The skewness weight label is not properly aligned with it's Numeric updown.
  2. Tab order.

@bethanclarke
Copy link
Contributor Author

Thank you very much for testing this @shadrackkibet

I will add the label, remove the duplicate skewness code and fix those issues with the designer soon

@dannyparsons
Copy link
Contributor

I've merged this so @rdstern can test before release, but suggested changes can still be made.

@dannyparsons dannyparsons merged commit 93cf725 into IDEMSInternational:master May 11, 2018
@bethanclarke bethanclarke deleted the QualityControl branch May 14, 2018 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants