rvalavi / blockCV

The blockCV package creates spatially or environmentally separated training and testing folds for cross-validation to provide a robust error estimation in spatially structured environments. See
https://doi.org/10.1111/2041-210X.13107
GNU General Public License v3.0
106 stars 22 forks source link

tabular input data instead of points + rasters #8

Closed AMBarbosa closed 4 years ago

AMBarbosa commented 4 years ago

Any chance of allowing tabular input data? That is, instead of supplying presence points and raster variables, the user would have the option to supply a data frame with columns for the x and y coordinates, the presence/absence of species records and the value of each variable. This would be very useful when sampling units are irregularly shaped (e.g. river bains) and cannot be converted to rectangular pixels.

rvalavi commented 4 years ago

@AMBarbosa thank you for your comment. Sorry for the late response. I don't receive any notification for issues that I'm not tagged in.

Well, this was exactly my first intention to use only data frames. But, in that case, there should be an argument to introduce which columns are x and y. And another argument for the CRS. Some users might mistakenly put x instead of y or vice versa. So, the sf or sp objects are the easiest way to reduce these kinds of problems. On the other hand, it is very easy to create an sf object from a data frame. More importantly, raster is an optional object for creating spatial blocks, it is only required by envBlock() function for creating the environmental block folds.

If you provide more information on your specific data, I might be able to give some advice here or by my email.

Anyway, I would be very happy to add any suggestion to the package that could improve the user experience or needs.

Regards, Roozbeh

rvalavi commented 4 years ago

No response, so I close this issue.