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

Constant interpolation modelling option for spherical coordinates (AverageR and TimeR) #221

Open
3 tasks
arunge opened this issue May 23, 2024 · 2 comments
Open
3 tasks
Assignees
Labels
enhancement New feature or request

Comments

@arunge
Copy link
Contributor

arunge commented May 23, 2024

@mgross Please let me know, when you start working on the following planed feature:

For models AverageR and TimeR: Constant interpolation modelling option for spherical coordinates

Possibly we can split the task, let me know which inputs you require and what kind of output we need to display. I will create the user inputs and the output and you can provide the code for the calculation. For this, please:

  • name required inputs and the type of input
  • describe the expected output
  • provide the code for the calculation

Your provided code should contain:

  1. a file with example input data (.csv or .xlsx) or an R script containing a dataframe/list with example input data
  2. an R script containing a function for the calculation. Please add the documentation for the parameters of the function.
  • please name all required functions and libraries that are used for the calculation
  1. a file containing the expected output (.csv or xlsx file or an R script containing the expected dataframe/list)

Note on error handling: In order to throw errors please include conditions inside your code, e.g.

if (<some invalid condition>) stop("<Some error message>")

if (<some condition where the user should receive a warning>) warning("<Some warning message>")

stop(...) and warning(...) statements I will catch from outside the function and forward them to the user with the shinyTools::shinyTryCatch() function.
Errors/warnings that come from other functions that are called inside of your function will be caught automatically.

Please, let me know if you have any questions.

@arunge arunge added the enhancement New feature or request label May 23, 2024
@arunge arunge changed the title Constant interpolation modelling option for spherical coordinates AverageR and TimeR: Constant interpolation modelling option for spherical coordinates May 23, 2024
@arunge arunge changed the title AverageR and TimeR: Constant interpolation modelling option for spherical coordinates Constant interpolation modelling option for spherical coordinates (AverageR and TimeR) May 23, 2024
@mgross
Copy link
Contributor

mgross commented Jul 14, 2024

We need to use this package with the following settings:

s(latitude,longitude,bs="ds",m=-2)

mgcv_1.8-34.tar.gz

@arunge
Copy link
Contributor Author

arunge commented Sep 5, 2024

@mgross Could you please give some more details?

I checked following lines:

radioButtons(inputId = ns("SplineType"),
label = "Smooth type",
choices = c("planar" = "1", "spherical" = "2"),
selected = "1"),

radioButtons(inputId = ns("Penalty"),
label = "Extrapolation behaviour",
choices = c("constant" = "1", "linear" = "2"),
selected = "2"),

DSSM/R/01-estimateMap.R

Lines 1041 to 1049 in 65ed7a0

if (splineType == 2){
bs = "sos"
} else {
bs = "ds"
}
penalty <- penalty %>% updatePenalty(bs = bs)
s <- smoothCon(s(Latitude, Longitude, k = nknots, bs = bs, m = penalty),
data = data, knots = NULL)[[1]]

When having "sperical" Smooth type, one can select "constant" Extrapolation behaviour:

image

So, we need a new input for "Interpolation behaviour" and an option for "constant"?? What else options would we need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants