HabitatSampler merge requestshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests2024-02-01T13:30:55+01:00https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/53Deployment corrections2024-02-01T13:30:55+01:00Johannes KnochDeployment correctionsSmall change for the docker build file to ensure a correct user for deployment on rz-vm175/177/178Small change for the docker build file to ensure a correct user for deployment on rz-vm175/177/178Johannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/52Use mamba environment.2024-01-10T17:50:59+01:00Romulo Pereira GoncalvesUse mamba environment.Upgrade code to stop using rgeos, sp, and rgdalRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/51Replace sp, rgdal and rgeos2024-01-10T17:00:25+01:00Romulo Pereira GoncalvesReplace sp, rgdal and rgeos1. We replace the sp, rgdal and rgeos. Instead we use sf package. The raster package (pinned as `r-raster>=3.6.*`) is now using terra package.
2. We now use mamba to manage the R environment and its dependencies.
close issues #75 , #731. We replace the sp, rgdal and rgeos. Instead we use sf package. The raster package (pinned as `r-raster>=3.6.*`) is now using terra package.
2. We now use mamba to manage the R environment and its dependencies.
close issues #75 , #73Upgrade code to stop using rgeos, sp, and rgdalRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/47Documentation2022-10-17T13:49:47+02:00Romulo Pereira GoncalvesDocumentationCloses issue #71Closes issue #71Romulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/46Rename the package back to HaSa.2022-10-17T12:24:53+02:00Romulo Pereira GoncalvesRename the package back to HaSa.Romulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/43Unitests2022-10-13T15:32:45+02:00Romulo Pereira GoncalvesUnitestsUnit and Integration testsJohannes KnochJohannes Knochhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/40SVM predict omits NaN on the prediction.2022-05-30T22:24:58+02:00Romulo Pereira GoncalvesSVM predict omits NaN on the prediction.Closes issue #64Closes issue #64Unit and Integration testsRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/33Optimized version.2022-03-24T16:49:23+01:00Romulo Pereira GoncalvesOptimized version.In this version we have improved several things.
1. We are now able to define the number of trees for randomForest.
2. Run in optimized mode
a. Improve the code to only use raster objects in memory. Clean the temporary storage.
b. ...In this version we have improved several things.
1. We are now able to define the number of trees for randomForest.
2. Run in optimized mode
a. Improve the code to only use raster objects in memory. Clean the temporary storage.
b. Use matrices instead of raster when possible.
3. Add a new sample method which only works for the optimized_mode since it runs with matrices. Now we have `random_raster` (equivalent to old `random` which uses `raster::sampleRandom` function), `raster_regular` (equivalent to old `regular` which uses `raster::sampleRegular` function), and `random_matrix` (new one which uses matrices and the stats::sample function over the only existent pixels and not over all as raster::sampleRandom - more info [here](https://github.com/rspatial/raster/issues/245)).
4. Add `last_ref_val`, this is, the default reference value for the last step (default: 1000)
@dara, @jknoch and @carstenn the official reviewer will be Daniela, but it would be great if all of you could review the changes and test it. There is still the documentation to update which I hope to get it done tomorrow based on your feedback. I am aware the review of this branch will take a while because we did quite some changes.
I have tested the optimized version several times and it all seemed running as expected. In case you want to repeat your previous run, just restart R, run again the function with the same seed (now as default we recommend to always set the seed to the current time as integer), the same `init.samples`, `sample_type`, and `models`, and use the same thresholds and you will get exactly the same results (it works for random_raster and random_matrix as well). About the seeds, more info in issue #59 and #58.
Closes issue #54, #53, #55, #56 ,#58, #59, #61Romulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/28To be able to handle NAs we need to add the parameter: na.action = na.omit,...2021-09-23T15:30:45+02:00Romulo Pereira GoncalvesTo be able to handle NAs we need to add the parameter: na.action = na.omit,...To be able to handle NAs we need to add the parameter: na.action = na.omit, this is, omit pixels with NA value.To be able to handle NAs we need to add the parameter: na.action = na.omit, this is, omit pixels with NA value.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/25Offer the options to overwrite files. In case the file exists and the user di...2021-07-16T15:32:19+02:00Romulo Pereira GoncalvesOffer the options to overwrite files. In case the file exists and the user did...Offer the options to overwrite files. In case the file exists and the user did not choose the option to overwrite, raise an error.Offer the options to overwrite files. In case the file exists and the user did not choose the option to overwrite, raise an error.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/24When results is NULL, we should create an empty SpatialPolygonsDataframe. To...2021-07-09T16:23:31+02:00Romulo Pereira GoncalvesWhen results is NULL, we should create an empty SpatialPolygonsDataframe. To...When results is NULL, we should create an empty SpatialPolygonsDataframe. To save empty SpatialTemporalDataframes we need to use sf, since it supports the empty Geometries.When results is NULL, we should create an empty SpatialPolygonsDataframe. To save empty SpatialTemporalDataframes we need to use sf, since it supports the empty Geometries.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/20We are saving run1 object and not run.2021-07-07T15:02:28+02:00Romulo Pereira GoncalvesWe are saving run1 object and not run.Unit and Integration testsRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/13Allow inline plotting and plotting on the the browser.2021-06-08T12:51:32+02:00Romulo Pereira GoncalvesAllow inline plotting and plotting on the the browser.Allow inline plotting and plotting on the the browser. For Jupyter notebooks we recommend inline plotting.Allow inline plotting and plotting on the the browser. For Jupyter notebooks we recommend inline plotting.DocumentationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/10Documentation branch2021-06-08T11:22:32+02:00Romulo Pereira GoncalvesDocumentation branchIt re-organizes the repository for a better user experience and automatic generation of documentation. While improving the documentation, we also add some auxiliary functions to improve the load of time-series data and reference data.
W...It re-organizes the repository for a better user experience and automatic generation of documentation. While improving the documentation, we also add some auxiliary functions to improve the load of time-series data and reference data.
We have now automatic Web-Page generation for the repository thanks to Continuous integration. It opens doors to start implementation of unit tests.
@alibeam I added Carsten as review, but it would be awesome to get also get your review.
@carstenn this is a long merge request. All the activity related with this work is listed below.DocumentationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/12Revert code optimization which was leading to incorrect results.2021-06-08T07:40:56+02:00Romulo Pereira GoncalvesRevert code optimization which was leading to incorrect results.PerformanceRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/9Improve the main README and re-structure the repository.2021-06-01T16:21:33+02:00Romulo Pereira GoncalvesImprove the main README and re-structure the repository.DocumentationRomulo Pereira GoncalvesRomulo Pereira Goncalveshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/merge_requests/5Improve the user interaction.2021-05-04T09:50:09+02:00Romulo Pereira GoncalvesImprove the user interaction.We have simplified the user interaction, but also allow the user to continue with the classification even if the `init.samples` and number of `models` was not sufficient. With this version the user has the change to either manually incre...We have simplified the user interaction, but also allow the user to continue with the classification even if the `init.samples` and number of `models` was not sufficient. With this version the user has the change to either manually increase it, automatically increase it, or abort the classification.
The legend of the output leaflet now shows percentage range and in the title has the number of models (`nb_models` value) which succeeded the sampling phase.
For many functions we have set the package.
We have also set a clause that checks if the results directory is empty. This avoid the error when plotting results because the threshold is defined based on the number of `.tif` images in the results directory.User InterfaceRomulo Pereira GoncalvesRomulo Pereira Goncalves