Style Anpassungen und Pfade geändert

This commit is contained in:
Linsberger Christian 2021-09-02 11:08:10 +02:00
commit 3e372f3cb6
2 changed files with 45 additions and 44 deletions

View file

@ -5,10 +5,10 @@ library("stringi")
read_current_geoera_lit_db <- function() {
## http verwenden - https funktioniert nicht ##
endpoint = "http://resource.geolba.ac.at/PoolParty/sparql/geoera"
## http verwenden - https funktioniert nicht ##
endpoint = "http://resource.geolba.ac.at/PoolParty/sparql/geoera"
query =
query <-
"PREFIX skos:<http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms:<http://purl.org/dc/terms/>
select *
@ -21,18 +21,18 @@ order by ?L
"
qd <- SPARQL(endpoint,query)
qd <- SPARQL(endpoint, query)
inDB <- qd$results
for(j in 1:length(inDB[1,])){
for (j in 1:length (inDB[1, ])) {
for(i in 1:length(inDB[,j])){
Encoding(inDB[i,j]) = "UTF-8"
for (i in 1:length(inDB[, j])) {
Encoding(inDB[i, j]) <- "UTF-8"
}
}
pfad = paste("inDB-",format(Sys.Date(), "%Y_%m_%d"),".xlsx", sep="")
pfad <- paste("data/inDB-", format(Sys.Date(), "%Y_%m_%d"), ".xlsx", sep="")
write_xlsx(inDB, pfad)
@ -41,12 +41,13 @@ write_xlsx(inDB, pfad)
get_current_geoera_lit_db <- function() {
pfad = paste("inDB-",format(Sys.Date(), "%Y_%m_%d"),".xlsx", sep="")
pfad <- paste("data/inDB-", format(Sys.Date(), "%Y_%m_%d"), ".xlsx", sep="")
if(file.exists(pfad)){
inDB = read_excel(pfad)
if (file.exists(pfad)) {
inDB <- read_excel(pfad)
return(inDB)
}
else {
read_current_geoera_lit_db()
@ -55,4 +56,3 @@ get_current_geoera_lit_db <- function() {
}
#a change