Utilicé los siguientes datos:
Date | Sector | CH4 |
---|---|---|
17/12/22 14:00 | Capuli | 4.215823529 |
17/12/22 16:00 | Capuli | 1.978485714 |
18/12/22 12:00 | Capuli | 2.674290323 |
18/12/22 14:00 | Capuli | 2.376083333 |
18/12/22 16:00 | Capuli | 4.618833333 |
18/12/22 18:00 | Capuli | 4.140970455 |
19/12/22 12:00 | Capuli | 4.1885 |
19/12/22 18:00 | Capuli | 4.08795 |
20/12/22 08:00 | Capuli | 2.803439171 |
20/12/22 10:00 | Capuli | 4.83355 |
20/12/22 12:00 | Capuli | 4.250918182 |
20/12/22 14:00 | Capuli | 4.8715 |
20/12/22 16:00 | Capuli | 5.6434 |
21/12/22 08:00 | Capuli | 7.192572727 |
21/12/22 10:00 | Capuli | 7.366627273 |
21/12/22 14:00 | Capuli | 6.973924138 |
21/12/22 16:00 | Capuli | 7.211654545 |
22/12/22 08:00 | Capuli | 4.23723913 |
22/12/22 10:00 | Capuli | 1.864188172 |
22/12/22 12:00 | Capuli | 7.283677778 |
22/12/22 14:00 | Capuli | 6.664268539 |
22/12/22 16:00 | Capuli | 1.655128125 |
17/1/23 12:00 | Capuli | 0.61686747 |
17/1/23 14:00 | Capuli | 0.189431818 |
17/1/23 16:00 | Capuli | 0.144 |
18/1/23 10:00 | Capuli | 1.505540541 |
18/1/23 12:00 | Capuli | 1.134382022 |
18/1/23 14:00 | Capuli | 1.152988506 |
18/1/23 16:00 | Capuli | 0.816271186 |
19/1/23 16:00 | Capuli | 1.703 |
23/12/22 10:00 | Punzara | 1.1749 |
23/12/22 12:00 | Punzara | 1.226269231 |
13/1/23 10:00 | Punzara | 1.620357143 |
13/1/23 12:00 | Punzara | 1.533863636 |
13/1/23 14:00 | Punzara | 1.496582278 |
13/1/23 16:00 | Punzara | 0.729692308 |
14/1/23 10:00 | Punzara | 0.137931034 |
14/1/23 12:00 | Punzara | 0.151363636 |
14/1/23 14:00 | Punzara | 0.2375 |
14/1/23 16:00 | Punzara | 0.146521739 |
15/1/23 10:00 | Punzara | 0.108461538 |
15/1/23 12:00 | Punzara | 0.124038462 |
15/1/23 14:00 | Punzara | 0.0921875 |
15/1/23 16:00 | Punzara | 0.118846154 |
la estructura de datos es la siguiente:
* str(df1) | |
---|---|
$'data.frame':44 obs. of 12 variables: | |
$ Date : POSIXct, format: "0022-12-17 14:00:00" ... | |
$ Sector : chr "Capuli" "Capuli" "Capuli" "Capuli" ... | |
$ CH4 : num 4.221.98 2.67 2.38 4.62 ... | |
$ CO2 : num 255 224 449 430 356 ... | |
$ N2O : num 0.132 0.148 0.184 0.203 0.211 ... | |
$ Humedad : num 57.7 57 80.6 82.4 88.5 ... | |
$ Temperatura: num 21.6 21.1 22.3 22.1 19.1 ... | |
$ MO : num 8.11 8.11 8.11 8.11 8.11 8.11 ... | |
$ Dr : num 2.3 2.3 2.3 2.3 2.3 2.3 2.3 ... | |
$ Po : num 43.5 43.5 43.5 43.5 43.5 ... | |
$ N : num 0.41 0.41 0.41 0.41 0.41 0.41 ...* |
El siguiente es el código usado para la gráfica:
df1 %>%
ggplot(aes(x = Date, y = CH4, color = Sector)) +
geom_line() +
scale_y_continuous()+
labs(title="Emisiones de GEI intervalo 2H",hjust = 0.5,
subtitle = "Flujos de suelos ganaderos en ppm",
tag = "A",
caption="Fuente: Elaboración propia 2023") +
xlab("Horas") +
ylab("Concentración (ppm)")+
theme(plot.title = element_text(hjust = 0.5))+
facet_wrap(~Sector)
La gráfica a continuación no muestra los datos en horas. Muchas gracias por su tiempo y ayuda.
geom_line
¿Qué es exactamente lo que buscas?