From b3524e94721a08948911e1c137a5e252438ed412 Mon Sep 17 00:00:00 2001 From: Chris Reudenbach Date: Thu, 5 Sep 2024 02:53:15 +0200 Subject: [PATCH] update --- mc_session/mc3.qmd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mc_session/mc3.qmd b/mc_session/mc3.qmd index 00ad4be..4b4e201 100644 --- a/mc_session/mc3.qmd +++ b/mc_session/mc3.qmd @@ -296,12 +296,12 @@ Please download the data from the repository or take the USB-stick # load packages (if not installed please install) install.packages("remotes") -pkg_list = c("raster","terra","sp","sf","dplyr","lwgeom","readxl","highfrequency","tidyverse","rprojroot","tibble","imputeTS","xts","data.table","mapview","stars","gstat") +pkg_list = c("raster","terra","sp","sf","dplyr","lwgeom","readxl","highfrequency","tidyverse","rprojroot","tibble","imputeTS","xts","data.table","mapview","stars","gstat","tmap") remotes::install_cran(pkg_list) lapply(pkg_list, require, character.only = TRUE) # create a string containing the current working directory -wd=paste0(find_rstudio_root_file(),"/data_2023/") +wd=paste0(find_rstudio_root_file(),"/data_2024/") # define time period to aggregate temp dat time_period = 1 @@ -332,6 +332,7 @@ fn_area =paste0(wd,"plot.shp") cleandata = paste0(wd,"climdata.RDS") ``` + ```{r read_clean_data, message=FALSE, warning=FALSE} # 1 ---- read data ---- # read_sf("data/de_nuts1.gpkg") |> st_transform(crs) -> de @@ -508,7 +509,7 @@ tmap_arrange(tm_interpNN, tm_interpIDW, tm_idw_gstat,tm_vor,tm_krige) # for all time slots -for (var in vars[7:8]){ +for (var in vars[15:18]){ # autofit variogramm for kriging vm.auto = automap::autofitVariogram(formula = as.formula(paste("altitude", "~ 1")), input_data = m) @@ -520,7 +521,7 @@ for (var in vars[7:8]){ vm.auto$var_model) plot(k) # save to geotiff - stars::write_stars(k,paste0(wd,var,"v_interpol.tif"),overwrite=TRUE) + #stars::write_stars(k,paste0(wd,var,"v_interpol.tif"),overwrite=TRUE) }