From 24d1a62402eaad6465bd233784a0200f67bfaf9d Mon Sep 17 00:00:00 2001 From: "Anrijs K. Abele" <57137242+aabelean@users.noreply.github.com> Date: Wed, 18 Dec 2024 21:17:20 +0000 Subject: [PATCH 1/2] Changed the default parameters --- R/shiny_meshbuilder.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/shiny_meshbuilder.R b/R/shiny_meshbuilder.R index 4202b78..7ce5ed9 100644 --- a/R/shiny_meshbuilder.R +++ b/R/shiny_meshbuilder.R @@ -55,10 +55,10 @@ meshbuilder_shiny <- function( stop("Cannot read latitude and longitude data from spatial data. Please ensure given names are correct.") } - default_max_edge_min <- 0.01 - default_max_edge_max <- 0.3 + default_max_edge_min <- 0.9 + default_max_edge_max <- 1.8 default_offset_min <- 0.02 - default_offset_max <- 0.2 + default_offset_max <- 2 default_cutoff <- 0.02 # TODO - these defaults need changing? if (!is.null(max_edge)) { @@ -234,7 +234,7 @@ meshbuilder_shiny <- function( spatial_data } }) - + output$map <- leaflet::renderLeaflet({ map_tiles <- c("OpenStreetMap", "Esri.WorldImagery", "OpenTopoMap") m <- mapview::mapview(mesh_spatial(), layer.name = "Mesh", col.regions = "#548C2F", map.types = map_tiles) + mapview::mapview(spatial(), layer.name = "Spatial") From f6b844297155a7d60198ee2203296833138246b9 Mon Sep 17 00:00:00 2001 From: "Anrijs K. Abele" <57137242+aabelean@users.noreply.github.com> Date: Wed, 18 Dec 2024 21:42:16 +0000 Subject: [PATCH 2/2] Corrected the error in text --- vignettes/meshbuilder.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/meshbuilder.Rmd b/vignettes/meshbuilder.Rmd index 7a02978..0b586d5 100644 --- a/vignettes/meshbuilder.Rmd +++ b/vignettes/meshbuilder.Rmd @@ -54,7 +54,7 @@ sp_data <- fdmr::load_tutorial_data(dataset = "covid", filename = "spatial_data. head(sp_data) ``` -The `sp_data` object is a `SpatialPolygonsDataFrame` containing 6789 features for areas of England. This object contains all the contains all the values we +The `sp_data` object is a `SpatialPolygonsDataFrame` containing 6789 features for areas of England. This object contains all the values we need to build a mesh. We can build a mesh by passing `sp_data` to the `mesh_builder` function. ```{r eval=FALSE}