From 605b3ac7dc8f9c55eed63267370c8c8caa8514d5 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Wed, 24 Apr 2024 15:09:02 +0200 Subject: [PATCH 01/17] config: setup docker compose --- Dockerfile | 8 +++----- docker-compose.yaml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile index fefc32c..6b63dc1 100755 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,8 @@ FROM rocker/geospatial RUN apt-get update -qq && \ - apt-get install -qq libxt-dev r-cran-cairo + update-ca-certificates && \ + apt-get install -qq libxt-dev r-base-dev r-cran-cairo RUN install2.r --error \ --deps TRUE \ @@ -26,7 +27,4 @@ COPY . ./home/rstudio/app/ RUN mkdir -p ./home/rstudio/.config/rstudio/ RUN cp ./home/rstudio/app/rstudio-prefs.json ./home/rstudio/.config/rstudio/ -CMD Rscript ./home/rstudio/app/app.R - - - +CMD Rscript ./home/rstudio/app/app.R \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..a745201 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,18 @@ +version: '3' +services: + rstudio: + image: carbonviewer-rstudio + ports: + - 8787:8787 + volumes: + - ${PWD}/:/home/rstudio/app + - ${HOME}/Downloads:/home/willeke.acampo/Downloads + environment: + - DISABLE_AUTH=true + + shiny: + image: carbonviewer-shiny + ports: + - 8999:8999 + volumes: + - ${HOME}/Downloads:/home/willeke.acampo/Downloads \ No newline at end of file From e25d49286710d2c5807fd96e40f9553b15ced1f5 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Thu, 25 Apr 2024 18:55:27 +0200 Subject: [PATCH 02/17] updates: m > cm, accept all EPSG, export to txt - accepts both csv files with either x,y,torvdybe_cm or x,y,peatdepth_cm - calculations using peat depth (cm), volume is still calc. in (m3) - accepts all input EPSGS, converted to 25833 - add export to .txt --- appScripts/global.R | 66 ++++++++++++++++-------- appScripts/server.R | 121 ++++++++++++++++++++++++++++++++------------ 2 files changed, 134 insertions(+), 53 deletions(-) diff --git a/appScripts/global.R b/appScripts/global.R index e8b972a..f90ae0c 100755 --- a/appScripts/global.R +++ b/appScripts/global.R @@ -9,7 +9,7 @@ compute_volume_slider <- function(peatDepths, myGrid <- starsExtra::make_grid(peatlandDelimination, 1) myGrid <- sf::st_crop(myGrid, peatlandDelimination) - vol <- gstat::idw(dybde ~ 1, peatDepths, + vol <- gstat::idw(torvdybde_cm ~ 1, peatDepths, newdata=myGrid, nmax=30, idp=power) @@ -17,6 +17,25 @@ compute_volume_slider <- function(peatDepths, return(sum(vol$var1.pred, na.rm=T)) } +#' Interpolation of peat depths +#' +#' Interpolation of peat depths using Inverse Distance Weighting (IDW). +#' The optimal power value is determined by minimizing the Mean Absolute Error (MAE) +#' using cross-validation (IDW vs. kriging). +#' + +#' @param peatDepths peat depth points. +#' @param peatlandDelimination study area polygon. +#' @param powerRange range of power values: Default = 1:6. +#' @param nmax max number of points to use in IDW and kriging. Default = 30. +#' +#' @return A list containing the following elements: +#' - v: volume of peat in the study area. +#' - idweights: A Spatial object containing the interpolated values. +#' - best: The best power value. +#' - gg_out: ggplot showing MAE against power. +#' - gg_out_vol: A ggplot showing relative volume against power. + interpolation <- function(peatDepths, peatlandDelimination, powerRange = 1:6, @@ -36,15 +55,16 @@ interpolation <- function(peatDepths, for(i in powerRange){ # Get the MAE - temp2 <- gstat::krige.cv(dybde ~ 1, peatDepths, set = list(idp=i), nmax = nmax) + temp2 <- gstat::krige.cv(torvdybde_cm ~ 1, peatDepths, set = list(idp=i), nmax = nmax) temp$MAE[temp$power==i] <- mean(abs(temp2$residual)) # Get the volume - vol_temp <- gstat::idw(dybde ~ 1, peatDepths, + vol_temp <- gstat::idw(torvdybde_cm ~ 1, peatDepths, newdata=myGrid, nmax=nmax, idp=i) + # vol in m3 vol <- c(vol, sum(vol_temp$var1.pred, na.rm=T)) Sys.sleep(0.5) @@ -60,7 +80,7 @@ interpolation <- function(peatDepths, best <- temp %>% filter(best == "best") best <- best$power - + ############### # Plot volume # ############### @@ -69,8 +89,9 @@ interpolation <- function(peatDepths, vol_df$relative_volume <- vol_df$volume/mean(vol_df$volume)*100 v <- vol_df %>% filter(power == best) v <- v$volume - - idweights <- gstat::idw(formula = dybde ~ 1, + v_m3 <- v/100 + + idweights <- gstat::idw(formula = torvdybde_cm ~ 1, locations = peatDepths, newdata = myGrid, idp=best, @@ -81,25 +102,30 @@ interpolation <- function(peatDepths, ###################### # Plot MAE vs power gg_out <- ggplot(temp, aes(x = power, y = MAE, - colour = best, - shape = best))+ - geom_point(size=10)+ - theme_bw(base_size = 12)+ + colour = best, + shape = best))+ + geom_point(size=6)+ + theme_bw(base_size = 14)+ scale_x_continuous(breaks = powerRange)+ guides(colour="none", - shape = "none")+ + shape = "none")+ scale_color_manual(values = c("darkgreen","grey"))+ - scale_shape_manual(values = c(18, 19)) - + scale_shape_manual(values = c(18, 19))+ + labs(title = "Comparison of Mean Absolute Error (MAE) for Different Power Values in IDW", + subtitle = "The optimal power value is visualized by the green diamond.", + x = "Power", + y = "Mean Absolute Error (MAE)") + # Plot relative volume vs power gg_out_vol <- ggplot(vol_df, aes(x = factor(power), y = relative_volume))+ - geom_point(size=8)+ - xlab("power")+ - ylab("Peat volume as a percentage of\nmean predicted peat volume")+ - theme_bw(base_size = 12) + geom_point(size=6)+ + theme_bw(base_size = 14)+ + labs(title = "Impact of Power Parameter on Estimated Peat Volume", + x = "Power", + y = "Peat volume as a percentage of\nmean predicted peat volume") # Return the interpolation and the result volume - l_results <- list(v, idweights, best, gg_out, gg_out_vol) + l_results <- list(v_m3, idweights, best, gg_out, gg_out_vol) return(l_results) } @@ -159,7 +185,7 @@ print_error_incompatible_file <- function(){ "Please upload a dataset before clicking on 'load dataset'. The dataset should be a zip file containing both a shapefile with the extent of the area of interest and a csv file containing peat depth measures - (in m) taken at the site with coordinates for each measure (given in UTM 32 N, EPSG:25832). + (in m) taken at the site with coordinates for each measure (given in UTM 33 N, EPSG:25833). For more information refer to the README.", easyClose = TRUE )) @@ -169,7 +195,7 @@ print_error_csv_columns <- function(){ showModal(modalDialog( title = "CSV input error", "The CSV file uploaded is not formatted correctly. Please make sure that it contains at least - the coordinates (x and y) and the depth of the sampled sites (dybde). In any doubts, refer to the README.", + the coordinates (x and y) and the depth of the sampled sites (torvdybde_cm). In any doubts, refer to the README.", easyClose = TRUE )) } diff --git a/appScripts/server.R b/appScripts/server.R index a70244c..34d5bc6 100755 --- a/appScripts/server.R +++ b/appScripts/server.R @@ -14,7 +14,7 @@ server <- function(input, output, session){ # LANGUAGE SETTINGS # ##################### - # file with translations + # reactiveObserver: trigged by the language selection button observeEvent(input$selected_language, { shiny.i18n::update_lang(input$selected_language, session) }) @@ -22,34 +22,42 @@ server <- function(input, output, session){ ####################### # PREPARE THE DATASET # ####################### - BASE=paste0("/home/rstudio/app", "/", session$token) + + # A separate folder is created for each session + # to isolate user-specific data and computations + BASE=paste0("/home/rstudio/app", "/data/", session$token) dir.create(BASE) - - # State variable to know whether a folder has been uploaded + print(BASE) + # Dataframe that stores values based on user input in the app (reactiveValues) + # Default values are set to 0 df_reactive <- reactiveValues() df_reactive$c_stock_mean <- 0 df_reactive$c_stock_sd <- 0 + # State variable to know whether a folder has been uploaded values <- reactiveValues( upload_state = NULL ) + # reactiveObserver: trigged by uploading a file observeEvent(input$unzip, { values$upload_state <- 'uploaded' }) + # reactiveObserver: trigged by pressing the reset button observeEvent(input$reset, { values$upload_state <- 'reset' }) + # reactiveObserver: trigged by pressing the test app with testdata button observeEvent(input$test, { values$upload_state <- 'test' }) # ! PRIMARY PART ! - # Unzip the file and return the dataframe used for the calculations - # and the plots + # Unzip the file into the unique session folder + # and return the df_reactive used for the calculations and plots observeEvent(values$upload_state, { # Default upload_state value @@ -60,8 +68,9 @@ server <- function(input, output, session){ # If a file has been uploaded else if (values$upload_state == 'uploaded' || values$upload_state == 'test') { + print(paste("Upload state:", values$upload_state)) if (values$upload_state == 'test'){ - unzip ("/home/rstudio/app/test_dataset.zip", exdir = file.path(BASE)) + unzip ("/home/rstudio/app/test/test_dataset_cm.zip", exdir = file.path(BASE)) } # unzip the file else if (values$upload_state == 'uploaded'){ @@ -93,31 +102,45 @@ server <- function(input, output, session){ } else{ shp <- open_shapefile(paste0(BASE, "/", shp_file)) + + input_crs = st_crs(shp) + target_crs = 25833 # Check if the shapefile has a CRS / IF NOT WE ASSUME THAT THE CRS - # IS 25832 AS SPECIFIED ON THE README + # IS 25833 AS SPECIFIED ON THE README if (is.na(st_crs(shp))) { - print("The object does not have a CRS, assigning a CRS") - shp <- shp %>% st_set_crs(25832) + print("The shapefile does not contain a projection (CRS)--> assigning the default CRS 'EPSG:25833'") + shp <- shp %>% st_set_crs(target_crs) } else { - print("The object has a CRS -- Converting to 25832") - shp <- shp %>% st_transform(25832) + print("The shapefile has a projection (CRS) --> Converting to 'EPSG:25833'") + shp <- shp %>% st_transform(target_crs) } df <- open_csv(paste0(BASE, "/", csv_file)) names(df) <- tolower(names(df)) + + # If name is peat_depth_cm change to torvdybde_cm + if ("peat_depth_cm" %in% names(df)){ + names(df)[names(df) == "peat_depth_cm"] <- "torvdybde_cm" + } - # Check that the CSV contains the necessary columns (x,y, dybde) - necessary_columns <- c("x","y","dybde") + # Check that the CSV contains the necessary columns (x,y, torvdybde_cm) + necessary_columns <- c("x","y", "torvdybde_cm") print(sum(names(df) %in% necessary_columns) != 3) + + # print first row of the dataframe + print(head(df)) if (sum(names(df) %in% necessary_columns) != 3){ print_error_csv_columns() } else{ - dfs <- transform_to_sf(df) %>% st_set_crs(st_crs(shp)) - dfs <- dfs %>% st_transform(25832) - shp <- shp %>% st_transform(25832) + dfs <- transform_to_sf(df) %>% st_set_crs(st_crs(input_crs)) + dfs <- dfs %>% st_transform(target_crs) + shp <- shp %>% st_transform(target_crs) + + #print(head(dfs)) + print(head(shp)) # Interpolation (take only "sp" objects, hence the conversion) interp <- interpolation(dfs, shp) @@ -128,10 +151,17 @@ server <- function(input, output, session){ df_reactive$volume <- interp[[1]] df_reactive$interpolation_raster <- interp[[2]] + # Fill the slider with the optimal power value updateSliderInput(session, "power", value=interp[[3]]) + # Fill the plots with the MAE and volume df_reactive$maeVSpower <- interp[[4]] df_reactive$volumeVSpower <- interp[[5]] + + print("df_reactive:") + observe({ + print(reactiveValuesToList(df_reactive)) + }) } } } @@ -155,8 +185,9 @@ server <- function(input, output, session){ v <- compute_volume_slider(df_reactive$points, df_reactive$shape, input$power) + v_m3 <- v/100 - df_reactive$volume <- v + df_reactive$volume <- v_m3 }) # Overwrite the interpolation raster based on input$power @@ -169,7 +200,7 @@ server <- function(input, output, session){ myGrid <- starsExtra::make_grid(df_reactive$shape, 1) myGrid <- sf::st_crop(myGrid, df_reactive$shape) - idweights <- gstat::idw(formula = dybde ~ 1, + idweights <- gstat::idw(formula = torvdybde_cm ~ 1, locations = df_reactive$points, newdata = myGrid, idp=input$power, @@ -220,7 +251,7 @@ server <- function(input, output, session){ df_reactive$gran_data <- reactive({ req(input$s_peatland_type) - df_read <- fread("/home/rstudio/app/dataset.csv", + df_read <- fread("/home/rstudio/app/data/gran_dataset.csv", sep = ";", encoding = "unknown") @@ -380,11 +411,10 @@ server <- function(input, output, session){ leaflet() %>% addTiles() %>% addStarsImage(df_reactive$interpolation_raster, colors = pal) %>% addLegend(pal = pal, values = values(idw_r), - title = i18n$t("Dybde")) %>% + title = i18n$t("Torvdybde (cm)")) %>% addControl(title, position = "topleft", className="map-title") }) - ################### # OUTPUT THE MAPS # @@ -430,15 +460,17 @@ server <- function(input, output, session){ # Write the interpolation map shot_interp_map <- reactive({ - - interp_map <- tm_shape(df_reactive$interpolation_raster) + + b1_peat_depth <- stars::st_as_stars(df_reactive$interpolation_raster[[1]]) + st_crs(b1_peat_depth) <- 25833 + print(b1_peat_depth) + interp_map <- tm_shape(b1_peat_depth) + tm_raster(title = i18n$t("Dybde")) + tm_compass() + tm_scale_bar() + - tm_layout(title= i18n$t("Kart med interpolerte torvdybder"), + tm_layout(title= i18n$t("Kart med interpolerte torvdybder (cm)"), legend.outside=T) - tmap_save(interp_map, "map_interpolation.png") + tmap_save(interp_map, "kart_torvdybder.png") }) @@ -452,13 +484,13 @@ server <- function(input, output, session){ tm_scale_bar()+ tm_layout(title= i18n$t("Kart over omrÃ¥det"), legend.outside=T) - tmap_save(d_map, "map_descriptive.png") + tmap_save(d_map, "kart_over_omradet.png") }) # Write the raster write_raster <- reactive({ - write_stars(df_reactive$interpolation_raster, "interpolation_raster.tif") + write_stars(df_reactive$interpolation_raster, "raster_interpolerte_torvdybder.tif") }) result_csv <- reactive({ @@ -476,14 +508,33 @@ server <- function(input, output, session){ results <- rbind(results, area, c_stock_mean, c_stock_sd) } - write.csv(results, "results.csv") + write.csv(results, "carbonviewer_resultater.csv") }) + result_txt <- reactive({ + + results <- tibble(Description = "volume", Results = df_reactive$volume, units = "m3") + area <- tibble(Description = "area", Results = df_reactive$area, units = "m2") + + if (df_reactive$c_stock_mean == 0 && df_reactive$c_stock_sd == 0){ + results <- rbind(results, area) + } + + else { + c_stock_mean <- tibble(Description = "carbon_stock_mean", Results = df_reactive$c_stock_mean, units = "Tons") + c_stock_sd <- tibble(Description = "carbon_stock_sd", Results = df_reactive$c_stock_sd, units = "Tons") + results <- rbind(results, area, c_stock_mean, c_stock_sd) + } + + write.table(results, "carbonviewer_resultater.txt", quote = FALSE, sep = "\t", row.names = FALSE) + + }) + # Downloadable csv of selected dataset ---- output$downloadData <- downloadHandler( - filename = function() {paste("results-", Sys.Date(), ".zip", sep="")}, + filename = function() {paste(i18n$t("carbonviewer-resultater-"), Sys.Date(), ".zip", sep="")}, content = function(file) { @@ -492,9 +543,13 @@ server <- function(input, output, session){ write_raster() shot_d_map() result_csv() + result_txt() - fs <- c("map_interpolation.png", "interpolation_raster.tif", "map_descriptive.png", "results.csv") - + fs <- c(i18n$t("kart_torvdybder.png"), + i18n$t("raster_interpolerte_torvdybder.tif"), + i18n$t("kart_over_omradet.png"), + i18n$t("carbonviewer_resultater.csv"), + i18n$t("carbonviewer_resultater.txt")) zip(zipfile = file, files = fs) contentType = "application/zip" } @@ -506,4 +561,4 @@ server <- function(input, output, session){ session$onSessionEnded(function() { unlink(BASE, recursive = TRUE) }) -} +} \ No newline at end of file From 4d9dfbe91cdee8074441eb4808a65a9be9497b78 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Thu, 25 Apr 2024 19:01:55 +0200 Subject: [PATCH 03/17] add: data folder - separate folder is created for each session and stored under data - isolates user-specific data and computations - test_dataset.zip is updated to new col names and peat depth in cm (moved to test) - gran_dataset.csv moved to data --- data/gran_dataset.csv | 89 +++++++++++++++++++++++++++++++++++++++ test/test_dataset_cm.zip | Bin 0 -> 4402 bytes 2 files changed, 89 insertions(+) create mode 100644 data/gran_dataset.csv create mode 100644 test/test_dataset_cm.zip diff --git a/data/gran_dataset.csv b/data/gran_dataset.csv new file mode 100644 index 0000000..ba171f3 --- /dev/null +++ b/data/gran_dataset.csv @@ -0,0 +1,89 @@ +SAMPLE ID2;Sample No;Location Name;Municipality;County;General Peatland Type;Specific Peatland Type;Generell myrtype;Naturtype;Detaljert Naturtype;NiN kode;Condition;Condition_notes;Notes_misc;ETRS89_UTM32_E;ETRS89_UTM32_N;Depth (cm);Depth_grouped (cm);BD (t/m3);moisture content (%);% SOM;% Ash content;SOM to SOC (conversion 0.5);C density (kg/m3);% Carbon;% Nitrogen;C:N ratio;Data collection date;Data contributors;Lab analysis +0029;1;Myr NV for Vestersetermyran;Namsos;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;Svært og temmelig kalkfattig myrflate;V1-C-1;intact;;;624486.39;7130226.87;20-50;0-50;0.045;88.21;97.72;2.28;48.86;21.987;46.74;1.72;27;23.09.2020;NINA GRAN;NINA GRAN +0029;2;Myr NV for Vestersetermyran;Namsos;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;Svært og temmelig kalkfattig myrflate;V1-C-1;intact;;;624486.39;7130226.87;100-130;100-150;0.055;90.73;98.84;1.16;49.42;27.181;47.76;1.88;25;23.09.2020;NINA GRAN;NINA GRAN +0030;1;Bakkemyr SV for Vestersetermyran;Namsos;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær;V1-C-2;intact;;;624519.51;7130045.72;20-50;0-50;0.102;91.73;99.5;0.5;49.75;50.745;41.97;2.53;17;23.09.2020;NINA GRAN;NINA GRAN +0031;1;Skognbakkmyra;Namsos;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof lav tue;V3-C-1;intact;;;627779.3;7131273.7;20-50;0-50;0.061;90.33;99.01;0.99;49.51;30.2011;48;1.92;25;23.09.2020;NINA GRAN;NINA GRAN +0031;2;Skognbakkmyra;Namsos;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof lav tue;V3-C-1;intact;;;627779.3;7131273.7;100-130;100-150;0.052;88.07;98.67;1.33;49.34;25.6568;46.53;1.35;34;23.09.2020;NINA GRAN;NINA GRAN +0031;3;Skognbakkmyra;Namsos;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof lav tue;V3-C-1;intact;;;627779.3;7131273.7;200-230;200-250;0.045;87.36;96.84;3.16;48.42;21.789;49.47;1.17;42;23.09.2020;NINA GRAN;NINA GRAN +0032;1;N for Skognbakkmyra;Namsos;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;627791.55;7131145.58;20-50;0-50;0.046;89.74;98.51;1.49;49.26;22.6596;49.06;2.01;24;23.09.2020;NINA GRAN;NINA GRAN +0032;2;N for Skognbakkmyra;Namsos;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;627791.55;7131145.58;60-90;50-100;0.065;85.7;93.27;6.73;46.64;30.316;49.83;2;25;23.09.2020;NINA GRAN;NINA GRAN +0033;1;Myr ved Grasbekken;Namsos;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr ;intermediær lav tue;V1-C-2;intact;;;619101.57;7128976.67;20-50;0-50;0.063;90.92;97.87;2.13;48.94;30.8322;48.07;2.71;18;23.09.2020;NINA GRAN;NINA GRAN +0033;2;Myr ved Grasbekken;Namsos;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr ;intermediær lav tue;V1-C-2;intact;;;619101.57;7128976.67;100-130;100-150;0.056;84.65;93.41;6.59;46.7;26.152;49.09;1.85;27;23.09.2020;NINA GRAN;NINA GRAN +0033;3;Myr ved Grasbekken;Namsos;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr ;intermediær lav tue;V1-C-2;intact;;;619101.57;7128976.67;200-230;200-250;0.082;92.54;98.39;1.61;49.2;40.344;46.27;2.69;17;23.09.2020;NINA GRAN;NINA GRAN +0034;1;N for Saursaunmyra;Steinkjer;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;;622538.48;7109588.18;20-50;0-50;0.052;93.49;99.46;0.54;49.73;25.8596;43.13;2.31;19;23.09.2020;NINA GRAN;NINA GRAN +0034;2;N for Saursaunmyra;Steinkjer;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;not sure about depth, but somewhere close to this;622538.48;7109588.18;70-90;50-100;0.08;93.2;99.1;0.9;49.55;39.64;47.09;2.15;22;23.09.2020;NINA GRAN;NINA GRAN +0035;1;Saursaunmyra;Steinkjer;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;622683.43;7109390.35;20-50;0-50;0.037;74.17;84.47;15.53;42.23;15.6251;45.9;1.83;25;23.09.2020;NINA GRAN;NINA GRAN +0035;2;Saursaunmyra;Steinkjer;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;622683.43;7109390.35;100-130;100-150;0.031;87.1;97.07;2.93;48.54;15.0474;46.32;1.35;34;23.09.2020;NINA GRAN;NINA GRAN +0035;3;Saursaunmyra;Steinkjer;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;622683.43;7109390.35;200-230;200-250;0.032;89.12;98.08;1.92;49.04;15.6928;48.91;1.34;37;23.09.2020;NINA GRAN;NINA GRAN +H1;1;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555166.65;7031076.86;35-50;0-50;0.08;92;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +H1;2;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555166.65;7031076.86;85-100;50-100;0.12;91;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +H1;3;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555166.65;7031076.86;135-150;100-150;0.15;89;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +H1;4;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555166.65;7031076.86;185-200;150-200;0.11;91;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +H2;1;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555173.62;7031071.95;35-50;0-50;0.02;92.54;99.67;0.33;49.84;9.968;47.31;1.49;32;27.04.2017;NTNU Vitenskapsmuseet;NINA GRAN +H2;2;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555173.62;7031071.95;85-100;50-100;0.103;86.74;99.36;0.64;49.68;51.1704;51.73;1.28;40;27.04.2017;NTNU Vitenskapsmuseet;NINA GRAN +H2;3;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555173.62;7031071.95;135-150;100-150;0.14;86.7;99.16;0.84;49.58;69.412;52.09;1.23;42;27.04.2017;NTNU Vitenskapsmuseet;NINA GRAN +H2;4;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555173.62;7031071.95;185-200;150-200;0.134;88.84;99.56;0.44;49.78;66.7052;51.69;0.92;56;27.04.2017;NTNU Vitenskapsmuseet;NINA GRAN +H3;1;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555150.19;7031056.58;35-50;0-50;0.08;93;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +H3;2;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555150.19;7031056.58;85-100;50-100;0.19;84;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +H3;3;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555150.19;7031056.58;135-150;100-150;0.12;90;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +H3;4;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555150.19;7031056.58;185-200;150-200;0.14;90;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KL1;1;Kinn Lista1;Kinn;Vestland;fen;poor fen;jordvannsmyr;fattigmyr ;fattig tue;V1-C-1;intact;;;320040.12;6831658.61;20-30;0-50;;79.9;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KL1;2;Kinn Lista1;Kinn;Vestland;fen;poor fen;jordvannsmyr;fattigmyr ;fattig tue;V1-C-1;intact;;;320040.12;6831658.61;30-40;0-50;0.17;85.31;89.23;10.77;44.61;75.837;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KL1;3;Kinn Lista1;Kinn;Vestland;fen;poor fen;jordvannsmyr;fattigmyr ;fattig tue;V1-C-1;intact;;;320040.12;6831658.61;70-80;50-100;;87.6;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KL1;4;Kinn Lista1;Kinn;Vestland;fen;poor fen;jordvannsmyr;fattigmyr ;fattig tue;V1-C-1;intact;;;320040.12;6831658.61;80-90;50-100;0.14;90.01;97.29;2.71;48.64;68.096;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KL2;1;Kinn Lista2;Kinn;Vestland;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær bakkemyr, fastmatte;V1-C-2;intact;;;320029.25;6831798.22;20-30;0-50;;89.6;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KL2;2;Kinn Lista2;Kinn;Vestland;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær bakkemyr, fastmatte;V1-C-2;intact;;;320029.25;6831798.22;30-40;0-50;0.18;86.37;83.47;16.53;41.73;75.114;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KL2;3;Kinn Lista2;Kinn;Vestland;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær bakkemyr, fastmatte;V1-C-2;intact;;;320029.25;6831798.22;70-80;50-100;;87.3;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KL2;4;Kinn Lista2;Kinn;Vestland;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær bakkemyr, fastmatte;V1-C-2;intact;;;320029.25;6831798.22;80-90;50-100;0.14;89.66;88.89;11.11;44.44;62.216;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +Klæbu0037;1;V for Dyrbekken;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;;578419.32;7019291.61;20-50;0-50;0.058;86.14;97.71;2.29;48.85;28.333;50.03;2.66;19;07.10.2020;NINA GRAN;NINA GRAN +Klæbu0037;2;V for Dyrbekken;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;;578419.32;7019291.61;100-130;100-150;0.052;87.1;97.74;2.26;48.87;25.4124;49.26;2.43;20;07.10.2020;NINA GRAN;NINA GRAN +Klæbu0037;3;V for Dyrbekken;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;;578419.32;7019291.61;200-230;200-250;0.042;90.05;98.58;1.42;49.29;20.7018;52.77;1.74;30;07.10.2020;NINA GRAN;NINA GRAN +Klæbu0038;1;V for Dyrbekken;Trondheim;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær;V1-C-2;intact;;;578457.45;7019313.83;20-50;0-50;0.067;92.42;99.69;0.31;49.85;33.3995;52.61;1.53;34;07.10.2020;NINA GRAN;NINA GRAN +Klæbu0038;2;V for Dyrbekken;Trondheim;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær;V1-C-2;intact;;;578457.45;7019313.83;100-130;100-150;0.07;91.33;99.43;0.57;49.72;34.804;51.7;2.68;19;07.10.2020;NINA GRAN;NINA GRAN +KM1;1;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292719.69;6825556.48;20-30;0-50;;87.9;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KM1;2;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292719.69;6825556.48;30-40;0-50;0.13;90.38;96.49;3.51;48.25;62.725;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KM1;3;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292719.69;6825556.48;70-80;50-100;;89.2;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KM1;4;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292719.69;6825556.48;80-90;50-100;0.1;92.45;93.44;6.56;46.72;46.72;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KM2;1;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292768.39;6825534.14;20-30;0-50;;88.2;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KM2;2;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292768.39;6825534.14;30-40;0-50;0.05;91.9;98.5;1.5;49.25;24.625;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KM2;3;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292768.39;6825534.14;70-80;50-100;;89.8;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KM2;4;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292768.39;6825534.14;80-90;50-100;0.09;91.92;93.39;6.61;46.69;42.021;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;1;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;20-30;0-50;;87.1;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;3;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;70-80;50-100;;84.1;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;4;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;80-90;50-100;0.14;89.57;92.95;7.05;46.48;65.072;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;5;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;120-130;100-150;;89.5;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;6;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;130-140;100-150;0.12;90.97;89.47;10.53;44.74;53.688;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;7;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;170-180;150-200;;91.8;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;8;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;180-190;150-200;0.13;91.46;92.07;7.93;46.03;59.839;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;9;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;220-230;200-250;;91.8;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +KR;10;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;230-240;200-250;0.09;93.55;95.63;4.37;47.82;43.038;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet +MI1;1;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650291.49;6649282.06;6-17;0-50;0.173;91.35;99.75;0.25;49.87;86.2751;44.74;1.54;29;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +MI1;2;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650291.49;6649282.06;30-40;0-50;0.211;87.78;99.6;0.4;49.8;105.078;47.91;0.88;54;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +MI1;3;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650291.49;6649282.06;130-140;1001-50;0.07;94.78;99.97;0.03;49.98;34.986;47.1;1.53;31;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +MI2;1;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650344.03;6649293.79;10-20;0-50;0.032;95.69;99.87;0.13;49.93;15.9776;44.44;1.55;29;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +MI2;2;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650344.03;6649293.79;60-70;50-100;0.097;93.78;99.79;0.21;49.89;48.3933;46.38;1.62;29;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +MI2;3;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650344.03;6649293.79;135-145;100-150;0.039;94.88;99.98;0.02;49.99;19.4961;45.25;1.56;29;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +Ringvål0039;1;Rørmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;564694.52;7026414.33;20-50;0-50;0.05;89.58;98.1;1.9;49.05;24.525;42.03;3.06;14;07.10.2020;NINA GRAN;NINA GRAN +Ringvål0039;2;Rørmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;564694.52;7026414.33;100-130;100-150;0.036;87.34;96.39;3.61;48.2;17.352;48.68;1.11;44;07.10.2020;NINA GRAN;NINA GRAN +Ringvål0039;3;Rørmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;564694.52;7026414.33;200-230;200-250;0.038;90.74;98.47;1.53;49.23;18.7074;52.64;1.42;37;07.10.2020;NINA GRAN;NINA GRAN +Ringvål0040;1;Rørmyra;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;564655.29;7026647.81;20-50;0-50;0.052;89.93;98.76;1.24;49.38;25.6776;45.73;1.95;23;07.10.2020;NINA GRAN;NINA GRAN +Ringvål0040;2;Rørmyra;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;564655.29;7026647.81;100-130;100-150;0.066;89.03;98.81;1.19;49.41;32.6106;47.36;2.59;18;07.10.2020;NINA GRAN;NINA GRAN +Ringvål0040;3;Rørmyra;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;564655.29;7026647.81;200-230;200-250;0.047;88.65;98.44;1.56;49.22;23.1334;46.84;2.1;22;07.10.2020;NINA GRAN;NINA GRAN +Ringvål0041;1;Rørmyra;Trondheim;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;564610.88;7026566.01;20-50;0-50;0.052;88.31;99.39;0.61;49.7;25.844;47.57;1.4;34;07.10.2020;NINA GRAN;NINA GRAN +Ringvål0041;2;Rørmyra;Trondheim;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;564610.88;7026566.01;100-130;100-150;0.055;88.66;99.13;0.87;49.56;27.258;51.06;1.43;36;07.10.2020;NINA GRAN;NINA GRAN +SI1;1;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651930.81;6662483.69;9-18;0-50;0.229;87.02;98.34;1.66;49.17;112.5993;46.18;1.49;31;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +SI1;2;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651930.81;6662483.69;30-45;0-50;0.099;91.36;98.98;1.02;49.49;48.9951;46.76;1.75;27;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +SI1;3;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651930.81;6662483.69;130-140;100-150;0.082;94.94;99.81;0.19;49.9;40.918;46.14;0.93;50;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +SI2;1;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651911.64;6662436.52;5-10;0-50;0.103;93.96;99.68;0.32;49.84;51.3352;43.47;1.63;27;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +SI2;2;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651911.64;6662436.52;30-40;0-50;0.176;88.93;99.68;0.32;49.84;87.7184;47.68;1.28;37;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +SI2;3;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651911.64;6662436.52;130-140;100-150;0.03;93.83;99.65;0.35;49.82;14.946;46.36;1.02;46;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN +Tydal0018;1;Setermyra;Tydal;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;636502.33;6991873.93;20-50;0-50;0.18;85.43;97.49;2.51;48.75;87.75;49.4;1.61;31;09.09.2020;NINA GRAN;NINA GRAN +Tydal0018;2;Setermyra;Tydal;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;636502.33;6991873.93;100-130;100-150;0.14;89.88;99.13;0.87;49.56;69.384;49.08;2.11;23;09.09.2020;NINA GRAN;NINA GRAN +Tydal0018;3;Setermyra;Tydal;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;636502.33;6991873.93;175-205;150-200;0.12;90.79;99.13;0.87;49.57;59.484;48.8;2.56;19;09.09.2020;NINA GRAN;NINA GRAN +Tydal0019;1;Setermyra;Tydal;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr ;intermediær fastmatte;V1-C-2;intact;;;636450.18;6991843.19;30-60;0-50;0.13;91.38;99.21;0.79;49.6;64.48;47.8;2.43;20;09.09.2020;NINA GRAN;NINA GRAN +Tydal0021;1;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof tue, hellende myr;V3-C-1;intact;;;636359.99;6993378.29;20-50;0-50;0.21;80.9;97.6;2.4;48.8;102.48;50.52;1.23;41;09.09.2020;NINA GRAN;NINA GRAN +Tydal0021;3;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof tue, hellende myr;V3-C-1;intact;;;636359.99;6993378.29;100-130;100-150;0.11;90.04;99.61;0.39;49.81;54.791;49.06;0.97;51;09.09.2020;NINA GRAN;NINA GRAN +Tydal0021;4;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof tue, hellende myr;V3-C-1;intact;;;636359.99;6993378.29;150-180;150-200;0.12;86.82;99.56;0.44;49.78;59.736;47.9;1.16;41;09.09.2020;NINA GRAN;NINA GRAN +Tydal51;2;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr ;ombrotrof tue;V3-C-1;intact;;;636449.53;6991971.31;100-130;100-150;0.11;90.31;98.58;1.42;49.29;54.219;47.48;0.85;56;09.09.2020;NINA GRAN;NINA GRAN +Tydal51;3;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr ;ombrotrof tue;V3-C-1;intact;;;636449.53;6991971.31;200-230;200-250;0.19;82.46;92.21;7.79;46.1;87.59;47.23;0.76;62;09.09.2020;NINA GRAN;NINA GRAN +;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/test/test_dataset_cm.zip b/test/test_dataset_cm.zip new file mode 100644 index 0000000000000000000000000000000000000000..5ae05876a9aaab928e85e07870b13634569725d9 GIT binary patch literal 4402 zcmb7|2T)T>xW_{$2%#9HccmD_P!ttHlcIn$>AedA(gG?8ornSH9RVqZA_)*_A{u({ zNK-&MNJphyRNw{gdo$ka^?Ki)*>ld$ne+Ykzq{Ye{#HkWjGP8=T--uZjlaMA?~MV# z34l9z!>#OX;5Ob4a4S2v^9K4r0NDmu#PKt+`rJDKAR(7b4x=UiOacJt5F>$!|55`i zf=(Mw;hlH_i7i^<7yf^U^gXh-lZ}UiqqD1nn75P1_t^YNm3Bk4KgG7Q)>*Qx2fed| zN*{Hg;9vIm}WV9-JCcfSENwoW%;Wwjwxii}AN=B7gDcY+!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>)llv*hh|PEB&?KG>SGaW5gBn{hBhucl4_@D4Su;rEjOzy>t&#P>yvzW6ifEYl*q37>!q z-Co<-^H{nYM&QX7C1-iD8Zu3-V6`XXJE}G4e4UBPSdXc!MA16T;6y=Oi4j#NP?pkn zpvwr#2`y=)&8=g+X?b%4h>cL%hB9n_;t9)QCzZK<$%QqZB^NG~e>4=E{CMA0xo!v_ zADedM8;yS3e?;|H_#i7Cx_OznLw6o0yoeFotax$X~P7t0V2&US3uyv%H3~`x1Ov$$C7t@j*82XoIrQd_5E%TFEH zrN0dy=knX7Z>1jrmU!f~2apsQ;17Kb8`1v!)Qv3jcXKY<)k>=@*JW9qMI z_@k*d+FywMcp^Yd%HNwhK5O`EX8mZ&obI Date: Thu, 25 Apr 2024 19:04:27 +0200 Subject: [PATCH 04/17] UI: sidebar reorder of menuitems new order: - upload data - volume calc - carbon content calc - map results - power eval graphs - download --- appScripts/ui.R | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/appScripts/ui.R b/appScripts/ui.R index 59f2573..2820d00 100755 --- a/appScripts/ui.R +++ b/appScripts/ui.R @@ -2,16 +2,16 @@ # HEADER ----------------------------------------------------------------------------------------- header <- shinydashboard::dashboardHeader(title = "CarbonViewer", - tags$li( - a( - strong(i18n$t("ABOUT")), - height = 40, - href = "https://github.com/NINAnor/carbonviewer", - title = "", - target = "_blank" - ), - class = "dropdown" - ) + tags$li( + a( + strong(i18n$t("ABOUT")), + height = 40, + href = "https://github.com/NINAnor/carbonviewer", + title = "", + target = "_blank" + ), + class = "dropdown" + ) ) # SIDEBAR ----------------------------------------------------------------------------------------- @@ -26,17 +26,22 @@ sidebar <- shinydashboard::dashboardSidebar( menuItem(i18n$t("Bruksanvisning"), tabName = "instruction", icon = icon("comment")), - menuItem(i18n$t("Volumberegning"), tabName = "upload", icon = icon('download'), + menuItem(i18n$t("Last opp data"), tabName = "upload", icon = icon('download'), fileInput(inputId = "upload_zip", label = i18n$t(shiny::HTML("Last opp en zip-fil")), - accept = ".zip"), - actionButton(inputId = "test", label = i18n$t("Prøv app med testdatasett")), - actionButton(inputId = "unzip", label = i18n$t("Last inn datasett")), + accept = ".zip") + ), + + menuItem(i18n$t("Volumberegning"), tabName = "calculation", icon = icon('cog'), + actionButton(inputId = "unzip", label = i18n$t("Beregn")), + actionButton(inputId = "test", label = i18n$t("Beregn med testdata")), actionButton(inputId = "reset", label = i18n$t("Nullstille")) ), - menuItem(i18n$t("Torvegenskaper"), tabName = "carbonchar", icon = icon('keyboard'), - + menuItem(i18n$t("Beregn karboninnhold"), tabName = "carbonchar", icon = icon('keyboard'), + + tags$b(i18n$t("Torvegenskaper")), + menuItem(i18n$t("Standardverdier"), tabName = "df_values", icon = icon('keyboard'), selectInput(inputId = "g_peatland_type", label = i18n$t(shiny::HTML("Hovedmyrtype")), @@ -72,10 +77,10 @@ sidebar <- shinydashboard::dashboardSidebar( ) ), - menuItem(i18n$t("Valg av power"), tabName = "powersetting", icon = icon('hand-fist') + menuItem(i18n$t("Kart resultater"), tabName = "tables", icon = icon("th") ), - menuItem(i18n$t("Resultater"), tabName = "tables", icon = icon("th") + menuItem(i18n$t("Power evalueringsgrafer"), tabName = "powersetting", icon = icon('hand-fist') ), menuItem(i18n$t("Last ned resultater"), tabName = "download", icon = icon("file-export"), @@ -119,7 +124,7 @@ body <- shinydashboard::dashboardBody( tabItem(tabName = "powersetting", fluidRow( box(plotOutput("maeVSpower"), width = 6), - box(plotOutput("volumeVSpower"), width = 6) + box(plotOutput("volumeVSpower"), width = 6), )) ) ) From 5567de2b193f42fc8a2dfbb2ea4cef4ace63e27f Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Thu, 25 Apr 2024 19:07:19 +0200 Subject: [PATCH 05/17] chore: remove and move files - stand-alone exploration.R not necessary for application. --- appScripts/exploration.R | 62 --------------------------- dataset.csv | 89 --------------------------------------- test_dataset.zip | Bin 4518 -> 0 bytes 3 files changed, 151 deletions(-) delete mode 100755 appScripts/exploration.R delete mode 100644 dataset.csv delete mode 100644 test_dataset.zip diff --git a/appScripts/exploration.R b/appScripts/exploration.R deleted file mode 100755 index 4ce317e..0000000 --- a/appScripts/exploration.R +++ /dev/null @@ -1,62 +0,0 @@ -library(tidyverse) -library(data.table) -library(gstat) - -shp <- readOGR("/home/rstudio/app/data_exple/test_dataset/test_shapefile.shp") %>% st_as_sf() -df <- open_csv("/home/rstudio/app/data_exple/test_dataset/test_depths_samples.csv") - -# Transform CRS -dfs <- transform_to_sf(df) %>% st_set_crs(st_crs(shp)) -dfs <- dfs %>% st_transform(25832) -shp <- shp %>% st_transform(25832) - -myGrid <- starsExtra::make_grid(shp, 1) -myGrid <- sf::st_crop(myGrid, shp) - -powerRange <- 1:6 -nmax <- 20 - -for(i in 2){ - - # Get the MAE - temp2 <- gstat::krige.cv(Dybde ~ 1, dfs, set = list(idp=i), nmax = nmax) - temp$MAE[temp$power==i] <- mean(abs(temp2$residual)) - - # Get the volume - vol_temp <- gstat::idw(dybde ~ 1, dfs, - newdata=myGrid, - nmax=nmax, - idp=i) - - vol <- c(vol, sum(vol_temp$var1.pred, na.rm=T)) -} - -idwe <- gstat::idw(formula = Dybde ~ 1, - locations = dfs, - newdata = myGrid, - idp=4, - nmax = nmax) - - -idwe_r <- as(idwe, "Raster") - -library(leafem) - -pal = colorNumeric(palette = "magma", - values(idwe_r), na.color = "transparent", - reverse = TRUE) - -leaflet() %>% addTiles() %>% - addStarsImage(idwe, colors = pal) %>% - addLegend(pal = pal, values = values(idwe_r), - title = "Dybde") %>% - addControl("title", position = "topleft", className="map-title") - - -leaflet() %>% addTiles() %>% - addRasterImage(idwe_r, colors = pal) #%>% - #addLegend(pal = pal, values = values(idwe_r), - # title = "Dybde") %>% - #addControl(title, position = "topleft", className="map-title") - - diff --git a/dataset.csv b/dataset.csv deleted file mode 100644 index ba171f3..0000000 --- a/dataset.csv +++ /dev/null @@ -1,89 +0,0 @@ -SAMPLE ID2;Sample No;Location Name;Municipality;County;General Peatland Type;Specific Peatland Type;Generell myrtype;Naturtype;Detaljert Naturtype;NiN kode;Condition;Condition_notes;Notes_misc;ETRS89_UTM32_E;ETRS89_UTM32_N;Depth (cm);Depth_grouped (cm);BD (t/m3);moisture content (%);% SOM;% Ash content;SOM to SOC (conversion 0.5);C density (kg/m3);% Carbon;% Nitrogen;C:N ratio;Data collection date;Data contributors;Lab analysis -0029;1;Myr NV for Vestersetermyran;Namsos;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;Svært og temmelig kalkfattig myrflate;V1-C-1;intact;;;624486.39;7130226.87;20-50;0-50;0.045;88.21;97.72;2.28;48.86;21.987;46.74;1.72;27;23.09.2020;NINA GRAN;NINA GRAN -0029;2;Myr NV for Vestersetermyran;Namsos;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;Svært og temmelig kalkfattig myrflate;V1-C-1;intact;;;624486.39;7130226.87;100-130;100-150;0.055;90.73;98.84;1.16;49.42;27.181;47.76;1.88;25;23.09.2020;NINA GRAN;NINA GRAN -0030;1;Bakkemyr SV for Vestersetermyran;Namsos;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær;V1-C-2;intact;;;624519.51;7130045.72;20-50;0-50;0.102;91.73;99.5;0.5;49.75;50.745;41.97;2.53;17;23.09.2020;NINA GRAN;NINA GRAN -0031;1;Skognbakkmyra;Namsos;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof lav tue;V3-C-1;intact;;;627779.3;7131273.7;20-50;0-50;0.061;90.33;99.01;0.99;49.51;30.2011;48;1.92;25;23.09.2020;NINA GRAN;NINA GRAN -0031;2;Skognbakkmyra;Namsos;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof lav tue;V3-C-1;intact;;;627779.3;7131273.7;100-130;100-150;0.052;88.07;98.67;1.33;49.34;25.6568;46.53;1.35;34;23.09.2020;NINA GRAN;NINA GRAN -0031;3;Skognbakkmyra;Namsos;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof lav tue;V3-C-1;intact;;;627779.3;7131273.7;200-230;200-250;0.045;87.36;96.84;3.16;48.42;21.789;49.47;1.17;42;23.09.2020;NINA GRAN;NINA GRAN -0032;1;N for Skognbakkmyra;Namsos;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;627791.55;7131145.58;20-50;0-50;0.046;89.74;98.51;1.49;49.26;22.6596;49.06;2.01;24;23.09.2020;NINA GRAN;NINA GRAN -0032;2;N for Skognbakkmyra;Namsos;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;627791.55;7131145.58;60-90;50-100;0.065;85.7;93.27;6.73;46.64;30.316;49.83;2;25;23.09.2020;NINA GRAN;NINA GRAN -0033;1;Myr ved Grasbekken;Namsos;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr ;intermediær lav tue;V1-C-2;intact;;;619101.57;7128976.67;20-50;0-50;0.063;90.92;97.87;2.13;48.94;30.8322;48.07;2.71;18;23.09.2020;NINA GRAN;NINA GRAN -0033;2;Myr ved Grasbekken;Namsos;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr ;intermediær lav tue;V1-C-2;intact;;;619101.57;7128976.67;100-130;100-150;0.056;84.65;93.41;6.59;46.7;26.152;49.09;1.85;27;23.09.2020;NINA GRAN;NINA GRAN -0033;3;Myr ved Grasbekken;Namsos;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr ;intermediær lav tue;V1-C-2;intact;;;619101.57;7128976.67;200-230;200-250;0.082;92.54;98.39;1.61;49.2;40.344;46.27;2.69;17;23.09.2020;NINA GRAN;NINA GRAN -0034;1;N for Saursaunmyra;Steinkjer;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;;622538.48;7109588.18;20-50;0-50;0.052;93.49;99.46;0.54;49.73;25.8596;43.13;2.31;19;23.09.2020;NINA GRAN;NINA GRAN -0034;2;N for Saursaunmyra;Steinkjer;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;not sure about depth, but somewhere close to this;622538.48;7109588.18;70-90;50-100;0.08;93.2;99.1;0.9;49.55;39.64;47.09;2.15;22;23.09.2020;NINA GRAN;NINA GRAN -0035;1;Saursaunmyra;Steinkjer;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;622683.43;7109390.35;20-50;0-50;0.037;74.17;84.47;15.53;42.23;15.6251;45.9;1.83;25;23.09.2020;NINA GRAN;NINA GRAN -0035;2;Saursaunmyra;Steinkjer;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;622683.43;7109390.35;100-130;100-150;0.031;87.1;97.07;2.93;48.54;15.0474;46.32;1.35;34;23.09.2020;NINA GRAN;NINA GRAN -0035;3;Saursaunmyra;Steinkjer;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;622683.43;7109390.35;200-230;200-250;0.032;89.12;98.08;1.92;49.04;15.6928;48.91;1.34;37;23.09.2020;NINA GRAN;NINA GRAN -H1;1;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555166.65;7031076.86;35-50;0-50;0.08;92;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -H1;2;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555166.65;7031076.86;85-100;50-100;0.12;91;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -H1;3;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555166.65;7031076.86;135-150;100-150;0.15;89;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -H1;4;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555166.65;7031076.86;185-200;150-200;0.11;91;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -H2;1;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555173.62;7031071.95;35-50;0-50;0.02;92.54;99.67;0.33;49.84;9.968;47.31;1.49;32;27.04.2017;NTNU Vitenskapsmuseet;NINA GRAN -H2;2;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555173.62;7031071.95;85-100;50-100;0.103;86.74;99.36;0.64;49.68;51.1704;51.73;1.28;40;27.04.2017;NTNU Vitenskapsmuseet;NINA GRAN -H2;3;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555173.62;7031071.95;135-150;100-150;0.14;86.7;99.16;0.84;49.58;69.412;52.09;1.23;42;27.04.2017;NTNU Vitenskapsmuseet;NINA GRAN -H2;4;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555173.62;7031071.95;185-200;150-200;0.134;88.84;99.56;0.44;49.78;66.7052;51.69;0.92;56;27.04.2017;NTNU Vitenskapsmuseet;NINA GRAN -H3;1;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555150.19;7031056.58;35-50;0-50;0.08;93;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -H3;2;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555150.19;7031056.58;85-100;50-100;0.19;84;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -H3;3;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555150.19;7031056.58;135-150;100-150;0.12;90;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -H3;4;Høstadmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;555150.19;7031056.58;185-200;150-200;0.14;90;;;;0;;;;27.04.2017;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KL1;1;Kinn Lista1;Kinn;Vestland;fen;poor fen;jordvannsmyr;fattigmyr ;fattig tue;V1-C-1;intact;;;320040.12;6831658.61;20-30;0-50;;79.9;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KL1;2;Kinn Lista1;Kinn;Vestland;fen;poor fen;jordvannsmyr;fattigmyr ;fattig tue;V1-C-1;intact;;;320040.12;6831658.61;30-40;0-50;0.17;85.31;89.23;10.77;44.61;75.837;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KL1;3;Kinn Lista1;Kinn;Vestland;fen;poor fen;jordvannsmyr;fattigmyr ;fattig tue;V1-C-1;intact;;;320040.12;6831658.61;70-80;50-100;;87.6;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KL1;4;Kinn Lista1;Kinn;Vestland;fen;poor fen;jordvannsmyr;fattigmyr ;fattig tue;V1-C-1;intact;;;320040.12;6831658.61;80-90;50-100;0.14;90.01;97.29;2.71;48.64;68.096;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KL2;1;Kinn Lista2;Kinn;Vestland;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær bakkemyr, fastmatte;V1-C-2;intact;;;320029.25;6831798.22;20-30;0-50;;89.6;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KL2;2;Kinn Lista2;Kinn;Vestland;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær bakkemyr, fastmatte;V1-C-2;intact;;;320029.25;6831798.22;30-40;0-50;0.18;86.37;83.47;16.53;41.73;75.114;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KL2;3;Kinn Lista2;Kinn;Vestland;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær bakkemyr, fastmatte;V1-C-2;intact;;;320029.25;6831798.22;70-80;50-100;;87.3;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KL2;4;Kinn Lista2;Kinn;Vestland;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær bakkemyr, fastmatte;V1-C-2;intact;;;320029.25;6831798.22;80-90;50-100;0.14;89.66;88.89;11.11;44.44;62.216;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -Klæbu0037;1;V for Dyrbekken;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;;578419.32;7019291.61;20-50;0-50;0.058;86.14;97.71;2.29;48.85;28.333;50.03;2.66;19;07.10.2020;NINA GRAN;NINA GRAN -Klæbu0037;2;V for Dyrbekken;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;;578419.32;7019291.61;100-130;100-150;0.052;87.1;97.74;2.26;48.87;25.4124;49.26;2.43;20;07.10.2020;NINA GRAN;NINA GRAN -Klæbu0037;3;V for Dyrbekken;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V1-C-4;intact;;;578419.32;7019291.61;200-230;200-250;0.042;90.05;98.58;1.42;49.29;20.7018;52.77;1.74;30;07.10.2020;NINA GRAN;NINA GRAN -Klæbu0038;1;V for Dyrbekken;Trondheim;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær;V1-C-2;intact;;;578457.45;7019313.83;20-50;0-50;0.067;92.42;99.69;0.31;49.85;33.3995;52.61;1.53;34;07.10.2020;NINA GRAN;NINA GRAN -Klæbu0038;2;V for Dyrbekken;Trondheim;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr;intermediær;V1-C-2;intact;;;578457.45;7019313.83;100-130;100-150;0.07;91.33;99.43;0.57;49.72;34.804;51.7;2.68;19;07.10.2020;NINA GRAN;NINA GRAN -KM1;1;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292719.69;6825556.48;20-30;0-50;;87.9;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KM1;2;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292719.69;6825556.48;30-40;0-50;0.13;90.38;96.49;3.51;48.25;62.725;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KM1;3;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292719.69;6825556.48;70-80;50-100;;89.2;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KM1;4;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292719.69;6825556.48;80-90;50-100;0.1;92.45;93.44;6.56;46.72;46.72;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KM2;1;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292768.39;6825534.14;20-30;0-50;;88.2;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KM2;2;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292768.39;6825534.14;30-40;0-50;0.05;91.9;98.5;1.5;49.25;24.625;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KM2;3;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292768.39;6825534.14;70-80;50-100;;89.8;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KM2;4;Kinn Marøy;Kinn;Vestland;bog;oceanic bog;nedbørsmyr;oseanisk nedbørsmyr;oseanisk nedbørsmyr;V3-C-1;intact;;;292768.39;6825534.14;80-90;50-100;0.09;91.92;93.39;6.61;46.69;42.021;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;1;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;20-30;0-50;;87.1;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;3;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;70-80;50-100;;84.1;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;4;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;80-90;50-100;0.14;89.57;92.95;7.05;46.48;65.072;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;5;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;120-130;100-150;;89.5;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;6;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;130-140;100-150;0.12;90.97;89.47;10.53;44.74;53.688;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;7;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;170-180;150-200;;91.8;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;8;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;180-190;150-200;0.13;91.46;92.07;7.93;46.03;59.839;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;9;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;220-230;200-250;;91.8;;;;0;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -KR;10;Kinn rikmyr;Kinn;Vestland;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;292396.22;6822913.41;230-240;200-250;0.09;93.55;95.63;4.37;47.82;43.038;;;;18.08.2021;NTNU Vitenskapsmuseet;NTNU Vitenskapsmuseet -MI1;1;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650291.49;6649282.06;6-17;0-50;0.173;91.35;99.75;0.25;49.87;86.2751;44.74;1.54;29;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -MI1;2;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650291.49;6649282.06;30-40;0-50;0.211;87.78;99.6;0.4;49.8;105.078;47.91;0.88;54;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -MI1;3;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650291.49;6649282.06;130-140;1001-50;0.07;94.78;99.97;0.03;49.98;34.986;47.1;1.53;31;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -MI2;1;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650344.03;6649293.79;10-20;0-50;0.032;95.69;99.87;0.13;49.93;15.9776;44.44;1.55;29;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -MI2;2;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650344.03;6649293.79;60-70;50-100;0.097;93.78;99.79;0.21;49.89;48.3933;46.38;1.62;29;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -MI2;3;Midtfjellmåsan;Aurskog-Høland;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;650344.03;6649293.79;135-145;100-150;0.039;94.88;99.98;0.02;49.99;19.4961;45.25;1.56;29;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -Ringvål0039;1;Rørmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;564694.52;7026414.33;20-50;0-50;0.05;89.58;98.1;1.9;49.05;24.525;42.03;3.06;14;07.10.2020;NINA GRAN;NINA GRAN -Ringvål0039;2;Rørmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;564694.52;7026414.33;100-130;100-150;0.036;87.34;96.39;3.61;48.2;17.352;48.68;1.11;44;07.10.2020;NINA GRAN;NINA GRAN -Ringvål0039;3;Rørmyra;Trondheim;Trøndelag;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;564694.52;7026414.33;200-230;200-250;0.038;90.74;98.47;1.53;49.23;18.7074;52.64;1.42;37;07.10.2020;NINA GRAN;NINA GRAN -Ringvål0040;1;Rørmyra;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;564655.29;7026647.81;20-50;0-50;0.052;89.93;98.76;1.24;49.38;25.6776;45.73;1.95;23;07.10.2020;NINA GRAN;NINA GRAN -Ringvål0040;2;Rørmyra;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;564655.29;7026647.81;100-130;100-150;0.066;89.03;98.81;1.19;49.41;32.6106;47.36;2.59;18;07.10.2020;NINA GRAN;NINA GRAN -Ringvål0040;3;Rørmyra;Trondheim;Trøndelag;fen;rich fen;jordvannsmyr;rikmyr;rikmyr;V3-C-4;intact;;;564655.29;7026647.81;200-230;200-250;0.047;88.65;98.44;1.56;49.22;23.1334;46.84;2.1;22;07.10.2020;NINA GRAN;NINA GRAN -Ringvål0041;1;Rørmyra;Trondheim;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;564610.88;7026566.01;20-50;0-50;0.052;88.31;99.39;0.61;49.7;25.844;47.57;1.4;34;07.10.2020;NINA GRAN;NINA GRAN -Ringvål0041;2;Rørmyra;Trondheim;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;564610.88;7026566.01;100-130;100-150;0.055;88.66;99.13;0.87;49.56;27.258;51.06;1.43;36;07.10.2020;NINA GRAN;NINA GRAN -SI1;1;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651930.81;6662483.69;9-18;0-50;0.229;87.02;98.34;1.66;49.17;112.5993;46.18;1.49;31;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -SI1;2;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651930.81;6662483.69;30-45;0-50;0.099;91.36;98.98;1.02;49.49;48.9951;46.76;1.75;27;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -SI1;3;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651930.81;6662483.69;130-140;100-150;0.082;94.94;99.81;0.19;49.9;40.918;46.14;0.93;50;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -SI2;1;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651911.64;6662436.52;5-10;0-50;0.103;93.96;99.68;0.32;49.84;51.3352;43.47;1.63;27;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -SI2;2;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651911.64;6662436.52;30-40;0-50;0.176;88.93;99.68;0.32;49.84;87.7184;47.68;1.28;37;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -SI2;3;Sakkhusmåsan;Nes;Viken;bog;raised bog;nedbørsmyr;høgmyr;høgmyr;V3-C-1;intact;;;651911.64;6662436.52;130-140;100-150;0.03;93.83;99.65;0.35;49.82;14.946;46.36;1.02;46;12.08.2020;NTNU Vitenskapsmuseet;NINA GRAN -Tydal0018;1;Setermyra;Tydal;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;636502.33;6991873.93;20-50;0-50;0.18;85.43;97.49;2.51;48.75;87.75;49.4;1.61;31;09.09.2020;NINA GRAN;NINA GRAN -Tydal0018;2;Setermyra;Tydal;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;636502.33;6991873.93;100-130;100-150;0.14;89.88;99.13;0.87;49.56;69.384;49.08;2.11;23;09.09.2020;NINA GRAN;NINA GRAN -Tydal0018;3;Setermyra;Tydal;Trøndelag;fen;poor fen;jordvannsmyr;fattigmyr ;fattig fastmatte;V1-C-1;intact;;;636502.33;6991873.93;175-205;150-200;0.12;90.79;99.13;0.87;49.57;59.484;48.8;2.56;19;09.09.2020;NINA GRAN;NINA GRAN -Tydal0019;1;Setermyra;Tydal;Trøndelag;fen;intermediate fen;jordvannsmyr;intermediær myr ;intermediær fastmatte;V1-C-2;intact;;;636450.18;6991843.19;30-60;0-50;0.13;91.38;99.21;0.79;49.6;64.48;47.8;2.43;20;09.09.2020;NINA GRAN;NINA GRAN -Tydal0021;1;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof tue, hellende myr;V3-C-1;intact;;;636359.99;6993378.29;20-50;0-50;0.21;80.9;97.6;2.4;48.8;102.48;50.52;1.23;41;09.09.2020;NINA GRAN;NINA GRAN -Tydal0021;3;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof tue, hellende myr;V3-C-1;intact;;;636359.99;6993378.29;100-130;100-150;0.11;90.04;99.61;0.39;49.81;54.791;49.06;0.97;51;09.09.2020;NINA GRAN;NINA GRAN -Tydal0021;4;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr;ombrotrof tue, hellende myr;V3-C-1;intact;;;636359.99;6993378.29;150-180;150-200;0.12;86.82;99.56;0.44;49.78;59.736;47.9;1.16;41;09.09.2020;NINA GRAN;NINA GRAN -Tydal51;2;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr ;ombrotrof tue;V3-C-1;intact;;;636449.53;6991971.31;100-130;100-150;0.11;90.31;98.58;1.42;49.29;54.219;47.48;0.85;56;09.09.2020;NINA GRAN;NINA GRAN -Tydal51;3;Setermyra;Tydal;Trøndelag;bog;bog;nedbørsmyr;nedbørsmyr ;ombrotrof tue;V3-C-1;intact;;;636449.53;6991971.31;200-230;200-250;0.19;82.46;92.21;7.79;46.1;87.59;47.23;0.76;62;09.09.2020;NINA GRAN;NINA GRAN -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/test_dataset.zip b/test_dataset.zip deleted file mode 100644 index bcd7a8d0e6668cb9b43f5297b0b63dda5006a90e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4518 zcmb7H2UJtrwhakYLg*5ZDoqH|q(z!^BucN+d#F+(AV_Z}6cOnn9RXx_N&Ipd5m=UQ{@v&Nd52oOFE;4~;z?DfAt{LhUHzzRUw zdZNs2EK!!8wkQETT`~aCr8Pnuxs!Fe-|`^^;Nd@i5C+EI!UF&_ze5oNhykWS9RCaD zdGdwjSE%o}o=8hKTRR75TYeiWyYJxV6RWIGm(uG01Gg@-v$3?Xu#o6@dLIuIc1bYL z_HmO>0IPfmiyoTWgyBWKpL&3{Rcrxi+!A<(D9ea)Wg0rgu>K$|Io4EGaRPfml=6jC zIgkdrOrHfTti^loQMFjl;JSPee5#Q$u{+NFv z;c4A}ugHTxP{hr{@pp>Y-qUhwWu*x}j_T9S5xedWj_J`(GK}^&B0gV)2)AgeU0v@( z368AE;37R6Jjr+Y_Llm+g02qmD(>o<+LTV%+0!(W1#!-PTyD<~pa(>mm@PwS0;_fo zTky*<#K%aIAj$Yu%1$woSE$BjhX^5Ml4U=ivwA%<=)rTd4J&RS!BGzBdXdEF$R6mI z7hx4HYJzP%IVePjbeF~oD{KOF#dkGHW0o%0ah8b5j{N-nsCv72G=%XBjr8MWi*aI$ zw326Mzgee^Mt)%O-64NXP+m~gY*y+8805}j+O`?iB6kYx)=~2&Zz_g}-7$%oS;zQE z-q`(o(K<-nSC0x6*y5HQ-&b#+TEpjmyy}rs3$v9L{a`7PQyfW+LeEhd~ zB~`E7hveT+)+83m5_od5PAmHRTAfe6{_bD%MEd+;t=<2mRw$nPX;wtUpz>iI_(>k8 zx%^+2;Gdd{H5~xJ0r;i4{JYcGx}lJs=AM==ZqBxz{MMdc-&4JC(rW}y*6IFB&(TY{ z8qX;XQQWo(@z<}J$43LD zkyQm`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DTN8$Tx;0 z7vc`?pe-vZTRB)$*KC2%#*A9uGe8`1n!vPRn1%VU?14O`s#9JG-MgVzBwdX40{$<* z5N>!~E4TQle6SSPH*F}!47#SyPHPKCE#ep|dz&j174E!^y-Gz4X;|jfJ5L+oO4GN! zmLgW{GW-etGW!CwwF`PBAc#k~CBEzHD5d<4;y|qyOm1>w-+jWnC~>qpEtPod&b~AJ za;Q)pCTR=cR#+eLaw&6@>bBDKYY*YbS{O#zI(wTdc}%k^ zG%!gwi?)v)sz1eqJP%2TP2Cn|6i%4~oGpF>4}^8OC7(E{ectx zmF#Du@>jAq!2eG62S)5yvY-9NU&(4fza#st6Z)C#)WZCHR8B3-kH`x)#s51pn}2L* VG!X=Zr>KM{SMZ5i Date: Thu, 25 Apr 2024 19:08:40 +0200 Subject: [PATCH 06/17] language: update no-en translations --- appScripts/server.R | 12 ++++++------ translation.json | 28 +++++++++++++++++++++------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/appScripts/server.R b/appScripts/server.R index 34d5bc6..afcacd8 100755 --- a/appScripts/server.R +++ b/appScripts/server.R @@ -464,13 +464,13 @@ server <- function(input, output, session){ st_crs(b1_peat_depth) <- 25833 print(b1_peat_depth) interp_map <- tm_shape(b1_peat_depth) + - tm_raster(title = i18n$t("Dybde")) + + tm_raster(title = i18n$t("Torvdybde (cm)")) + tm_compass() + tm_scale_bar() + tm_layout(title= i18n$t("Kart med interpolerte torvdybder (cm)"), legend.outside=T) - tmap_save(interp_map, "kart_torvdybder.png") + tmap_save(interp_map, i18n$t("kart_torvdybder.png")) }) @@ -484,13 +484,13 @@ server <- function(input, output, session){ tm_scale_bar()+ tm_layout(title= i18n$t("Kart over omrÃ¥det"), legend.outside=T) - tmap_save(d_map, "kart_over_omradet.png") + tmap_save(d_map, i18n$t("kart_over_omradet.png")) }) # Write the raster write_raster <- reactive({ - write_stars(df_reactive$interpolation_raster, "raster_interpolerte_torvdybder.tif") + write_stars(df_reactive$interpolation_raster, i18n$t("raster_interpolerte_torvdybder.tif")) }) result_csv <- reactive({ @@ -508,7 +508,7 @@ server <- function(input, output, session){ results <- rbind(results, area, c_stock_mean, c_stock_sd) } - write.csv(results, "carbonviewer_resultater.csv") + write.csv(results, i18n$t("carbonviewer_resultater.csv")) }) @@ -527,7 +527,7 @@ server <- function(input, output, session){ results <- rbind(results, area, c_stock_mean, c_stock_sd) } - write.table(results, "carbonviewer_resultater.txt", quote = FALSE, sep = "\t", row.names = FALSE) + write.table(results, i18n$t("carbonviewer_resultater.txt"), quote = FALSE, sep = "\t", row.names = FALSE) }) diff --git a/translation.json b/translation.json index f79b01d..9c90e26 100755 --- a/translation.json +++ b/translation.json @@ -4,14 +4,19 @@ "translation": [ {"no": "Volumberegning","en": "Volume calculation"}, {"no": "Last opp en zip-fil", "en": "Upload a zip file"}, - {"no": "Last inn datasett", "en": "Load dataset"}, + {"no": "Last opp data", "en": "Upload data"}, + {"no": "Søk", "en": "Ingen fil er valgt"}, + {"no": "Beregn", "en": "Calculate"}, + {"no": "Beregn med testdata", "en": "Calculate with test data"}, + {"no": "Beregn karboninnhold", "en": "Carbon content calculation"}, + {"no": "Beregn volume", "en": "Volume calculation"}, + {"no": "torvdybde_cm", "en": "peat_depth_cm"}, {"no": "Skift sprÃ¥k", "en": "Change language"}, - {"no": "Resultater", "en": "Results"}, + {"no": "Kart resultater", "en": "Map results"}, {"no": "Om oss", "en": "ABOUT"}, {"no": "Last ned resultater", "en": "Download results"}, {"no": "Areal", "en": "Area"}, {"no": "Volum", "en": "Volume"}, - {"no": "Beregn volum", "en": "Calculate volume"}, {"no": "Torvegenskaper", "en": "Peat properties"}, {"no": "Standardverdier", "en": "Default values"}, {"no": "Egendefinerte verdier", "en": "Custom values"}, @@ -25,16 +30,25 @@ {"no": "Hovedmyrtype", "en": "General peatland type"}, {"no": "Myrtype", "en": "Specific peatland type"}, {"no": "Kart over omrÃ¥det", "en": "Map of the area"}, - {"no": "Kart med interpolerte torvdybder", "en": "Map of interpolated peat depths"}, - {"no": "Dybde", "en": "Depth"}, + {"no": "Kart med interpolerte torvdybder (cm)", "en": "Map of interpolated peat depths (cm)"}, + {"no": "Torvdybde (cm)", "en": "Peat depth (cm)"}, {"no": "Bruksanvisning", "en": "Instructions"}, + {"no": "carbonviewer-resultater-", "en": "carbonviewer-results-"}, + {"no":"kart_torvdybder.png", "en": "map_peat_depths.png"}, + {"no": "raster_interpolerte_torvdybder.tif", "en": "raster_interpolated_peat_depths.tif"}, + {"no": "kart_over_omradet.png", "en": "map_study_area.png"}, + {"no": "carbonviewer_resultater.csv" , "en": "carbonviewer_results.csv"}, + {"no": "carbonviewer_resultater.txt", "en": "carbonviewer_results.txt"}, {"no": "Last verdier", "en": "Load values"}, {"no": "Nullstille", "en": "Reset"}, - {"no": "Valg av power", "en": "Power setting"}, + {"no": "Power evalueringsgrafer", "en": "Power evaluation graphs"}, {"no": "Power verdi", "en": "Power value"}, {"no": "Tonn", "en": "Tons"}, - {"no": "Prøv app med testdatasett", "en": "Try app with test dataset"}, {"no": "Kraftparameteren er satt til sin optimale verdi og brukes til Ã¥ beregne bÃ¥de volumet av torv og mengden karbon som finnes i omrÃ¥det. Likevel er det mulig Ã¥ endre den for Ã¥ passe bedre ens formÃ¥l.", "en": "The power parameter is set at its optimal value and is used to compute both the volume of peat and the amount of carbon contained in the area. Nevertheless, it is possible to change it to better fit one's purpose."} ] } + + + + From 6aa1dd3e97d957f40bef97338624cb8ed36c89a8 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Thu, 25 Apr 2024 19:09:36 +0200 Subject: [PATCH 07/17] move: exploration.R appScripts -> Rscripts --- Rscripts/exploration.R | 85 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 Rscripts/exploration.R diff --git a/Rscripts/exploration.R b/Rscripts/exploration.R new file mode 100755 index 0000000..36a82ec --- /dev/null +++ b/Rscripts/exploration.R @@ -0,0 +1,85 @@ +library(tidyverse) +library(data.table) +library(gstat) + +# Define file paths +shapefile_path <- "/home/rstudio/app/data_exple/test_dataset/test_shapefile.shp" +csv_path <- "/home/rstudio/app/data_exple/test_dataset/test_depths_samples.csv" + +# Read shapefile and convert to simple features object +shp <- rgdal::readOGR(shapefile_path) %>% + sf::st_as_sf() + +input_crs = st_crs(shp) +target_crs = 25833 + +# Read CSV data +df <- open_csv(csv_path) + +# Transform CSV data to spatial format and set its CRS to match the shapefile +dfs <- transform_to_sf(df) %>% + sf::st_set_crs(sf::st_crs(input_crs)) + +# Transform both datasets to the target CRS +dfs <- dfs %>% sf::st_transform(target_crs) +shp <- shp %>% sf::st_transform(target_crs) + +myGrid <- starsExtra::make_grid(shp, 1) +myGrid <- sf::st_crop(myGrid, shp) + +powerRange <- 1:6 +nmax <- 20 +temp <- data.frame(power = powerRange, MAE = rep(NA, length(powerRange))) +vol <- numeric() + +# Calc. the Volume for kriging and IDW with different power values +# Cross-validation used to calc. MAE and optimal power value +# Optimal power value is used to calc the volume + + +# Final interpolation and volume calc using optimal power value +for(i in 2){ + + # Get the MAE + temp2 <- gstat::krige.cv(torvdybde_cm ~ 1, dfs, set = list(idp=i), nmax = nmax) + temp$MAE[temp$power==i] <- mean(abs(temp2$residual)) + + # Get the volume in cm3 + vol_temp <- gstat::idw(torvdybde_cm ~ 1, dfs, + newdata=myGrid, + nmax=nmax, + idp=i) + # vol in m3 + vol <- c(vol, sum(vol_temp$var1.pred, na.rm=T)) + vol_m3 <- vol/100 + +} + +idwe <- gstat::idw(formula = torvdybde_cm ~ 1, + locations = dfs, + newdata = myGrid, + idp=4, + nmax = nmax) + + +idwe_r <- as(idwe, "Raster") + +library(leafem) + +pal = colorNumeric(palette = "magma", + values(idwe_r), na.color = "transparent", + reverse = TRUE) + +leaflet() %>% addTiles() %>% + addStarsImage(idwe, colors = pal) %>% + addLegend(pal = pal, values = values(idwe_r), + title = "Torvdybde (cm)") %>% + #addControl("title", position = "topleft", className="map-title") + +leaflet() %>% addTiles() %>% + addRasterImage(idwe_r, colors = pal) #%>% + #addLegend(pal = pal, values = values(idwe_r), + # title = "torvdybde_cm") %>% + #addControl(title, position = "topleft", className="map-title") + + From 99ca901dd7c9a293b972812bb932d904ced027b2 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Thu, 25 Apr 2024 19:11:27 +0200 Subject: [PATCH 08/17] config: autoreload - autoreload still not possible from vscode, you must run rshiny from rstudio --- app.R | 2 ++ docker-compose.yaml | 20 ++++++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/app.R b/app.R index 53eea7b..4ecb63a 100755 --- a/app.R +++ b/app.R @@ -8,6 +8,8 @@ source("/home/rstudio/app/appScripts/server.R") options(shiny.maxRequestSize=100*1024^2) options(warn = -1) +options(shiny.autoreload=TRUE) + app <- shinyApp(ui = ui, server = server) sessionInfo() runApp(app, host ="0.0.0.0", port = 8999, launch.browser = TRUE) diff --git a/docker-compose.yaml b/docker-compose.yaml index a745201..3e46876 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,18 +1,14 @@ -version: '3' services: - rstudio: - image: carbonviewer-rstudio + shiny: + image: carbonviewer + build: . ports: - 8787:8787 + - 8999:8999 volumes: - - ${PWD}/:/home/rstudio/app - ${HOME}/Downloads:/home/willeke.acampo/Downloads + - ./app.R:/home/rstudio/app/app.R + - ./appScripts:/home/rstudio/app/appScripts + - ./translation.json:/home/rstudio/app/translation.json environment: - - DISABLE_AUTH=true - - shiny: - image: carbonviewer-shiny - ports: - - 8999:8999 - volumes: - - ${HOME}/Downloads:/home/willeke.acampo/Downloads \ No newline at end of file + - DISABLE_AUTH=true \ No newline at end of file From 089494a5eedef91981a59a65047360affe6a5d33 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Thu, 25 Apr 2024 19:13:15 +0200 Subject: [PATCH 09/17] docs: add changelog.md --- docs/changelog.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/changelog.md diff --git a/docs/changelog.md b/docs/changelog.md new file mode 100644 index 0000000..7093a19 --- /dev/null +++ b/docs/changelog.md @@ -0,0 +1,36 @@ +# Changelog + +## [Unreleased] + +**Added** +- export to .txt file + +**Changed** +- peat depth unit changed from m to cm + - updated the columns of the input data + - `torvdybde_cm` instead of `Dybde` + - `peat_depth_cm` instead of `Dybde` + - updated the calculations to still calc. volume in m3 +- allow for input data with different coord. systems. + - all coordinates are transformed to `ETRS89 UTM zone 33N` (EPSG:25833). + - update default to `ETRS89 UTM zone 33N` (EPSG:25833) +- new order UI-elements in the sidebar +- updated documentation and inline comments + +**Removed** +- empty mapframe in the output interpolation map is deleted. + +## Version 1.0.0 (2023-16-01) + +*Official release* + +**Added** +- visulization of the power parameter + +**Changed** +- better error handling +- improved peat depth interpolation + +## Version 0.1.0-alpha (2022-10-25) + +*Pre-release* \ No newline at end of file From 92ed242961794713f4fae656839528ca3d5d6bbc Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Thu, 25 Apr 2024 19:13:50 +0200 Subject: [PATCH 10/17] update gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 2df7b54..63e4984 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +# R .Rproj.user .Rhistory .RData @@ -5,3 +6,7 @@ data_exple/ docker_run_rstudio.sh rstudio-prefs.json + +# ignore base session data files +data/* +!data/gran_dataset.csv \ No newline at end of file From 0d5930eec980122203491f39b4ae89a302b198e4 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Thu, 25 Apr 2024 19:21:25 +0200 Subject: [PATCH 11/17] docs: add project_structure.md --- docs/project_structure.md | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 docs/project_structure.md diff --git a/docs/project_structure.md b/docs/project_structure.md new file mode 100644 index 0000000..3668d38 --- /dev/null +++ b/docs/project_structure.md @@ -0,0 +1,43 @@ +``` +\carbonviewer +├── .github + ├── workflows + deploy.yml # Github action for deployment +├── appScripts + ├── custom_theme.R # Custom theme for the app + ├── dependancies.R # Required packages and translation object (i18n) + ├── global.R # Global variables + ├── server.R # Server side of the app + ├── ui.R # User interface of the app +├── data # Data folder + ├── gran_dataset.zip # gran dataset with peat properties for norwegian mires +├── docs + ├── changelog.md # Changelog for the app + ├── project_structure.md # Project structure + ├── instructions.md # instructions for the app (main body app) +├── man + ├── figures # Figures for the documentation + ├── interpolation + ├── ln.png + ├── logo_nina.png + ├── ntnu.png + ├── statnett.png +├── Rscripts + ├── exploration.R # IDW interpolation (stand-alone) +├── test # Test data + ├── csv_only.zip + ├── invalid_csv.zip + ├── invalid_shp.zip + ├── shp_no_proj_file.zip + ├── test_dataset_cm.zip +├── .gitignore # Files to ignore +├── app.R # Main file for the app: runApp('/home/rstudio/app') +├── carbonviewer.Rproj # R project file +├── docker-compose.yaml # Docker compose file for the app +├── Dockerfile # Dockerfile for the app +├── LICENSE # License for the app +├── README.md # Readme file for the app (exact same as instructions.md) +├── rstudio-prefs.json # Rstudio preferences +├── translation.json # Language translation dictionairy for the app read into +``` + From d02427bb6e6a7f600d2f6ec825420c770cfaab1c Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Wed, 8 May 2024 12:48:02 +0200 Subject: [PATCH 12/17] docs: separate no and en instructions - update server/ui to update page based on language - new english instruction text --- appScripts/server.R | 14 ++++ appScripts/ui.R | 2 +- docs/instructions_en.md | 135 ++++++++++++++++++++++++++++++++++++++ docs/instructions_no.md | 80 ++++++++++++++++++++++ docs/project_structure.md | 13 ++++ 5 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 docs/instructions_en.md create mode 100755 docs/instructions_no.md diff --git a/appScripts/server.R b/appScripts/server.R index afcacd8..90df5ae 100755 --- a/appScripts/server.R +++ b/appScripts/server.R @@ -18,6 +18,20 @@ server <- function(input, output, session){ observeEvent(input$selected_language, { shiny.i18n::update_lang(input$selected_language, session) }) + + # if language is no select instructions_no.md otherwise instructions_en.md + output$instructions <- renderUI({ + req(input$selected_language) + if (input$selected_language == "no"){ + includeMarkdown("/home/rstudio/app/docs/instructions_no.md") + } + else{ + includeMarkdown("/home/rstudio/app/docs/instructions_en.md") + } + }) + + + ####################### # PREPARE THE DATASET # diff --git a/appScripts/ui.R b/appScripts/ui.R index 2820d00..b4e20aa 100755 --- a/appScripts/ui.R +++ b/appScripts/ui.R @@ -104,7 +104,7 @@ body <- shinydashboard::dashboardBody( tabItem( tabName = "instruction", fluidRow( - box(includeMarkdown("/home/rstudio/app/instructions.md"), width = 10) + box(uiOutput("instructions"), width = 10) ) ), diff --git a/docs/instructions_en.md b/docs/instructions_en.md new file mode 100644 index 0000000..ae42976 --- /dev/null +++ b/docs/instructions_en.md @@ -0,0 +1,135 @@ +

CarbonViewer

+

A calculator for peatland volume and carbon stock to support area planners and decision makers.

+ +![CC BY-NC-SA 4.0][license-badge] +[![DOI](https://zenodo.org/badge/554694482.svg)](https://zenodo.org/badge/latestdoi/554694482) + +[license-badge]: https://badgen.net/badge/License/CC-BY-NC-SA%204.0/green + +**NOTE**: The application supports both the English and Norwegian language. To change the language, click on the `Change language` box and choose `en` for English or `no` for Norwegian. + +--- + +## What is the CarbonViewer? + +**CarbonViewer** is a [R Shiny](https://shiny.rstudio.com/) application designed to calculate and visualize the amount of carbon stored in a given peatland area. +The application estimates the total carbon content in the peat body, which can be used to evaluate the soil carbon storage at any given peatland site and the potential impact land-use change can have on CO2 emission. As development in peatland areas may give cause to high greenhouse gas emissions, the aim of this application is to support area planners with an improved knowledge base of the soil carbon in potentially impacted areas. The application should be applied during early planning phases as a tool to map soil carbon stocks in peatlands, to avoid, reduce or mitigate the impact of development in peatlands areas. + +## How to use the CarbonViewer? + + +### 1. Import Data + +Upload a zip-file containing a shapefile of the study area and a csv-file with peat depth measurements in cm. Ensure that the X and Y coordinates in the csv-file match the coordinate system of the shapefile. All coordinate systems are supported, but note that the application converts the data to ETRS89 UTM Zone 33N for the calculations. + +**Folder structure:** + +| | | +| --- | --- | +| └── study_area.zip | | +|          â”œâ”€â”€ study_area.shp | | +|          â”œâ”€â”€ study_area.shx | | +|          â”œâ”€â”€ study_area.dbf | | +|          â”œâ”€â”€ study_area.prj | | +|          â””── peat_depth_measurements.csv | | + +
+ +**Example of the .csv file:** + +|     X     |     Y     | peat_depth_cm | +|:-----------------------------:|:-----------------------------:|:-------------:| +| X1 | Y1 | 120 | +| X2 | Y2 | 120 | +| X3 | Y3 | 270 | +| X4 | Y4 | 270 | +| X5 | Y5 | 320 | + +
+ +***User Action:** Click on Upload Data. Drag and drop or browse for the zip-file containing the shapefile and csv-file. The shapefile must include the following files: .shp, .shx, .dbf, and .prj. The csv-file must include the following columns: X, Y, and peat_depth_cm.* + +### 2. Calculate Peat Volume + +The total volume of peat in the study area is calculated by interpolating the peat depth measurements using Inverse Distance Weighting (IDW) (see [Peat Depth Interpolation](#peat-depth-interpolation)). **Note that a test dataset is provided to test the calculations: “Calculate with testdataâ€.** + +This step results in: +- A map with points representing the location of the peat depth measurements in the field *(see Map results tab).* +- A map displaying a raster (*1x1 m*) with the interpolated peat depths *(see Map results tab).* +- A value for the study area (*m2*) and the total volume of peat (*m3*) in the study area *(see Map results tab).* +- Graphs showing the influence of the power parameter on the interpolation results *(see Power evaluation graphs tab).* + +***User Action:** Click on Load dataset. Wait for the progress bar to finish. View the results in the Map results and Power evaluation graphs tabs. **Optional**: Customize the Power parameter in the Map Results tab.* + +### 3. Calculate the Carbon Content + +The **Total Carbon Content** is calculated by multiplying the Soil Organic Carbon (SOC) with the total volume of peat in the study area. The SOC is calculated using the peat properties Bulk Density (BD), Soil Organic Matter (SOM), and the Carbon content fraction (see [Carbon Content Caluclation](#carbon-content-calculation)). The application allows the user to either choose **default** values for the peat properties or **customize** the values. The **default** values are based on a [Database](https://github.com/NINAnor/carbonviewer/blob/main/data/gran_dataset.csv) of peat properties from Norwegian mires, and a set value of 0.5 for the fraction of carbon content in organic matter. If the user chooses to **customize** the values, it is required to know the values of bulk density (in g/cm3 or tonne/m3, commonly less than 0.2 for peatlands), organic matter fraction and carbon content fraction for the study area. + +This step results in a value for the **mean** and **standard deviation** of the total carbon content in the study area *(tonns C)* displayed in the Map results tab. + +***User Action:** Click on Carbon content calculation. Choose between Default values or Custom values for the peat properties. Click on Load values. View the results in the Map results tab.* + +- *Default values: Choose the peatland type of the area. Click on Load values.* +- *Custom values: Insert the values of Bulk Density (in g/cm3 or tonne/m3), Soil Organic Matter fraction (values of 0-1), and the fraction of carbon content in organic matter (values of 0-1) in the given area. Click on Load values.* + +### 4. Export Results + +The results of the volume and carbon calculations can be exported as a zip-file. + +The zip-file contains the following files: + +| | | +| --- | --- | +| └── carbonviewer-results-date.zip | | +|          â”œâ”€â”€ carbonviewer_results.csv |         *a csv-file with results from the volume and carbon calculations.* | +|          â”œâ”€â”€ carbonviewer_results.txt|         *a txt-file with results from the volume and carbon calculations.*| +|          â”œâ”€â”€ map_study_area.png |         *a map of the given area including peat depth measurement points.* | +|          â”œâ”€â”€ map_peat_depths.png |         *a map with interpolated values of peat depths.* | +|          â””── raster_interpolated_peat_depths.tif |         *a raster with interpolated values of peat depths.*| + +
+ +***User Action:** Click on Download results > Download.* + +--- + +## Overview of Methods + +A brief overview of the methods used in the application is provided below. For a more detailed description, please refer to Kyrkjeeide, M. O. et al. (2023). + +### Peat Depth Interpolation +The peat depth measurements from field survey (*csv-file*) are extrapolated to the entire study area extent (*shp-file*) using Inverse Distance Weighting (IDW). IDW assumes that nearby observations are more alike than those further away. For instance, a peat measurement taken at a 10 *m* distance has a greater influence on the estimated value of a raster pixel cell than a measurement taken at a 50 *m* distance. The degree of this influence is controlled by the power parameter. A power of 1 assigns an equal weight to all points, resulting in a smoother interpolated raster. Increasing the power value reduces the influence of distant sample points on the estimated value. + +**Optimal value of the Power parameter:** + +The application identifies the optimal power parameter using a cross-validation approach, comparing the results of an IDW interpolation method with those of a Kriging interpolation method. The power parameter is varied between 1 and 6, and the Mean Absolute Error (MAE) is calculated for each value. The power parameter with the lowest MAE is chosen as the default value. You can also choose to use a custom value for the power parameter by sliding the bar in the "Map Result" Section. The influence of the power on the results is shown in the graphs located in "Power Evaluation Graphs" section. + +### Carbon Content Calculation + +The **Total Carbon Content (TCC)** of the study area is calculated by multiplying the SOC with the total volume of peat in the study area, where the SOC is calculated using the peat properties Bulk Density (BD), Soil Organic Matter (SOM), and the SOM:SOC conversion factor. + +TCC = SOC * v + +where: +- **SOC** = BD * SOM * 0.5 +- **v** = peat volume (m3) calculated by the interpolation of peat depth measurements +- **BD** = dry Bulk Density (t m−3 or g cm−3) +- **SOM** = Soil Organic Matter fraction +- **0.5** = SOM:SOC conversion factor, value can range from 0 to 1, but the default value is set to 0.5 + +The peat volume of the study area is calculated by the interpolation of the peat depth measurements (Step 2). The other peat properties, **Bulk Density**, **Soil Organic Mattter fraction**, and the SOM:SOC conversion factor, are either set to default values or can be customized by the user (Step 3). + +--- + +### Author + +The application has been created by [Benjamin Cretois](https://www.nina.no/english/Contact/Employees/Employee-info?AnsattID=15849), [Marte Fandrem](https://www.ntnu.no/ansatte/marte.fandrem) and [Magni Olsen Kyrkjeeide](https://www.nina.no/Kontakt/Ansatte/Ansattinformasjon.aspx?AnsattID=12110). This project was funded by Norwegian Research Council under Grant number 282327 and Statnett. + +drawing +drawing +drawing + + +### How to cite us: + +Kyrkjeeide, M. O., Fandrem, M., Kolstad, A. L., Bartlett, J., Cretois, B., & Silvennoinen, H. M. (2023). A calculator for local peatland volume and carbon stock to support area planners and decision makers. Carbon Management, 14(1), 2267018. \ No newline at end of file diff --git a/docs/instructions_no.md b/docs/instructions_no.md new file mode 100755 index 0000000..2681670 --- /dev/null +++ b/docs/instructions_no.md @@ -0,0 +1,80 @@ +

CarbonViewer

+

A calculator for peatland volume and carbon stock to support area planners and decision makers.

+ +![CC BY-NC-SA 4.0][license-badge] +[![DOI](https://zenodo.org/badge/554694482.svg)](https://zenodo.org/badge/latestdoi/554694482) + +[license-badge]: https://badgen.net/badge/License/CC-BY-NC-SA%204.0/green + +**NOTE**: The application supports both the English and Norwegian language. To change the language, click on the `Change language` box and choose `en` for English or `no` for Norwegian. + +--- + +## Hva er CarbonViewer + +**CarbonViewer** er en [R Shiny](https://shiny.rstudio.com/)-applikasjon som beregner og visualiserer karbonmengde i torvlaget for et gitt areal av myr-naturtyper. Kalkulatoren estimerer det totale karboninnholdet bundet opp i organisk jord som kan frigjøres som atmosfærisk karbondioksid (CO2) dersom arealet blir påvirket. Utbygging i myr kan gi høye klimagassutslipp og formålet med kalkulatoren er å gi beslutningstakere et bedre kunnskapsgrunnlag om karbonet som er bundet opp i torv. Kalkulatoren bør brukes i tidlig planlegging og som et verktøy for å kartlegge jordbundet karbon i myr. Dette for å unngå utbygging i karbonrike områder og minimere klimagassutslipp fra naturinngrep. + +## Hvordan bruker jeg denne applikasjonen? + +**Merk at et testdatasett er gitt og det er mulig å laste det inn i applikasjonen ved å klikke på "Test app med testdatasett"** + +### Lage kartene + +**Etter å ha fulgt alle trinnene beskrevet nedenfor, klikk på fanen `Resultater` for å visualisere resultatene** + +- I menyen 'volumberegning' må brukeren laste opp en 'zip'-fil som inneholder både en 'shapefil' som avgrenser det aktuelle området og en 'csv'-fil med torvdybder (m), samt koordinater (gitt i UTM 32 N, EPSG:25832) for hvert prøvepunkt tatt i det aktuelle området. En mål for notering av torvdybder vises nedenfor. Torvdybder bør- for best mulig resultat - bli tatt med regelmessige intervaller med maksimum avstand på 20m mellom hvert punkt (for mindre myrarealer bør en avstand på mindre enn 20m benyttes). + +**Riktig mål for .csv filen** + +
+ + +| X       | Y       | Dybde | +|---------|----------|--------------| +| X1 | Y1 | 1.2 | +| X2 | Y2 | 1.2 | +| X3 | Y3 | 2.7 | +| X4 | Y4 | 2.7 | +| X5 | Y5 | 3.2 | + + +
+ +- Brukeren kan deretter klikke pÃ¥ `Last in datasett`. Etter noen sekunder vil applikasjonen interpolere dybdene til hele interesseomrÃ¥det. et kart over det gitte omrÃ¥det med svarte punkter som indikerer hvor torvdybden er mÃ¥lt, og et kart over de interpolerte torvdybdene skal vises. **Merk** at en fremdriftslinje vises nederst til høyre i applikasjonen. + +- Etter at volumberegningen er utført, skal estimert totalvolum torv (m3) ogsÃ¥ vises pÃ¥ topppanelet. + +### Beregning av total karbonmengde i omrÃ¥det + +Det siste trinnet beregner den totale karbonmengden i det aktuelle omrÃ¥det. Brukeren kan legge inn egne data med torvegenskaper dersom dette er tilgjengelig. Alternativt velger brukeren Ã¥ benytte data for karboninnhold fra en innebygd database. NÃ¥r du klikker pÃ¥ `Torvegenskaper`, tilbys de to alternativene: + +- 1) `Standardverdier`: NÃ¥r dette alternativet er valgt, trenger brukeren kun Ã¥ velge myrtype for omrÃ¥det. Her vil brukeren fÃ¥ flere alternative detaljnivÃ¥er for myrtype, gitt den kunnskapen som brukeren innehar om det angitte omrÃ¥det. Beregningen av karbonmengden baseres pÃ¥ eksisterende data for **massetetthet**, og **andel organisk materiale** for oppgitt myrtype, samt standardverdi pÃ¥ 0.5 for **andel karboninnhold i organisk materiale** (se artikkel for kilder). + +- 2) `Egendefinerte verdier`: Dette alternativet forutsetter at brukeren kjenner verdiene for **massetetthet** (i g/cm3 eller tonn/m3, vanligvis mindre enn 0.2 for myr), **andel organisk materiale** (verdi 0-1) og **andel karboninnhold i organisk materiale** (verdi 0-1) i det aktuelle omrÃ¥det eller ønsker Ã¥ teste datasettet med egne inngangsverdier. Her er det mulig Ã¥ legge inn egne tall. NÃ¥r tallene er lagt inn, kan brukeren klikke pÃ¥ "Last inn verdier". + +Den totale karbonmengden (kg) i omrÃ¥det vises øverst til høyre i applikasjonen. + +### Last ned dataene + +NÃ¥r volumet er beregnet, er det mulig Ã¥ laste ned kartfigurer. Videre vil resultater fra karbonberegningen bli tilgjengelig ved neste steg i kalkulatoren. +I applikasjonen kan brukeren klikke pÃ¥ `Last ned resultater` og `Last ned`. Dette vil returnere en `.zip`-fil som inneholder: + +- `map_descriptive.png` : et kart over omrÃ¥det med punkter for dybdemÃ¥l. +- `map_interpolation.png` : et kart med interpolerte torvdybder. +- `interpolation_raster.tif` : et raster av resultatet fra volumberegningen - klar til bruk i enten **QGIS eller ArcGIS!** +- `results.csv` : en csv-fil med resultater fra volum- og karbonberegningene. + +--- + +### Author / Forfatter + +The application has been created by [Benjamin Cretois](https://www.nina.no/english/Contact/Employees/Employee-info?AnsattID=15849), [Marte Fandrem](https://www.ntnu.no/ansatte/marte.fandrem) and [Magni Olsen Kyrkjeeide](https://www.nina.no/Kontakt/Ansatte/Ansattinformasjon.aspx?AnsattID=12110). This project was funded by Norwegian Research Council under Grant number 282327 and Statnett. + +drawing +drawing +drawing + + +### How to cite us: + +Kyrkjeeide, M. O., Fandrem, M., Kolstad, A. L., Bartlett, J., Cretois, B., & Silvennoinen, H. M. (2023). A calculator for local peatland volume and carbon stock to support area planners and decision makers. Carbon Management, 14(1), 2267018. diff --git a/docs/project_structure.md b/docs/project_structure.md index 3668d38..d53e81e 100644 --- a/docs/project_structure.md +++ b/docs/project_structure.md @@ -1,3 +1,5 @@ +### Project Structure + ``` \carbonviewer ├── .github @@ -41,3 +43,14 @@ ├── translation.json # Language translation dictionairy for the app read into ``` + + +### Development in Rstudio with docker: +- Comment last line out in the Dockerfile `CMD Rscript ./home/rstudio/app/app.R` +- Build the docker image: `docker compose build` +- Run the docker container: `docker compose up` +- Open the Rstudio in a browser: `localhost:8787` +- Set working directory to app dir: `setwd(/home/rstudio/app)` +- Make changes, save and run the app in the Rstudio terminal: `shiny::runApp()` + + From d4e157e0595dc4b133e1c0a8e739cbcfae0a6c20 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Wed, 8 May 2024 12:50:32 +0200 Subject: [PATCH 13/17] config: add docs as volume --- docker-compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index 3e46876..84dedee 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,6 +9,7 @@ services: - ${HOME}/Downloads:/home/willeke.acampo/Downloads - ./app.R:/home/rstudio/app/app.R - ./appScripts:/home/rstudio/app/appScripts + - ./docs:/home/rstudio/app/docs - ./translation.json:/home/rstudio/app/translation.json environment: - DISABLE_AUTH=true \ No newline at end of file From 60eb249e8291de5c6f12e7312df6b3b4b4b78634 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Wed, 8 May 2024 13:26:07 +0200 Subject: [PATCH 14/17] update: error handling - update test data from m > cm - add error handling for corrupt shp --- appScripts/global.R | 8 ++ appScripts/server.R | 152 ++++++++++++++++++++------------------ test/csv_only.zip | Bin 219 -> 402 bytes test/invalid_csv.zip | Bin 1589 -> 1873 bytes test/invalid_shp.zip | Bin 5093 -> 5246 bytes test/shp_no_proj_file.zip | Bin 4169 -> 4280 bytes test/test_dataset_cm.zip | Bin 4402 -> 4554 bytes 7 files changed, 88 insertions(+), 72 deletions(-) diff --git a/appScripts/global.R b/appScripts/global.R index f90ae0c..04069b0 100755 --- a/appScripts/global.R +++ b/appScripts/global.R @@ -200,6 +200,14 @@ print_error_csv_columns <- function(){ )) } +print_corrupt_shp <- function(){ + showModal(modalDialog( + title = "SHP input error", + "The SHP file uploaded is corrupt. Please make sure that it contains the polygon(s) of the area of interest. + In any doubts, refer to the README. The session is reloaded.", + easyClose = TRUE + )) +} # Error message if files are not opened properly diff --git a/appScripts/server.R b/appScripts/server.R index 90df5ae..e8dd057 100755 --- a/appScripts/server.R +++ b/appScripts/server.R @@ -95,92 +95,100 @@ server <- function(input, output, session){ } n_files <- list.files(BASE, recursive = TRUE) + print(n_files) - if (length(n_files) < 3){ - print_error_incompatible_file() + + shp_file <- list.files(BASE, pattern = '.shp$', recursive = TRUE) + prj_file <- list.files(BASE, pattern = '.prj$', recursive = TRUE) + csv_file <- list.files(BASE, pattern = '.csv$', recursive = TRUE) + + # Check if there is both a shapefile and a CSV + if (length(shp_file) == 0){ + print_no_shp() + } + else if (length(prj_file) == 0){ + print_no_prj() + } + else if (length(csv_file) == 0){ + print_no_csv() } else{ - shp_file <- list.files(BASE, pattern = '.shp$', recursive = TRUE) - prj_file <- list.files(BASE, pattern = '.prj$', recursive = TRUE) - csv_file <- list.files(BASE, pattern = '.csv$', recursive = TRUE) - - # Check if there is both a shapefile and a CSV - if (length(shp_file) == 0){ - print_no_shp() + + tryCatch({ + shp <- st_read(paste0(BASE, "/", shp_file)) + }, error = function(e){ + print_corrupt_shp() + # sleep for 15 sec and reload session + Sys.sleep(15) + session$reload() + }) + #shp <- open_shapefile(paste0(BASE, "/", shp_file)) + + + + input_crs = st_crs(shp) + target_crs = 25833 + # Check if the shapefile has a CRS / IF NOT WE ASSUME THAT THE CRS + # IS 25833 AS SPECIFIED ON THE README + if (is.na(st_crs(shp))) { + print("The shapefile does not contain a projection (CRS)--> assigning the default CRS 'EPSG:25833'") + shp <- shp %>% st_set_crs(target_crs) + } + else { + print("The shapefile has a projection (CRS) --> Converting to 'EPSG:25833'") + shp <- shp %>% st_transform(target_crs) } - else if (length(prj_file) == 0){ - print_no_prj() + + df <- open_csv(paste0(BASE, "/", csv_file)) + names(df) <- tolower(names(df)) + + # If name is peat_depth_cm change to torvdybde_cm + if ("peat_depth_cm" %in% names(df)){ + names(df)[names(df) == "peat_depth_cm"] <- "torvdybde_cm" } - else if (length(csv_file) == 0){ - print_no_csv() + + # Check that the CSV contains the necessary columns (x,y, torvdybde_cm) + necessary_columns <- c("x","y", "torvdybde_cm") + print(sum(names(df) %in% necessary_columns) != 3) + + # print first row of the dataframe + print(head(df)) + + if (sum(names(df) %in% necessary_columns) != 3){ + print_error_csv_columns() } else{ - shp <- open_shapefile(paste0(BASE, "/", shp_file)) + dfs <- transform_to_sf(df) %>% st_set_crs(st_crs(input_crs)) + dfs <- dfs %>% st_transform(target_crs) + shp <- shp %>% st_transform(target_crs) - input_crs = st_crs(shp) - target_crs = 25833 - # Check if the shapefile has a CRS / IF NOT WE ASSUME THAT THE CRS - # IS 25833 AS SPECIFIED ON THE README - if (is.na(st_crs(shp))) { - print("The shapefile does not contain a projection (CRS)--> assigning the default CRS 'EPSG:25833'") - shp <- shp %>% st_set_crs(target_crs) - } - else { - print("The shapefile has a projection (CRS) --> Converting to 'EPSG:25833'") - shp <- shp %>% st_transform(target_crs) - } + #print(head(dfs)) + print(head(shp)) - df <- open_csv(paste0(BASE, "/", csv_file)) - names(df) <- tolower(names(df)) - - # If name is peat_depth_cm change to torvdybde_cm - if ("peat_depth_cm" %in% names(df)){ - names(df)[names(df) == "peat_depth_cm"] <- "torvdybde_cm" - } + # Interpolation (take only "sp" objects, hence the conversion) + interp <- interpolation(dfs, shp) - # Check that the CSV contains the necessary columns (x,y, torvdybde_cm) - necessary_columns <- c("x","y", "torvdybde_cm") - print(sum(names(df) %in% necessary_columns) != 3) - - # print first row of the dataframe - print(head(df)) + # Fill the DF reactive + df_reactive$shape <- shp + df_reactive$points <- dfs + df_reactive$volume <- interp[[1]] + df_reactive$interpolation_raster <- interp[[2]] - if (sum(names(df) %in% necessary_columns) != 3){ - print_error_csv_columns() - } - else{ - dfs <- transform_to_sf(df) %>% st_set_crs(st_crs(input_crs)) - dfs <- dfs %>% st_transform(target_crs) - shp <- shp %>% st_transform(target_crs) - - #print(head(dfs)) - print(head(shp)) - - # Interpolation (take only "sp" objects, hence the conversion) - interp <- interpolation(dfs, shp) - - # Fill the DF reactive - df_reactive$shape <- shp - df_reactive$points <- dfs - df_reactive$volume <- interp[[1]] - df_reactive$interpolation_raster <- interp[[2]] - - # Fill the slider with the optimal power value - updateSliderInput(session, "power", value=interp[[3]]) - - # Fill the plots with the MAE and volume - df_reactive$maeVSpower <- interp[[4]] - df_reactive$volumeVSpower <- interp[[5]] - - print("df_reactive:") - observe({ - print(reactiveValuesToList(df_reactive)) - }) - } + # Fill the slider with the optimal power value + updateSliderInput(session, "power", value=interp[[3]]) + + # Fill the plots with the MAE and volume + df_reactive$maeVSpower <- interp[[4]] + df_reactive$volumeVSpower <- interp[[5]] + + print("df_reactive:") + observe({ + print(reactiveValuesToList(df_reactive)) + }) } } } - + # If the reset button has been pushed else if (values$upload_state == 'reset') { session$reload() diff --git a/test/csv_only.zip b/test/csv_only.zip index e24d1ef602de97ebaffe1dcc4fb76139b5c6d899..53800cf649cc7724a4e2b3141aeecc0b353b4f35 100644 GIT binary patch literal 402 zcmWIWW@Zs#0D+RU6%k+tl;C7gU`Q@5i_g!?snib*;bmaAjkHd)17Z+eTEWf0$YMOL zg@@%cBLhPK*cc854u*UrVVGfxl502^rpG|CEyK{T3?t1qm)qUqtQ)9LT2 zt8uc!|J+lfD~wKhK&#j}UN5;M3^E*q1H2iTM3`~=0qPxww~ind%mqaF2x2VEPsmn+ h`~(9_8r_kNg_%!`4+Fee*+9lH0pTtneF(&1006giR`UP= literal 219 zcmWIWW@Zs#-~dAHWVJ8`C=deDJPZm9$;D;y`FS~&dO${K2rmP>66=m+O&|u*r4`%^ zj4Zn*xA3rhW@KPkyGr}@t eIgn*Au%r>hBE{+eZ&o&t9!4OH0@B$a4g&x*FD+dF diff --git a/test/invalid_csv.zip b/test/invalid_csv.zip index 7d56583167ab76a2b7e721fcb4752748a56bc017..e12ed584a1c9401d9e838523eee7aba4b09b27d2 100644 GIT binary patch delta 680 zcmdnWbCJ(0z?+#xgaHI9(pE%(8Bl_UL4hGNuPiYqGbKK`xJ*AZgqMNcHPSlG1BgL% zX$3a}Ba89079N(*j0_ADqy(hVv`j8wkr22MVV(A8uL)fFL^lfoIdp|*S)?%)uDyn- zP?r@`;pR<@MvRzBd$A~;EX=$CQ{`K1DnBtt1mFr6SUA0P1hI$@rO6H~a&n+hf`KKC zUT6kj4YSEJSd`^Jfd&Ih8h4@V!xn^-e_-f4&4}vY$=E`4as(^7eHP4U`mhG?4h((D iENJ?Gfvt<4CZI_uz?+o~g95|k7*+`ZceWkLl0aNq!Og(PvTO3hITrdtK*^HS;*$8{jKqS} zw9K4Ty_BT1&=6h*cBQFXla~XPgD_0XWPZkLEFe9T4cVjx&}BC(Fc~pIq~`*qLH4mB zYw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j07pCfHJtP^ePCv=iD~m}{_4W!(WQ5&oPi{bA81hK%w<1bi>lu|43fQI$RBs9 zxrA#(t@frUOU|UhBnl#6HroBAKzu-Db9?zx_t4-2Nd z+Em8yMD-F)-}VFw-orjrwc)KJ9AEXnbu-vS3Jgqlqa%#NOF3x#YVkqMsn{zw#NyPF_~cyu&=6h*_IDzhX4185miNr?v2~d}d@|0PAJo0K(V?l`sY<-~q}gF(^!aD4-x*oKXNaL}}{Q z)WsPX)WOaXn;gj`!Uyz{9k*s0)HR#SnS!{0=4{K<4RGKBssyS=n1k%C9H4;+Z&hHp zN0`?eXb$uGE5VjPl_1sF&6y1Mmnz6DNFlR%1+OrpC_BeP@z{BcKvf`>0p5&EBFx|j z;#2^d2?moN@JXr@iW;y!29Ak=qI?QaeGCjs8vPh1KM+vV!4ff;u?sa~asxlA8Mcfd zGyJi{3QjYCX#^B0$iWPZ6eM>AF#*jK2gQ&lY7F5s5)?nkAr6cmBqP};-xpBwE6%`( iD?&yhM*ymk8-PZt^P@&v+GJiqX|Bmk3=E3=Alm^Wkh`M* delta 782 zcmX@5yh+I_z?+$civa|3n`T6S8BjuiL586uwYVfcC9x#2IJG1`Iafb4gp+~!orq@I zXA#Ybc4FcT3>*xx4Ju*xH)hD!1NHGRGB7AH$V_GwRN^fFD^{AiHTepU=EQjurI}eo zfJz`5CaN_)T?*tC!!;=IrzE8zYnj~3xE-$NaLtT}ZJD|O4nVi61FcmDTOu~Ol}UsP z=p;LC&9w78nwyt11#!XkfE>oW{z|YV(4HJ1hB!9rBm_$#^}>>g0;qQ(`ndtxT%3##kjGKG~56g6x> Nn9Rh$u#*qO0{};#nz{f0 From 52e9b20fced4a482093ac1e8b2ca430a17b978ea Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Wed, 29 May 2024 10:54:00 +0200 Subject: [PATCH 15/17] docs: instructions no and en - incorporated magni's comments on en text - added norwegian translation of magni. --- appScripts/ui.R | 2 +- docs/instructions_en.md | 79 ++++++++++---------- docs/instructions_no.md | 107 +++++++++++++++++++-------- docs/project_structure.md | 4 +- instructions.md | 150 -------------------------------------- translation.json | 4 +- 6 files changed, 118 insertions(+), 228 deletions(-) delete mode 100755 instructions.md diff --git a/appScripts/ui.R b/appScripts/ui.R index b4e20aa..d1c0ffd 100755 --- a/appScripts/ui.R +++ b/appScripts/ui.R @@ -77,7 +77,7 @@ sidebar <- shinydashboard::dashboardSidebar( ) ), - menuItem(i18n$t("Kart resultater"), tabName = "tables", icon = icon("th") + menuItem(i18n$t("Kart og Resultater"), tabName = "tables", icon = icon("th") ), menuItem(i18n$t("Power evalueringsgrafer"), tabName = "powersetting", icon = icon('hand-fist') diff --git a/docs/instructions_en.md b/docs/instructions_en.md index ae42976..878bb8f 100644 --- a/docs/instructions_en.md +++ b/docs/instructions_en.md @@ -10,44 +10,41 @@ --- -## What is the CarbonViewer? +## What is CarbonViewer? -**CarbonViewer** is a [R Shiny](https://shiny.rstudio.com/) application designed to calculate and visualize the amount of carbon stored in a given peatland area. -The application estimates the total carbon content in the peat body, which can be used to evaluate the soil carbon storage at any given peatland site and the potential impact land-use change can have on CO2 emission. As development in peatland areas may give cause to high greenhouse gas emissions, the aim of this application is to support area planners with an improved knowledge base of the soil carbon in potentially impacted areas. The application should be applied during early planning phases as a tool to map soil carbon stocks in peatlands, to avoid, reduce or mitigate the impact of development in peatlands areas. +**CarbonViewer** is a [R Shiny](https://shiny.rstudio.com/) application designed to calculate and visualize the amount of carbon stored in a given peatland area. The application estimates the total carbon content in the peat body, which can be used to evaluate the soil carbon storage at any given peatland site and the potential impact land-use change can have on CO2 emission. As drainage of peatland areas results in high greenhouse gas emissions, the aim of this application is to support area planners with an improved knowledge base of the soil carbon stock in peatlands considered for development. The application should be used early in planning as a tool to map soil carbon stocks in peatlands, and hence, to avoid, reduce or mitigate the impact of development in peatlands areas. -## How to use the CarbonViewer? +## How to use CarbonViewer? ### 1. Import Data -Upload a zip-file containing a shapefile of the study area and a csv-file with peat depth measurements in cm. Ensure that the X and Y coordinates in the csv-file match the coordinate system of the shapefile. All coordinate systems are supported, but note that the application converts the data to ETRS89 UTM Zone 33N for the calculations. +Upload a zip-file containing a shapefile of the study area and a csv-file with peat depth measurements in cm from the same area. Ensure that the X and Y coordinates of the peat depths measurements in the csv-file match the coordinate system of the shapefile. All coordinate systems are supported, but note that the application converts the data to ETRS89 UTM Zone 33N for the calculations. -**Folder structure:** - -| | | -| --- | --- | -| └── study_area.zip | | -|          â”œâ”€â”€ study_area.shp | | -|          â”œâ”€â”€ study_area.shx | | -|          â”œâ”€â”€ study_area.dbf | | -|          â”œâ”€â”€ study_area.prj | | -|          â””── peat_depth_measurements.csv | | - -
- -**Example of the .csv file:** +***User Action:** Click on Upload Data. Drag and drop or browse for the zip-file containing the shapefile and csv-file.* +- *The shapefile must include the following files: .shp, .shx, .dbf, and .prj.* +- *The csv-file must include the following columns: X, Y, and peat_depth_cm.* -|     X     |     Y     | peat_depth_cm | -|:-----------------------------:|:-----------------------------:|:-------------:| -| X1 | Y1 | 120 | -| X2 | Y2 | 120 | -| X3 | Y3 | 270 | -| X4 | Y4 | 270 | -| X5 | Y5 | 320 | - -
+**Folder structure:** -***User Action:** Click on Upload Data. Drag and drop or browse for the zip-file containing the shapefile and csv-file. The shapefile must include the following files: .shp, .shx, .dbf, and .prj. The csv-file must include the following columns: X, Y, and peat_depth_cm.* +```{text} +/dataset.zip +├── peat_depth_samples.csv +├── study_area.dbf +├── study_area.prj +├── study_area.shp +└── study_area.shx +``` + + +**Example of correct format for the .csv file:** +| X      | Y      | peat_depth_cm | +|-----------------------|-----------------------|---------------| +| X1 | Y1 | 120 | +| X2 | Y2 | 120 | +| X3 | Y3 | 270 | +| X4 | Y4 | 270 | +| X5 | Y5 | 320 | ### 2. Calculate Peat Volume @@ -63,9 +60,9 @@ This step results in: ### 3. Calculate the Carbon Content -The **Total Carbon Content** is calculated by multiplying the Soil Organic Carbon (SOC) with the total volume of peat in the study area. The SOC is calculated using the peat properties Bulk Density (BD), Soil Organic Matter (SOM), and the Carbon content fraction (see [Carbon Content Caluclation](#carbon-content-calculation)). The application allows the user to either choose **default** values for the peat properties or **customize** the values. The **default** values are based on a [Database](https://github.com/NINAnor/carbonviewer/blob/main/data/gran_dataset.csv) of peat properties from Norwegian mires, and a set value of 0.5 for the fraction of carbon content in organic matter. If the user chooses to **customize** the values, it is required to know the values of bulk density (in g/cm3 or tonne/m3, commonly less than 0.2 for peatlands), organic matter fraction and carbon content fraction for the study area. +The **Total Carbon Content** is calculated by multiplying the Soil Organic Carbon (SOC) with the total volume of peat in the study area. The SOC is calculated using the peat properties Bulk Density (BD), Soil Organic Matter (SOM), and the Carbon content fraction (see [Carbon Content Caluclation](#carbon-content-calculation)). The application allows the user to either choose **default** values for the peat properties or **customize** the values. The **default** values are based on a [Database](https://github.com/NINAnor/carbonviewer/blob/main/data/gran_dataset.csv) of peat properties from Norwegian mires, and a set value of 0.5 for the fraction of carbon content in organic matter. If the user chooses to **customize** the values, it is required to know the values of bulk density (in g/cm3 or tonne/m3, commonly less than 0.2 for peatlands), organic matter fraction (SOM) and carbon content fraction for the study area (typically 0.5). -This step results in a value for the **mean** and **standard deviation** of the total carbon content in the study area *(tonns C)* displayed in the Map results tab. +This step results in a value for the **mean** and **standard deviation** of the total carbon content in the study area *(tons C)* displayed in the Map results tab. ***User Action:** Click on Carbon content calculation. Choose between Default values or Custom values for the peat properties. Click on Load values. View the results in the Map results tab.* @@ -78,16 +75,14 @@ The results of the volume and carbon calculations can be exported as a zip-file. The zip-file contains the following files: -| | | -| --- | --- | -| └── carbonviewer-results-date.zip | | -|          â”œâ”€â”€ carbonviewer_results.csv |         *a csv-file with results from the volume and carbon calculations.* | -|          â”œâ”€â”€ carbonviewer_results.txt|         *a txt-file with results from the volume and carbon calculations.*| -|          â”œâ”€â”€ map_study_area.png |         *a map of the given area including peat depth measurement points.* | -|          â”œâ”€â”€ map_peat_depths.png |         *a map with interpolated values of peat depths.* | -|          â””── raster_interpolated_peat_depths.tif |         *a raster with interpolated values of peat depths.*| - -
+```{text} +/Downloads/carbonviewer-results-date.zip +├── carbonviewer_results.csv +├── carbonviewer_results.txt +├── map_study_area.png +├── map_peat_depths.png +└── raster_interpolated_peat_depths.tif +``` ***User Action:** Click on Download results > Download.* @@ -117,7 +112,7 @@ where: - **SOM** = Soil Organic Matter fraction - **0.5** = SOM:SOC conversion factor, value can range from 0 to 1, but the default value is set to 0.5 -The peat volume of the study area is calculated by the interpolation of the peat depth measurements (Step 2). The other peat properties, **Bulk Density**, **Soil Organic Mattter fraction**, and the SOM:SOC conversion factor, are either set to default values or can be customized by the user (Step 3). +The peat volume of the study area is calculated by the interpolation of the peat depth measurements (Step 2). The other peat properties, **Bulk Density**, **Soil Organic Matter fraction**, and the SOM:SOC conversion factor, are either set to default values or can be customized by the user (Step 3). --- diff --git a/docs/instructions_no.md b/docs/instructions_no.md index 2681670..e30a764 100755 --- a/docs/instructions_no.md +++ b/docs/instructions_no.md @@ -12,57 +12,104 @@ ## Hva er CarbonViewer -**CarbonViewer** er en [R Shiny](https://shiny.rstudio.com/)-applikasjon som beregner og visualiserer karbonmengde i torvlaget for et gitt areal av myr-naturtyper. Kalkulatoren estimerer det totale karboninnholdet bundet opp i organisk jord som kan frigjøres som atmosfærisk karbondioksid (CO2) dersom arealet blir påvirket. Utbygging i myr kan gi høye klimagassutslipp og formålet med kalkulatoren er å gi beslutningstakere et bedre kunnskapsgrunnlag om karbonet som er bundet opp i torv. Kalkulatoren bør brukes i tidlig planlegging og som et verktøy for å kartlegge jordbundet karbon i myr. Dette for å unngå utbygging i karbonrike områder og minimere klimagassutslipp fra naturinngrep. +**CarbonViewer** er en [R Shiny](https://shiny.rstudio.com/)-applikasjon som beregner og visualiserer karbonmengde i torvlaget for et gitt areal av myr. Kalkulatoren estimerer det totale karboninnholdet bundet opp i organisk jord som kan frigjøres som atmosfærisk karbondioksid (CO2) dersom arealet blir drenert. Drenering av myr gir høye klimagassutslipp og formålet med kalkulatoren er å gi beslutningstakere et bedre kunnskapsgrunnlag om karbonmengden som er bundet opp i myr som kan bli berørt i utbyggingsprosjekter. Kalkulatoren bør brukes tidlig i arealplanlegging og som et verktøy for å kartlegge karbonlageret i myr. Dette for å unngå utbygging i karbonrike områder og minimere klimagassutslipp fra naturinngrep. -## Hvordan bruker jeg denne applikasjonen? +## Hvordan bruke CarbonViewer? -**Merk at et testdatasett er gitt og det er mulig å laste det inn i applikasjonen ved å klikke på "Test app med testdatasett"** -### Lage kartene +### 1. Importer Data -**Etter å ha fulgt alle trinnene beskrevet nedenfor, klikk på fanen `Resultater` for å visualisere resultatene** +Last opp en zip-file som inneholder en shape-fil med polygon av det aktuelle området og en csv-fil med torvdybder i cm fra samme område. Pass på at koordinater X og Y for hver av torvdybdemållingene i csv-filen har samme koordinatsystem som shape-filen. Alle koordinatsystemer kan brukes, men merk at appen endrer dataene til ETRS89 UTM Zone 33N for beregningene. -- I menyen 'volumberegning' må brukeren laste opp en 'zip'-fil som inneholder både en 'shapefil' som avgrenser det aktuelle området og en 'csv'-fil med torvdybder (m), samt koordinater (gitt i UTM 32 N, EPSG:25832) for hvert prøvepunkt tatt i det aktuelle området. En mål for notering av torvdybder vises nedenfor. Torvdybder bør- for best mulig resultat - bli tatt med regelmessige intervaller med maksimum avstand på 20m mellom hvert punkt (for mindre myrarealer bør en avstand på mindre enn 20m benyttes). +***Brukerveiledning:** Klikk på Last opp data. Dra og slipp eller finn zip-filen som inneholder shape-fil og csv-fil. Shape-filen må inkludere følgende filer: .shp, .shx, .dbf, and .prj. csv-filen må inkludere følgende kolonner: X, Y, and torvdybde_cm.* -**Riktig mål for .csv filen** +**Mappestruktur:** -
+```{text} +/dataset.zip +├── torvdybder.csv +├── prosjektomrade.dbf +├── prosjektomrade.prj +├── prosjektomrade.shp +└── prosjektomrade.shx +``` +**Example of correct format for the .csv file:** +| X      | Y      | torvdybde_cm | +|-----------------------|-----------------------|---------------| +| X1 | Y1 | 120 | +| X2 | Y2 | 120 | +| X3 | Y3 | 270 | +| X4 | Y4 | 270 | +| X5 | Y5 | 320 | -| X       | Y       | Dybde | -|---------|----------|--------------| -| X1 | Y1 | 1.2 | -| X2 | Y2 | 1.2 | -| X3 | Y3 | 2.7 | -| X4 | Y4 | 2.7 | -| X5 | Y5 | 3.2 | +### 2. Beregn torvvolum +Det totale torvvolumet i omrÃ¥det blir beregnet ved Ã¥ interpolere torvdybdemÃ¥lingene med Inverse Distance Weighting (IDW) (se [Peat Depth Interpolation](#peat-depth-interpolation)). **Merk at et testdatasett er gitt for uttesting av beregninger: “Beregn med testdataâ€.** -
+Dette steget resulterer i: +- Et kart med punkter som viser hvor torvdybdemålingene er tatt i felt *(se Kart og Resultater -fanen).* +- Et kart som viser raster (*1x1 m*) med interpolerte torvdybder *(se Kart og Resultater-fanen).* +- Arealet for området (*m2*) og totalt torvvolum (*m3*) i området *(se Kart og Resultater-fanen).* +- Grafer som viser påvirkningen av power parameter på interpoleringsresultatet *(se Power evalueringsgrafer).* -- Brukeren kan deretter klikke på `Last in datasett`. Etter noen sekunder vil applikasjonen interpolere dybdene til hele interesseområdet. et kart over det gitte området med svarte punkter som indikerer hvor torvdybden er målt, og et kart over de interpolerte torvdybdene skal vises. **Merk** at en fremdriftslinje vises nederst til høyre i applikasjonen. +***Brukerveiledning:** Klikk på Last ned resultater. Vent til fremdriftsindikatoren er ferdig. Se resultatene under Kart og Resultater- og Power evalueringsgrafer-fanene. **Valgfritt**: Endre power-parameter i Kart og Resultater-fanen.* -- Etter at volumberegningen er utført, skal estimert totalvolum torv (m3) også vises på topppanelet. +### 3. Beregn karboninnhold -### Beregning av total karbonmengde i området +**Totalt karboninnhold** beregnes ved å multiplisere karboninnhold i jord (SOC) med det totale torvvolumet i området. SOC beregnes ved å bruke massetetthet (Bulk Density (BD)), organisk materiale i jord (SOM) og andel karboninnhold i organisk materiale (se [Carbon Content Caluclation](#carbon-content-calculation)). Appen gir brukeren valget mellom å beregne med **Standardverdier** eller **Egendefinerte verdier**. **Standardverdier** er basert på en [Database](https://github.com/NINAnor/carbonviewer/blob/main/data/gran_dataset.csv) med torvegenskaper fra norske myrer, og har en angitt verdi på 0,5 for andel karboninnhold i organisk jord. Hvis brukeren velger **Egendefinerte verdier**, krever det en verdi for massetetthet (BD, i g/cm3 eller tonn/m3, vanligvis mindre enn 0,2 for torv), organisk materiale (SOM) og andel karboninnhold i organisk jord (typisk 0,5), helst fra området som undersøkes. -Det siste trinnet beregner den totale karbonmengden i det aktuelle området. Brukeren kan legge inn egne data med torvegenskaper dersom dette er tilgjengelig. Alternativt velger brukeren å benytte data for karboninnhold fra en innebygd database. Når du klikker på `Torvegenskaper`, tilbys de to alternativene: +Dette steget gir en verdi for **gjennomsnitt** og **standardavvik** for det totale karboninnholdet beregnet for området *(tonn C)* og vises under Kart og Resultater-fanen. -- 1) `Standardverdier`: Når dette alternativet er valgt, trenger brukeren kun å velge myrtype for området. Her vil brukeren få flere alternative detaljnivåer for myrtype, gitt den kunnskapen som brukeren innehar om det angitte området. Beregningen av karbonmengden baseres på eksisterende data for **massetetthet**, og **andel organisk materiale** for oppgitt myrtype, samt standardverdi på 0.5 for **andel karboninnhold i organisk materiale** (se artikkel for kilder). +***Brukerveiledning:** Trykk på Beregn karboninnhold. Velg mellom Standardverdier og Egendefinerte verdier. Trykk på Last verdier. Se resultatet under Kart og Resultater-fanen.* -- 2) `Egendefinerte verdier`: Dette alternativet forutsetter at brukeren kjenner verdiene for **massetetthet** (i g/cm3 eller tonn/m3, vanligvis mindre enn 0.2 for myr), **andel organisk materiale** (verdi 0-1) og **andel karboninnhold i organisk materiale** (verdi 0-1) i det aktuelle området eller ønsker å teste datasettet med egne inngangsverdier. Her er det mulig å legge inn egne tall. Når tallene er lagt inn, kan brukeren klikke på "Last inn verdier". +- *Standardverdier: Velg myrtype som gjelder for ditt område. Trykk på Last verdier.* +- *Egendefinerte verdier: Sett inn massetetthet (BD; in g/cm3 eller tonn/m3), organisk materiale (SOM; Verdi mellom 0-1) og andel karboninnhold i organisk jord (verdi mellom 0-1, typisk 0,5) for ditt område. Trykk på Last verdier.* -Den totale karbonmengden (kg) i området vises øverst til høyre i applikasjonen. +### 4. Eksporter resultater -### Last ned dataene +Resultatene for torvvolum og karbonberegninger kan eksporteres som zip-fil. -Når volumet er beregnet, er det mulig å laste ned kartfigurer. Videre vil resultater fra karbonberegningen bli tilgjengelig ved neste steg i kalkulatoren. -I applikasjonen kan brukeren klikke på `Last ned resultater` og `Last ned`. Dette vil returnere en `.zip`-fil som inneholder: +Zip-filen inneholder følgende filer: -- `map_descriptive.png` : et kart over området med punkter for dybdemål. -- `map_interpolation.png` : et kart med interpolerte torvdybder. -- `interpolation_raster.tif` : et raster av resultatet fra volumberegningen - klar til bruk i enten **QGIS eller ArcGIS!** -- `results.csv` : en csv-fil med resultater fra volum- og karbonberegningene. +```{text} +/Downloads/carbonviewer-results-date.zip +├── carbonviewer_resultater.csv +├── carbonviewer_resultater.txt +├── kart_over_omradet.png +├── kart_torvdybder.png +└── raster_interpolerte_torvdybder.tif +``` + +***Brukerveiledning:** Trykk på Last ned resultater > Download.* + +--- + +## Overview of Methods + +A brief overview of the methods used in the application is provided below. For a more detailed description, please refer to Kyrkjeeide, M. O. et al. (2023). + +### Peat Depth Interpolation +The peat depth measurements from field survey (*csv-file*) are extrapolated to the entire study area extent (*shp-file*) using Inverse Distance Weighting (IDW). IDW assumes that nearby observations are more alike than those further away. For instance, a peat measurement taken at a 10 *m* distance has a greater influence on the estimated value of a raster pixel cell than a measurement taken at a 50 *m* distance. The degree of this influence is controlled by the power parameter. A power of 1 assigns an equal weight to all points, resulting in a smoother interpolated raster. Increasing the power value reduces the influence of distant sample points on the estimated value. + +**Optimal value of the Power parameter:** + +The application identifies the optimal power parameter using a cross-validation approach, comparing the results of an IDW interpolation method with those of a Kriging interpolation method. The power parameter is varied between 1 and 6, and the Mean Absolute Error (MAE) is calculated for each value. The power parameter with the lowest MAE is chosen as the default value. You can also choose to use a custom value for the power parameter by sliding the bar in the "Map Result" Section. The influence of the power on the results is shown in the graphs located in "Power Evaluation Graphs" section. + +### Carbon Content Calculation + +The **Total Carbon Content (TCC)** of the study area is calculated by multiplying the SOC with the total volume of peat in the study area, where the SOC is calculated using the peat properties Bulk Density (BD), Soil Organic Matter (SOM), and the SOM:SOC conversion factor. + +TCC = SOC * v + +where: +- **SOC** = BD * SOM * 0.5 +- **v** = peat volume (m3) calculated by the interpolation of peat depth measurements +- **BD** = dry Bulk Density (t m−3 or g cm−3) +- **SOM** = Soil Organic Matter fraction +- **0.5** = SOM:SOC conversion factor, value can range from 0 to 1, but the default value is set to 0.5 + +The peat volume of the study area is calculated by the interpolation of the peat depth measurements (Step 2). The other peat properties, **Bulk Density**, **Soil Organic Matter fraction**, and the SOM:SOC conversion factor, are either set to default values or can be customized by the user (Step 3). --- diff --git a/docs/project_structure.md b/docs/project_structure.md index d53e81e..56a05b6 100644 --- a/docs/project_structure.md +++ b/docs/project_structure.md @@ -40,11 +40,9 @@ ├── LICENSE # License for the app ├── README.md # Readme file for the app (exact same as instructions.md) ├── rstudio-prefs.json # Rstudio preferences -├── translation.json # Language translation dictionairy for the app read into +├── translation.json # Language translation dict ``` - - ### Development in Rstudio with docker: - Comment last line out in the Dockerfile `CMD Rscript ./home/rstudio/app/app.R` - Build the docker image: `docker compose build` diff --git a/instructions.md b/instructions.md deleted file mode 100755 index 664cc84..0000000 --- a/instructions.md +++ /dev/null @@ -1,150 +0,0 @@ -

CarbonViewer

-

A calculator for peatland volume and carbon stock to support area planners and decision makers .

- -![CC BY-NC-SA 4.0][license-badge] -[![DOI](https://zenodo.org/badge/554694482.svg)](https://zenodo.org/badge/latestdoi/554694482) - -[license-badge]: https://badgen.net/badge/License/CC-BY-NC-SA%204.0/green - -**NOTE**: The application supports both the English and Norwegian language. To change the language, click on the `Change language` box and choose `en` for English or `no` for Norwegian. - -**MERK**: Applikasjonen støtter både engelsk og norsk. For å endre språk, klikk på `Endre språk`-boksen og velg `en` for engelsk eller `no` for norsk. - -Description of CarbonViewer in [English](#what-is-the-carbonviewer) - -Beskrivelse av appen på [Norsk](#hva-er-carbonviewer) - ---- - -## Hva er CarbonViewer - -**CarbonViewer** er en [R Shiny](https://shiny.rstudio.com/)-applikasjon som beregner og visualiserer karbonmengde i torvlaget for et gitt areal av myr-naturtyper. Kalkulatoren estimerer det totale karboninnholdet bundet opp i organisk jord som kan frigjøres som atmosfærisk karbondioksid (CO2) dersom arealet blir påvirket. Utbygging i myr kan gi høye klimagassutslipp og formålet med kalkulatoren er å gi beslutningstakere et bedre kunnskapsgrunnlag om karbonet som er bundet opp i torv. Kalkulatoren bør brukes i tidlig planlegging og som et verktøy for å kartlegge jordbundet karbon i myr. Dette for å unngå utbygging i karbonrike områder og minimere klimagassutslipp fra naturinngrep. - -## Hvordan bruker jeg denne applikasjonen? - -**Merk at et testdatasett er gitt og det er mulig å laste det inn i applikasjonen ved å klikke på "Test app med testdatasett"** - -### Lage kartene - -**Etter å ha fulgt alle trinnene beskrevet nedenfor, klikk på fanen `Resultater` for å visualisere resultatene** - -- I menyen 'volumberegning' må brukeren laste opp en 'zip'-fil som inneholder både en 'shapefil' som avgrenser det aktuelle området og en 'csv'-fil med torvdybder (m), samt koordinater (gitt i UTM 32 N, EPSG:25832) for hvert prøvepunkt tatt i det aktuelle området. En mål for notering av torvdybder vises nedenfor. Torvdybder bør- for best mulig resultat - bli tatt med regelmessige intervaller med maksimum avstand på 20m mellom hvert punkt (for mindre myrarealer bør en avstand på mindre enn 20m benyttes). - -**Riktig mål for .csv filen** - -
- - -| X       | Y       | Dybde | -|---------|----------|--------------| -| X1 | Y1 | 1.2 | -| X2 | Y2 | 1.2 | -| X3 | Y3 | 2.7 | -| X4 | Y4 | 2.7 | -| X5 | Y5 | 3.2 | - - -
- -- Brukeren kan deretter klikke på `Last in datasett`. Etter noen sekunder vil applikasjonen interpolere dybdene til hele interesseområdet. et kart over det gitte området med svarte punkter som indikerer hvor torvdybden er målt, og et kart over de interpolerte torvdybdene skal vises. **Merk** at en fremdriftslinje vises nederst til høyre i applikasjonen. - -- Etter at volumberegningen er utført, skal estimert totalvolum torv (m3) også vises på topppanelet. - -### Beregning av total karbonmengde i området - -Det siste trinnet beregner den totale karbonmengden i det aktuelle området. Brukeren kan legge inn egne data med torvegenskaper dersom dette er tilgjengelig. Alternativt velger brukeren å benytte data for karboninnhold fra en innebygd database. Når du klikker på `Torvegenskaper`, tilbys de to alternativene: - -- 1) `Standardverdier`: Når dette alternativet er valgt, trenger brukeren kun å velge myrtype for området. Her vil brukeren få flere alternative detaljnivåer for myrtype, gitt den kunnskapen som brukeren innehar om det angitte området. Beregningen av karbonmengden baseres på eksisterende data for **massetetthet**, og **andel organisk materiale** for oppgitt myrtype, samt standardverdi på 0.5 for **andel karboninnhold i organisk materiale** (se artikkel for kilder). - -- 2) `Egendefinerte verdier`: Dette alternativet forutsetter at brukeren kjenner verdiene for **massetetthet** (i g/cm3 eller tonn/m3, vanligvis mindre enn 0.2 for myr), **andel organisk materiale** (verdi 0-1) og **andel karboninnhold i organisk materiale** (verdi 0-1) i det aktuelle området eller ønsker å teste datasettet med egne inngangsverdier. Her er det mulig å legge inn egne tall. Når tallene er lagt inn, kan brukeren klikke på "Last inn verdier". - -Den totale karbonmengden (kg) i området vises øverst til høyre i applikasjonen. - -### Last ned dataene - -Når volumet er beregnet, er det mulig å laste ned kartfigurer. Videre vil resultater fra karbonberegningen bli tilgjengelig ved neste steg i kalkulatoren. -I applikasjonen kan brukeren klikke på `Last ned resultater` og `Last ned`. Dette vil returnere en `.zip`-fil som inneholder: - -- `map_descriptive.png` : et kart over området med punkter for dybdemål. -- `map_interpolation.png` : et kart med interpolerte torvdybder. -- `interpolation_raster.tif` : et raster av resultatet fra volumberegningen - klar til bruk i enten **QGIS eller ArcGIS!** -- `results.csv` : en csv-fil med resultater fra volum- og karbonberegningene. - ---- - -## What is the CarbonViewer - -**CarbonViewer** is a [R Shiny](https://shiny.rstudio.com/) application designed to calculate and visualize the amount of carbon stored in a given peatland area. -The application estimates the total carbon content in the peat body, which can be used to evaluate the soil carbon storage at any given peatland site and the potential impact land-use change can have on CO2 emission. As development in peatland areas may give cause to high greenhouse gas emissions, the aim of this application is to support area planners with an improved knowledge base of the soil carbon in potentially impacted areas. The application should be applied during early planning phases as a tool to map soil carbon stocks in peatlands, to avoid, reduce or mitigate the impact of development in peatlands areas. - -## How to use this application? - -**Note that a test dataset is provided and that is is possible to load it in the application by clicking on "Test app with test dataset"** - -### Creating the maps - -**After following all the steps described below, please click on the `Results` tab to vizualise the results** - -- In the menu 'Volume calculation' the user must upload a `zip` file containing both a `shapefile` with the extent of the area of interest and a `csv` file containing peat depth measures (in m) taken at the site with coordinates for each measure (given in UTM 32 N, EPSG:25832). An example template for notation of peat depths is provided below. Peat depth measurements should -for best results- be taken at regular intervals at a maximum distance of 20m between each sample point (if a small peatland area are sampled, less than 20m is needed). - -**Example of correct format for the .csv file** - - -
- -
- - -| X       | Y       | Dybde | -|---------|----------|--------------| -| X1 | Y1 | 1.2 | -| X2 | Y2 | 1.2 | -| X3 | Y3 | 2.7 | -| X4 | Y4 | 2.7 | -| X5 | Y5 | 3.2 | - - -
- -
- - - -- The user can then click on `Load dataset`. After a few seconds the application will interpolate the depths of the entire area of interest. a map of the given area with black points indicating where peat depth have been measured, and a map of the interpolated peat depths should be displayed. **Note** that a progress bar is displayed on the bottom right of the application. - -- After the volume calculation is done the estimated total volume of peat (m3) should also appear on the top panel. - -### Calculating the carbon content of the area - -The final step lies in calculating the carbon content of the given area. When clicking on `Peat properties`, two options are offered to the user: - -- 1) `Default values`: Using this option, the user choose the peatland type of the area. The calculation of the carbon content will then be done using a database of peat properties from Norwegian mires, that contain values for **bulk density** and **fraction organic matter** representing the chosen peatland type, and a set value of 0.5 for **fraction of carbon content in organic matter** (see paper for references). - -- 2) `Custom values`: This option requires that the user knows the values of **bulk density** (in g/cm3 or tonne/m3, commonly less than 0.2 for peatlands), **fraction organic matter** (values of 0-1) and **fraction carbon content** (values of 0-1) in the given area, or that the user is interested in testing with specific values. The input values are specified in the three boxes. Once the values are inserted, the user can click on `Load values`. - -The total carbon content (kg) of the area will be displayed on the top right panel of this application. - -### Download the data - -Once the peat volum map is computed, it is possible to download the output maps. The results from the carbon calculation will also be available by completing the next step in the calculator. -In the application, the user can click on `Download results` and `Download`. This will return a `.zip` file containing: - -- `map_descriptive.png` : a map of the given area including peat depth measurement points. -- `map_interpolation.png` : a map with interpolated values of peat depths. -- `interpolation_raster.tif` : a raster of the result from the interpolation of volume - ready to use in either **QGIS or ArcGIS!** -- `results.csv` : a csv-file with results from the volume and carbon calculations. - ---- - -### Author / Forfatter - -The application has been created by [Benjamin Cretois](https://www.nina.no/english/Contact/Employees/Employee-info?AnsattID=15849), [Marte Fandrem](https://www.ntnu.no/ansatte/marte.fandrem) and [Magni Olsen Kyrkjeeide](https://www.nina.no/Kontakt/Ansatte/Ansattinformasjon.aspx?AnsattID=12110). This project was funded by Norwegian Research Council under Grant number 282327 and Statnett. - -drawing -drawing -drawing - - -### How to cite us: - -Kyrkjeeide, M. O., Fandrem, M., Kolstad, A. L., Bartlett, J., Cretois, B., & Silvennoinen, H. M. (2023). A calculator for local peatland volume and carbon stock to support area planners and decision makers. Carbon Management, 14(1), 2267018. diff --git a/translation.json b/translation.json index 9c90e26..b11d1c0 100755 --- a/translation.json +++ b/translation.json @@ -12,7 +12,7 @@ {"no": "Beregn volume", "en": "Volume calculation"}, {"no": "torvdybde_cm", "en": "peat_depth_cm"}, {"no": "Skift språk", "en": "Change language"}, - {"no": "Kart resultater", "en": "Map results"}, + {"no": "Kart og Resultater", "en": "Map results"}, {"no": "Om oss", "en": "ABOUT"}, {"no": "Last ned resultater", "en": "Download results"}, {"no": "Areal", "en": "Area"}, @@ -33,7 +33,7 @@ {"no": "Kart med interpolerte torvdybder (cm)", "en": "Map of interpolated peat depths (cm)"}, {"no": "Torvdybde (cm)", "en": "Peat depth (cm)"}, {"no": "Bruksanvisning", "en": "Instructions"}, - {"no": "carbonviewer-resultater-", "en": "carbonviewer-results-"}, + {"no": "carbonviewer_resultater_", "en": "carbonviewer_results_"}, {"no":"kart_torvdybder.png", "en": "map_peat_depths.png"}, {"no": "raster_interpolerte_torvdybder.tif", "en": "raster_interpolated_peat_depths.tif"}, {"no": "kart_over_omradet.png", "en": "map_study_area.png"}, From bed2a21e5ed736b5175c5fa7b8aac4ed535feee3 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Wed, 29 May 2024 10:59:18 +0200 Subject: [PATCH 16/17] update README.md --- README.md | 172 ++++++++++++++++++++++++------------------------------ 1 file changed, 76 insertions(+), 96 deletions(-) diff --git a/README.md b/README.md index 36780c7..878bb8f 100755 --- a/README.md +++ b/README.md @@ -1,150 +1,130 @@

CarbonViewer

-

A calculator for peatland volume and carbon stock to support area planners and decision makers .

+

A calculator for peatland volume and carbon stock to support area planners and decision makers.

-![MIT License][license-badge] +![CC BY-NC-SA 4.0][license-badge] [![DOI](https://zenodo.org/badge/554694482.svg)](https://zenodo.org/badge/latestdoi/554694482) -[license-badge]: https://badgen.net/badge/License/MIT +[license-badge]: https://badgen.net/badge/License/CC-BY-NC-SA%204.0/green **NOTE**: The application supports both the English and Norwegian language. To change the language, click on the `Change language` box and choose `en` for English or `no` for Norwegian. -**MERK**: Applikasjonen støtter både engelsk og norsk. For å endre språk, klikk på `Endre språk`-boksen og velg `en` for engelsk eller `no` for norsk. - -Description of CarbonViewer in [English](#what-is-the-carbonviewer) - -Beskrivelse av appen på [Norsk](#hva-er-carbonviewer) - --- -## Hva er CarbonViewer - -**CarbonViewer** er en [R Shiny](https://shiny.rstudio.com/)-applikasjon som beregner og visualiserer karbonmengde i torvlaget for et gitt areal av myr-naturtyper. Kalkulatoren estimerer det totale karboninnholdet bundet opp i organisk jord som kan frigjøres som atmosfærisk karbondioksid (CO2) dersom arealet blir påvirket. Utbygging i myr kan gi høye klimagassutslipp og formålet med kalkulatoren er å gi beslutningstakere et bedre kunnskapsgrunnlag om karbonet som er bundet opp i torv. Kalkulatoren bør brukes i tidlig planlegging og som et verktøy for å kartlegge jordbundet karbon i myr. Dette for å unngå utbygging i karbonrike områder og minimere klimagassutslipp fra naturinngrep. - -## Hvordan bruker jeg denne applikasjonen? - -**Merk at et testdatasett er gitt og det er mulig å laste det inn i applikasjonen ved å klikke på "Test app med testdatasett"** +## What is CarbonViewer? -### Lage kartene +**CarbonViewer** is a [R Shiny](https://shiny.rstudio.com/) application designed to calculate and visualize the amount of carbon stored in a given peatland area. The application estimates the total carbon content in the peat body, which can be used to evaluate the soil carbon storage at any given peatland site and the potential impact land-use change can have on CO2 emission. As drainage of peatland areas results in high greenhouse gas emissions, the aim of this application is to support area planners with an improved knowledge base of the soil carbon stock in peatlands considered for development. The application should be used early in planning as a tool to map soil carbon stocks in peatlands, and hence, to avoid, reduce or mitigate the impact of development in peatlands areas. -**Etter å ha fulgt alle trinnene beskrevet nedenfor, klikk på fanen `Resultater` for å visualisere resultatene** +## How to use CarbonViewer? -- I menyen 'volumberegning' må brukeren laste opp en 'zip'-fil som inneholder både en 'shapefil' som avgrenser det aktuelle området og en 'csv'-fil med torvdybder (m), samt koordinater (gitt i UTM 32 N, EPSG:25832) for hvert prøvepunkt tatt i det aktuelle området. En mål for notering av torvdybder vises nedenfor. Torvdybder bør- for best mulig resultat - bli tatt med regelmessige intervaller med maksimum avstand på 20m mellom hvert punkt (for mindre myrarealer bør en avstand på mindre enn 20m benyttes). -**Riktig mål for .csv filen** +### 1. Import Data -
+Upload a zip-file containing a shapefile of the study area and a csv-file with peat depth measurements in cm from the same area. Ensure that the X and Y coordinates of the peat depths measurements in the csv-file match the coordinate system of the shapefile. All coordinate systems are supported, but note that the application converts the data to ETRS89 UTM Zone 33N for the calculations. +***User Action:** Click on Upload Data. Drag and drop or browse for the zip-file containing the shapefile and csv-file.* +- *The shapefile must include the following files: .shp, .shx, .dbf, and .prj.* +- *The csv-file must include the following columns: X, Y, and peat_depth_cm.* -| X       | Y       | Dybde | -|---------|----------|--------------| -| X1 | Y1 | 1.2 | -| X2 | Y2 | 1.2 | -| X3 | Y3 | 2.7 | -| X4 | Y4 | 2.7 | -| X5 | Y5 | 3.2 | +**Folder structure:** +```{text} +/dataset.zip +├── peat_depth_samples.csv +├── study_area.dbf +├── study_area.prj +├── study_area.shp +└── study_area.shx +``` -
-- Brukeren kan deretter klikke pÃ¥ `Last in datasett`. Etter noen sekunder vil applikasjonen interpolere dybdene til hele interesseomrÃ¥det. et kart over det gitte omrÃ¥det med svarte punkter som indikerer hvor torvdybden er mÃ¥lt, og et kart over de interpolerte torvdybdene skal vises. **Merk** at en fremdriftslinje vises nederst til høyre i applikasjonen. +**Example of correct format for the .csv file:** +| X      | Y      | peat_depth_cm | +|-----------------------|-----------------------|---------------| +| X1 | Y1 | 120 | +| X2 | Y2 | 120 | +| X3 | Y3 | 270 | +| X4 | Y4 | 270 | +| X5 | Y5 | 320 | -- Etter at volumberegningen er utført, skal estimert totalvolum torv (m3) ogsÃ¥ vises pÃ¥ topppanelet. +### 2. Calculate Peat Volume -### Beregning av total karbonmengde i omrÃ¥det +The total volume of peat in the study area is calculated by interpolating the peat depth measurements using Inverse Distance Weighting (IDW) (see [Peat Depth Interpolation](#peat-depth-interpolation)). **Note that a test dataset is provided to test the calculations: “Calculate with testdataâ€.** -Det siste trinnet beregner den totale karbonmengden i det aktuelle omrÃ¥det. Brukeren kan legge inn egne data med torvegenskaper dersom dette er tilgjengelig. Alternativt velger brukeren Ã¥ benytte data for karboninnhold fra en innebygd database. NÃ¥r du klikker pÃ¥ `Torvegenskaper`, tilbys de to alternativene: +This step results in: +- A map with points representing the location of the peat depth measurements in the field *(see Map results tab).* +- A map displaying a raster (*1x1 m*) with the interpolated peat depths *(see Map results tab).* +- A value for the study area (*m2*) and the total volume of peat (*m3*) in the study area *(see Map results tab).* +- Graphs showing the influence of the power parameter on the interpolation results *(see Power evaluation graphs tab).* -- 1) `Standardverdier`: NÃ¥r dette alternativet er valgt, trenger brukeren kun Ã¥ velge myrtype for omrÃ¥det. Her vil brukeren fÃ¥ flere alternative detaljnivÃ¥er for myrtype, gitt den kunnskapen som brukeren innehar om det angitte omrÃ¥det. Beregningen av karbonmengden baseres pÃ¥ eksisterende data for **massetetthet**, og **andel organisk materiale** for oppgitt myrtype, samt standardverdi pÃ¥ 0.5 for **andel karboninnhold i organisk materiale** (se artikkel for kilder). +***User Action:** Click on Load dataset. Wait for the progress bar to finish. View the results in the Map results and Power evaluation graphs tabs. **Optional**: Customize the Power parameter in the Map Results tab.* -- 2) `Egendefinerte verdier`: Dette alternativet forutsetter at brukeren kjenner verdiene for **massetetthet** (i g/cm3 eller tonn/m3, vanligvis mindre enn 0.2 for myr), **andel organisk materiale** (verdi 0-1) og **andel karboninnhold i organisk materiale** (verdi 0-1) i det aktuelle omrÃ¥det eller ønsker Ã¥ teste datasettet med egne inngangsverdier. Her er det mulig Ã¥ legge inn egne tall. NÃ¥r tallene er lagt inn, kan brukeren klikke pÃ¥ "Last inn verdier". +### 3. Calculate the Carbon Content -Den totale karbonmengden (kg) i omrÃ¥det vises øverst til høyre i applikasjonen. - -### Last ned dataene - -NÃ¥r volumet er beregnet, er det mulig Ã¥ laste ned kartfigurer. Videre vil resultater fra karbonberegningen bli tilgjengelig ved neste steg i kalkulatoren. -I applikasjonen kan brukeren klikke pÃ¥ `Last ned resultater` og `Last ned`. Dette vil returnere en `.zip`-fil som inneholder: - -- `map_descriptive.png` : et kart over omrÃ¥det med punkter for dybdemÃ¥l. -- `map_interpolation.png` : et kart med interpolerte torvdybder. -- `interpolation_raster.tif` : et raster av resultatet fra volumberegningen - klar til bruk i enten **QGIS eller ArcGIS!** -- `results.csv` : en csv-fil med resultater fra volum- og karbonberegningene. - ---- +The **Total Carbon Content** is calculated by multiplying the Soil Organic Carbon (SOC) with the total volume of peat in the study area. The SOC is calculated using the peat properties Bulk Density (BD), Soil Organic Matter (SOM), and the Carbon content fraction (see [Carbon Content Caluclation](#carbon-content-calculation)). The application allows the user to either choose **default** values for the peat properties or **customize** the values. The **default** values are based on a [Database](https://github.com/NINAnor/carbonviewer/blob/main/data/gran_dataset.csv) of peat properties from Norwegian mires, and a set value of 0.5 for the fraction of carbon content in organic matter. If the user chooses to **customize** the values, it is required to know the values of bulk density (in g/cm3 or tonne/m3, commonly less than 0.2 for peatlands), organic matter fraction (SOM) and carbon content fraction for the study area (typically 0.5). -## What is the CarbonViewer +This step results in a value for the **mean** and **standard deviation** of the total carbon content in the study area *(tons C)* displayed in the Map results tab. -**CarbonViewer** is a [R Shiny](https://shiny.rstudio.com/) application designed to calculate and visualize the amount of carbon stored in a given peatland area. -The application estimates the total carbon content in the peat body, which can be used to evaluate the soil carbon storage at any given peatland site and the potential impact land-use change can have on CO2 emission. As development in peatland areas may give cause to high greenhouse gas emissions, the aim of this application is to support area planners with an improved knowledge base of the soil carbon in potentially impacted areas. The application should be applied during early planning phases as a tool to map soil carbon stocks in peatlands, to avoid, reduce or mitigate the impact of development in peatlands areas. +***User Action:** Click on Carbon content calculation. Choose between Default values or Custom values for the peat properties. Click on Load values. View the results in the Map results tab.* -## How to use this application? +- *Default values: Choose the peatland type of the area. Click on Load values.* +- *Custom values: Insert the values of Bulk Density (in g/cm3 or tonne/m3), Soil Organic Matter fraction (values of 0-1), and the fraction of carbon content in organic matter (values of 0-1) in the given area. Click on Load values.* -**Note that a test dataset is provided and that is is possible to load it in the application by clicking on "Test app with test dataset"** +### 4. Export Results -### Creating the maps +The results of the volume and carbon calculations can be exported as a zip-file. -**After following all the steps described below, please click on the `Results` tab to vizualise the results** +The zip-file contains the following files: -- In the menu 'Volume calculation' the user must upload a `zip` file containing both a `shapefile` with the extent of the area of interest and a `csv` file containing peat depth measures (in m) taken at the site with coordinates for each measure (given in UTM 32 N, EPSG:25832). An example template for notation of peat depths is provided below. Peat depth measurements should -for best results- be taken at regular intervals at a maximum distance of 20m between each sample point (if a small peatland area are sampled, less than 20m is needed). - -**Example of correct format for the .csv file** - - -
- -
- - -| X       | Y       | Dybde | -|---------|----------|--------------| -| X1 | Y1 | 1.2 | -| X2 | Y2 | 1.2 | -| X3 | Y3 | 2.7 | -| X4 | Y4 | 2.7 | -| X5 | Y5 | 3.2 | - - -
- -
+```{text} +/Downloads/carbonviewer-results-date.zip +├── carbonviewer_results.csv +├── carbonviewer_results.txt +├── map_study_area.png +├── map_peat_depths.png +└── raster_interpolated_peat_depths.tif +``` +***User Action:** Click on Download results > Download.* +--- -- The user can then click on `Load dataset`. After a few seconds the application will interpolate the depths of the entire area of interest. a map of the given area with black points indicating where peat depth have been measured, and a map of the interpolated peat depths should be displayed. **Note** that a progress bar is displayed on the bottom right of the application. +## Overview of Methods -- After the volume calculation is done the estimated total volume of peat (m3) should also appear on the top panel. +A brief overview of the methods used in the application is provided below. For a more detailed description, please refer to Kyrkjeeide, M. O. et al. (2023). -### Calculating the carbon content of the area +### Peat Depth Interpolation +The peat depth measurements from field survey (*csv-file*) are extrapolated to the entire study area extent (*shp-file*) using Inverse Distance Weighting (IDW). IDW assumes that nearby observations are more alike than those further away. For instance, a peat measurement taken at a 10 *m* distance has a greater influence on the estimated value of a raster pixel cell than a measurement taken at a 50 *m* distance. The degree of this influence is controlled by the power parameter. A power of 1 assigns an equal weight to all points, resulting in a smoother interpolated raster. Increasing the power value reduces the influence of distant sample points on the estimated value. -The final step lies in calculating the carbon content of the given area. When clicking on `Peat properties`, two options are offered to the user: +**Optimal value of the Power parameter:** -- 1) `Default values`: Using this option, the user choose the peatland type of the area. The calculation of the carbon content will then be done using a database of peat properties from Norwegian mires, that contain values for **bulk density** and **fraction organic matter** representing the chosen peatland type, and a set value of 0.5 for **fraction of carbon content in organic matter** (see paper for references). +The application identifies the optimal power parameter using a cross-validation approach, comparing the results of an IDW interpolation method with those of a Kriging interpolation method. The power parameter is varied between 1 and 6, and the Mean Absolute Error (MAE) is calculated for each value. The power parameter with the lowest MAE is chosen as the default value. You can also choose to use a custom value for the power parameter by sliding the bar in the "Map Result" Section. The influence of the power on the results is shown in the graphs located in "Power Evaluation Graphs" section. -- 2) `Custom values`: This option requires that the user knows the values of **bulk density** (in g/cm3 or tonne/m3, commonly less than 0.2 for peatlands), **fraction organic matter** (values of 0-1) and **fraction carbon content** (values of 0-1) in the given area, or that the user is interested in testing with specific values. The input values are specified in the three boxes. Once the values are inserted, the user can click on `Load values`. +### Carbon Content Calculation -The total carbon content (kg) of the area will be displayed on the top right panel of this application. +The **Total Carbon Content (TCC)** of the study area is calculated by multiplying the SOC with the total volume of peat in the study area, where the SOC is calculated using the peat properties Bulk Density (BD), Soil Organic Matter (SOM), and the SOM:SOC conversion factor. -### Download the data +TCC = SOC * v -Once the peat volum map is computed, it is possible to download the output maps. The results from the carbon calculation will also be available by completing the next step in the calculator. -In the application, the user can click on `Download results` and `Download`. This will return a `.zip` file containing: +where: +- **SOC** = BD * SOM * 0.5 +- **v** = peat volume (m3) calculated by the interpolation of peat depth measurements +- **BD** = dry Bulk Density (t m−3 or g cm−3) +- **SOM** = Soil Organic Matter fraction +- **0.5** = SOM:SOC conversion factor, value can range from 0 to 1, but the default value is set to 0.5 -- `map_descriptive.png` : a map of the given area including peat depth measurement points. -- `map_interpolation.png` : a map with interpolated values of peat depths. -- `interpolation_raster.tif` : a raster of the result from the interpolation of volume - ready to use in either **QGIS or ArcGIS!** -- `results.csv` : a csv-file with results from the volume and carbon calculations. +The peat volume of the study area is calculated by the interpolation of the peat depth measurements (Step 2). The other peat properties, **Bulk Density**, **Soil Organic Matter fraction**, and the SOM:SOC conversion factor, are either set to default values or can be customized by the user (Step 3). --- -### Author / Forfatter +### Author The application has been created by [Benjamin Cretois](https://www.nina.no/english/Contact/Employees/Employee-info?AnsattID=15849), [Marte Fandrem](https://www.ntnu.no/ansatte/marte.fandrem) and [Magni Olsen Kyrkjeeide](https://www.nina.no/Kontakt/Ansatte/Ansattinformasjon.aspx?AnsattID=12110). This project was funded by Norwegian Research Council under Grant number 282327 and Statnett. -drawing -drawing -drawing +drawing +drawing +drawing ### How to cite us: -Kyrkjeeide, M. O., Fandrem, M., Kolstad, A. L., Bartlett, J., Cretois, B., & Silvennoinen, H. M. (2023). A calculator for local peatland volume and carbon stock to support area planners and decision makers. Carbon Management, 14(1), 2267018. +Kyrkjeeide, M. O., Fandrem, M., Kolstad, A. L., Bartlett, J., Cretois, B., & Silvennoinen, H. M. (2023). A calculator for local peatland volume and carbon stock to support area planners and decision makers. Carbon Management, 14(1), 2267018. \ No newline at end of file From 7a0f7e0684e3eb296ae2c0aba6ea7c2cbd93c241 Mon Sep 17 00:00:00 2001 From: "Willeke A'Campo (linux vdi)" Date: Wed, 29 May 2024 11:01:20 +0200 Subject: [PATCH 17/17] update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 878bb8f..25ad525 100755 --- a/README.md +++ b/README.md @@ -120,9 +120,9 @@ The peat volume of the study area is calculated by the interpolation of the peat The application has been created by [Benjamin Cretois](https://www.nina.no/english/Contact/Employees/Employee-info?AnsattID=15849), [Marte Fandrem](https://www.ntnu.no/ansatte/marte.fandrem) and [Magni Olsen Kyrkjeeide](https://www.nina.no/Kontakt/Ansatte/Ansattinformasjon.aspx?AnsattID=12110). This project was funded by Norwegian Research Council under Grant number 282327 and Statnett. -drawing -drawing -drawing +drawing +drawing +drawing ### How to cite us: