Commit f40229c7 authored by Emil Bordin's avatar Emil Bordin
Browse files

Weitergearbeitet, aber klappt noch nicht, siehe Fehler in logs

parent 404ac04c
Loading
Loading
Loading
Loading
+2188 −2192

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -23,10 +23,10 @@
"10000-1190882134-S"
"10001-1000104348-S"
"10001-1000014647-S"
"10001-1000014554-S"
"10000-1197845008-S"
"10000-1197849222-S"
"10000-1197844237-S"
"10000-1198068690-S"
"10001-1000014354-S"
"10000-1184450752-S"
"10000-1193572947-S"
"14847-k37015.8278-S"
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+70 −0
Original line number Diff line number Diff line
@@ -836,3 +836,73 @@ Backtrace:

Quitting from lines 7-64 [setup] (template.Rmd)
Execution halted


processing file: template.Rmd
1/2        
2/2 [setup]
Error:
! object 'arbeitsort.koordinaten.lon' not found
Backtrace:
 1. global create_jobs_map(active_jobs)
 3. leaflet::addCircles(...)
 4. leaflet::derivePoints(...)
 5. leaflet:::resolveFormula(lng, data)
 6. base::eval(f[[2]], metaData(data), environment(f))
 7. base::eval(f[[2]], metaData(data), environment(f))

Quitting from lines 7-64 [setup] (template.Rmd)
Execution halted


processing file: template.Rmd
1/2        
2/2 [setup]
output file: template.knit.md

/usr/bin/pandoc +RTS -K512m -RTS template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /home/r-environment/dashboard/dashboard.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpzV4ZaY/rmarkdown-str9a45f5c29e.html 
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'template.knit' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".

Output created: dashboard/dashboard.html


processing file: template.Rmd
1/2        
2/2 [setup]
output file: template.knit.md

/usr/bin/pandoc +RTS -K512m -RTS template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /home/r-environment/dashboard/dashboard.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpRwFUhy/rmarkdown-str15d62068bfd.html 

Output created: dashboard/dashboard.html


processing file: template.Rmd
1/2        
2/2 [setup]
output file: template.knit.md

/usr/bin/pandoc +RTS -K512m -RTS template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /home/r-environment/dashboard/dashboard.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpDJOml8/rmarkdown-str986fb5a999.html 

Output created: dashboard/dashboard.html


processing file: template.Rmd
1/2        
2/2 [setup]
Error in `filter()`:
ℹ In argument: `!is.na(arbeitsort.koordinaten.lon) &
  !is.na(arbeitsort.koordinaten.lat)`.
Caused by error:
! object 'arbeitsort.koordinaten.lon' not found
Backtrace:
 1. global create_jobs_map(active_jobs)
 4. dplyr:::filter.data.frame(., !is.na(arbeitsort.koordinaten.lon) & !is.na(arbeitsort.koordinaten.lat))
 5. dplyr:::filter_rows(.data, dots, by)
 6. dplyr:::filter_eval(...)
 8. mask$eval_all_filter(dots, env_filter)
 9. dplyr (local) eval()

Quitting from lines 7-68 [setup] (template.Rmd)
Execution halted
+16 −2
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@ library("jsonlite")
library("lubridate")
library("readr")
library("leaflet")
library("rmarkdown")
library("fs")

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# HELPER FUNCTIONS ----
@@ -267,6 +269,10 @@ get_active_jobs_by_date <- function(folder, date) {

# Funktion zur Erstellung der Karte mit den Jobstandorten
create_jobs_map <- function(active_jobs) {
  # Filtere Zeilen mit NA-Werten in den Koordinatenspalten heraus
  active_jobs <- active_jobs %>%
    filter(!is.na(arbeitsort.koordinaten.lon) & !is.na(arbeitsort.koordinaten.lat))
  
  leaflet(active_jobs) %>%
    addTiles() %>%
    addCircles(
@@ -296,7 +302,15 @@ jobs_map <- create_jobs_map(active_jobs)
# 10 neueste Jobs abrufen
recent_jobs <- most_recent10(active_jobs)

# Print recent jobs
print(recent_jobs)
# Rendern der RMarkdown Datei
rmd_file <- "/home/r-environment/template.Rmd"
output_file <- "/home/r-environment/dashboard.html"
render(input = rmd_file, output_file = output_file, output_format = "html_document")

# Verzeichnis erstellen, falls es nicht existiert
dir_create("/usr/share/nginx/html")

# Verschieben der HTML Datei zum Nginx Verzeichnis
file_copy(output_file, "/usr/share/nginx/html/dashboard.html", overwrite = TRUE)

Loading