From bf7fd58cab3b75b9cddedc3ca60fcd88690fadf8 Mon Sep 17 00:00:00 2001 From: Miha Date: Fri, 22 Oct 2021 12:15:24 +0200 Subject: [PATCH 1/8] Nijz popravki --- admin/survey/modules/mod_NIJZ/R/Nijz_report.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R index 261c74b55..9e6972e5a 100644 --- a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R +++ b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R @@ -39,7 +39,7 @@ lxTranslate <- function(x, color = "NE", pisava = TRUE) { x <- gsub("%", "\\\\\\\\%", x) #x <- gsub("…", "\\\\\\\\dots", x) - x <- gsub("…", "...", x) + x <- gsub("…", "\\\\\\\\ldots", x) # ALI BNARVAMO? @@ -345,7 +345,7 @@ colnames(mydf) <- labels #par(col="#004078", font = 2, cex = 1.4) -par(col="#004078", font = 2, cex = 0.8, xpd = TRUE) +par(col="#004078", font = 2, cex = 1.1, xpd = TRUE) # Plot a radar chart radarchart2( mydf, @@ -360,9 +360,9 @@ radarchart2( na.itp = FALSE, plwd = 3, plty = 1, - seg = 7, + seg = 4, axistype = 1, - caxislabels = 0:7, + caxislabels = 0:4, centerzero = TRUE ) From 9e091482edcc149305a1a6ae8901fe66dcd4a8ec Mon Sep 17 00:00:00 2001 From: Miha Date: Fri, 22 Oct 2021 12:19:04 +0200 Subject: [PATCH 2/8] Simbol NIJZ --- admin/survey/modules/mod_NIJZ/R/Nijz_report.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R index 9e6972e5a..1f17c5c00 100644 --- a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R +++ b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R @@ -39,7 +39,9 @@ lxTranslate <- function(x, color = "NE", pisava = TRUE) { x <- gsub("%", "\\\\\\\\%", x) #x <- gsub("…", "\\\\\\\\dots", x) - x <- gsub("…", "\\\\\\\\ldots", x) + x <- gsub("…", "\\\\ldots", x) + + x <- gsub("…", ". . .", x) # ALI BNARVAMO? From 5002b02d9c83ef24d1e38ac4226e66c46ff2171b Mon Sep 17 00:00:00 2001 From: Miha Date: Fri, 22 Oct 2021 12:24:56 +0200 Subject: [PATCH 3/8] Popravek simoblov v tekstu in slike NIJZ --- admin/survey/modules/mod_NIJZ/R/Nijz_report.R | 6 +++--- admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R index 1f17c5c00..f5c705206 100644 --- a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R +++ b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R @@ -39,9 +39,9 @@ lxTranslate <- function(x, color = "NE", pisava = TRUE) { x <- gsub("%", "\\\\\\\\%", x) #x <- gsub("…", "\\\\\\\\dots", x) - x <- gsub("…", "\\\\ldots", x) + #x <- gsub("…", "", x) + - x <- gsub("…", ". . .", x) # ALI BNARVAMO? @@ -347,7 +347,7 @@ colnames(mydf) <- labels #par(col="#004078", font = 2, cex = 1.4) -par(col="#004078", font = 2, cex = 1.1, xpd = TRUE) +par(col="#004078", font = 2, cex = 1.2, xpd = TRUE) # Plot a radar chart radarchart2( mydf, diff --git a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex index eefe33251..0ae3cc8d7 100644 --- a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex +++ b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex @@ -60,7 +60,7 @@ \begin{minipage}[t]{0.54\textwidth} \begin{figure}[H] \vspace*{-0.5cm} -\efbox{\includegraphics[width=10cm,height=8.1cm]{../results/img/radar.png}} +\efbox{\includegraphics[width=10cm,height=7.5cm]{../results/img/radar.png}} \end{figure} \end{minipage} \end{titlepage} From dcb772b006740eec67e08cef8d47f93334ed3303 Mon Sep 17 00:00:00 2001 From: Miha Date: Fri, 22 Oct 2021 12:29:18 +0200 Subject: [PATCH 4/8] =?UTF-8?q?Graf=20zmanj=C5=A1anje=20razmika?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex index 0ae3cc8d7..4c58778e1 100644 --- a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex +++ b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex @@ -59,7 +59,7 @@ %second column \begin{minipage}[t]{0.54\textwidth} \begin{figure}[H] - \vspace*{-0.5cm} + \efbox{\includegraphics[width=10cm,height=7.5cm]{../results/img/radar.png}} \end{figure} \end{minipage} From 11a96c7d768dcd4470a8e5538c9d48225dcd451e Mon Sep 17 00:00:00 2001 From: Miha Date: Fri, 22 Oct 2021 12:31:11 +0200 Subject: [PATCH 5/8] / --- admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex index 4c58778e1..6a80292a3 100644 --- a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex +++ b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex @@ -59,7 +59,7 @@ %second column \begin{minipage}[t]{0.54\textwidth} \begin{figure}[H] - + \vspace*{-1cm} \efbox{\includegraphics[width=10cm,height=7.5cm]{../results/img/radar.png}} \end{figure} \end{minipage} From 251b54e057d6f8e4e6b7c734c18d975d0b3bf5b6 Mon Sep 17 00:00:00 2001 From: Miha Date: Fri, 22 Oct 2021 12:32:35 +0200 Subject: [PATCH 6/8] Pomaknjen naslov poleg radarja --- admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex index 6a80292a3..08fe57791 100644 --- a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex +++ b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex @@ -49,7 +49,7 @@ \textbf{1. Moj FOTOTIP KOŽE:} \newline \newline !varianta! -\ \\ \\ \\ \\ +\ \\ \\ \\ \begin{minipage}[t]{0.40\textwidth} \textbf{2. POLARNI GRAFIKON} \newline \hspace*{0.5cm}- grafični prikaz mojega dosedanjega \\ From c92026ccf28e66ad315fab3c9d0bdd4942e39ce8 Mon Sep 17 00:00:00 2001 From: Miha Date: Fri, 22 Oct 2021 12:34:00 +0200 Subject: [PATCH 7/8] Radar --- admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex index 08fe57791..4d2821010 100644 --- a/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex +++ b/admin/survey/modules/mod_NIJZ/latexkosi/glava-nijz.tex @@ -59,7 +59,7 @@ %second column \begin{minipage}[t]{0.54\textwidth} \begin{figure}[H] - \vspace*{-1cm} + \vspace*{-0.5cm} \efbox{\includegraphics[width=10cm,height=7.5cm]{../results/img/radar.png}} \end{figure} \end{minipage} From 87d5648b0d6999a142f02e5700e53b96643f4b50 Mon Sep 17 00:00:00 2001 From: Miha Date: Fri, 22 Oct 2021 13:40:38 +0200 Subject: [PATCH 8/8] Nijz popravki izrisa radar grafa in teksta --- admin/survey/modules/mod_NIJZ/R/Nijz_report.R | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R index f5c705206..a6687a6ee 100644 --- a/admin/survey/modules/mod_NIJZ/R/Nijz_report.R +++ b/admin/survey/modules/mod_NIJZ/R/Nijz_report.R @@ -26,7 +26,7 @@ ID <- params[1] #-------------------------- USER DEFINED FUNCTION ---------------------# # Za potrebe pravilnega prikaza teksta v posameznih poglavjih -lxTranslate <- function(x, color = "NE", pisava = TRUE) { +lxTranslate <- function(x, color = "NE", pisava = TRUE, pikaklicaj = FALSE) { x <- gsub("", "\\\\\\\\textbf{", x) x <- gsub("", "}", x) x <- @@ -49,8 +49,12 @@ lxTranslate <- function(x, color = "NE", pisava = TRUE) { # Update, Potem pa želi NIJZ, da se prvi odstavek # vedno obarva z "zeleno barvo, zaot moramo to # utrezno ločiti + if (pikaklicaj == FALSE) { obarvajX <- stringr::str_extract(x, "[^.|!]+") - + } else { + obarvajX <- stringr::str_extract(x, "[^!]+") + + } # DOdamo barvanje obarvajX_1 <- paste0("{\\\\color{zelena}", obarvajX, "}") # Nadomestimo @@ -58,14 +62,17 @@ lxTranslate <- function(x, color = "NE", pisava = TRUE) { } if (pisava == TRUE) { val <- strsplit(x, "\\\\newline ")[[1]] - - # Gledamo tretji + # val <- val[!c(seq_along(val) %% 2 == 0)] + # Gledamo tretji odst <- val[4:length(val)] # Po drugem odstavku zmanjšamo pisavo na 9 - xsmall <- paste0("\\\\begin{footnotesize}", stringr::str_c(odst, collapse = "\\\\newline "), "\\\\end{footnotesize}") + xsmall <- paste0("\\\\begin{footnotesize}", stringr::str_c(odst, collapse = "\\\\smallskip "), "\\\\end{footnotesize}") x <- paste0(stringr::str_c(val[1:4], collapse = "\\\\newline "),xsmall) + + #x <- gsub("\\\\\\newline \\\\\\begin{footnotesize} ", "sd", x, fixed = T) + } return(x) } @@ -108,8 +115,8 @@ library(dplyr) data <- read.csv2(paste0( "modules/mod_NIJZ/temp/nijz_",ID,".csv"), sep = ";", - header = T, - fill = T, + header = FALSE, + fill = TRUE, stringsAsFactors = FALSE, encoding = "UTF-8" ) @@ -400,7 +407,7 @@ oblacila <- lxTranslate(oblacila, color = "DA") #------------------------ Poletni urnik za izvajanje aktivnosti na prostem ------------------------# solarij <- data %>% filter(str_detect(V1, "SOLARIJ")) %>% select(V2) -solarij <- lxTranslate(solarij, color = "DA") +solarij <- lxTranslate(solarij, color = "DA", pikaklicaj = TRUE) #---