From 656b626600db8fa3855d1504badd8dba2c78acb6 Mon Sep 17 00:00:00 2001 From: Ben Varick Date: Sun, 28 Jan 2024 14:50:59 -0600 Subject: [PATCH] edited spanish translations --- laundry_longterm_data_es.Rmd | 2 +- laundry_status.R | 11 ++++++----- laundry_status_es.Rmd | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/laundry_longterm_data_es.Rmd b/laundry_longterm_data_es.Rmd index 72a58d1..3bea9c5 100644 --- a/laundry_longterm_data_es.Rmd +++ b/laundry_longterm_data_es.Rmd @@ -6,7 +6,7 @@ output: in_header: favicon_header.html --- -Actualizado: `r format(Sys.time(), format = "%A %I:%M %p", tz = "America/Chicago")` +Actualizado: `r format(Sys.time(), format = "%d de %B de %Y", tz = "America/Chicago")` Este sitio se actualiza cada día diff --git a/laundry_status.R b/laundry_status.R index a80d07e..40c53c3 100755 --- a/laundry_status.R +++ b/laundry_status.R @@ -180,10 +180,11 @@ update_data <- function(){ fill = NULL) plot_1week_days_es <- ggplot(data = values %>% - filter(as.Date(time, tz = "America/Chicago") == as.Date(end_time, tz = "America/Chicago")) %>% - mutate(date = as.Date(time, tz = "America/Chicago")) %>% - left_join(. , entities, by = join_by(entity_id)) %>% - mutate(name = factor(name_es, levels = c("lavadora", "secadora")))) + + filter(as.Date(time, tz = "America/Chicago") == as.Date(end_time, tz = "America/Chicago")) %>% + mutate(date = as.Date(time, tz = "America/Chicago")) %>% + left_join(. , entities, by = join_by(entity_id)) %>% + mutate(name = factor(name_es, levels = c("lavadora", "secadora"))) %>% + mutate(status = ifelse(status == "on", "encendida", "apagada"))) + geom_rect(aes(xmin = date - hours(8), xmax = date + hours(8), ymin = ymd_hms(paste("2023-01-01", strftime(time, format = "%H:%M:%S"))), @@ -289,7 +290,7 @@ update_longterm_data <- function(){ scale_fill_manual(values = colors$color[2], guide = NULL) + theme(axis.text.x = element_text(angle = 30, vjust = 0.5)) + labs(title = "Tendencias a largo plazo", - subtitle = paste0("datos desde ",strftime(min(values$time), format = "%d de %B de %Y"), " hasta ", strftime(run_time, format = "%d de %B de %Y")), + subtitle = paste0("datos desde el ",strftime(min(values$time), format = "%d de %B de %Y"), " hasta el ", strftime(run_time, format = "%d de %B de %Y")), x = "Día de la semana", y = "Tiempo", alpha = "Frecuencia") diff --git a/laundry_status_es.Rmd b/laundry_status_es.Rmd index 77559cf..e3cc6a8 100644 --- a/laundry_status_es.Rmd +++ b/laundry_status_es.Rmd @@ -6,7 +6,7 @@ output: in_header: favicon_header.html --- -Actualizado: `r format(Sys.time(), format = "%A %I:%M %p", tz = "America/Chicago")` +Actualizado: `r format(Sys.time(), format = "%A a las %H:%M", tz = "America/Chicago")` Este sitio se actualiza cada `r update_interval` minutos