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

Enhancement: Consolidation of standardization #23

Open
mboyas-mitre opened this issue Feb 19, 2019 · 0 comments
Open

Enhancement: Consolidation of standardization #23

mboyas-mitre opened this issue Feb 19, 2019 · 0 comments

Comments

@mboyas-mitre
Copy link
Contributor

openVA/openVA/R/stackplot.r

Lines 112 to 118 in f16a333

if(class(x[[i]]) == "interVA" || class(x[[i]]) == "interVA5" ){
counts[i] <- length(x[[i]]$VA)
}else if(class(x[[i]]) == "tariff"){
counts[i] <- dim(x[[i]]$causes.test)[1]
}else if(class(x[[i]]) == "nbc"){
counts[i] <- dim(x[[i]]$test)[1]
}

There is a lot of effort done - in stackplot as well as the other functions in openVA, and not just this segment of lines - to standardize the output of the algorithm packages. Doing this as one-offs in every function seems repetitive, hard to maintain, and is hard to read. We propose splitting out the standardization into a single function that can transform outputs from all of the algorithms to a standard format, and this function can be called in almost every other workflow in openVA before running specific plotting code, etc.

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

No branches or pull requests

1 participant