2021-10-22 16:34:56 +02:00
|
|
|
---
|
|
|
|
|
title: "Report"
|
|
|
|
|
output: html_document
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
```{r setup, include=FALSE}
|
|
|
|
|
library(ggplot2)
|
|
|
|
|
knitr::opts_chunk$set(echo = TRUE)
|
|
|
|
|
df <- read.csv("../data.csv", header = F)
|
|
|
|
|
colnames(df) <- c("date", "name", "topic", "humidity", "temperature", "presure", "battery", "voltage", "linkquality")
|
|
|
|
|
df$date <- as.POSIXct(df$date)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Humidity
|
|
|
|
|
```{r}
|
|
|
|
|
p_humidity <- ggplot(df, aes(x=date, y=humidity, group=name, color=name)) + geom_line()
|
|
|
|
|
p_humidity
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Temperature
|
|
|
|
|
```{r}
|
|
|
|
|
p_temperature <- ggplot(df, aes(x=date, y=temperature, group=name, color=name)) + geom_line()
|
|
|
|
|
p_temperature
|
|
|
|
|
```
|
|
|
|
|
|
2021-10-22 21:47:15 +02:00
|
|
|
|
|
|
|
|
## Last 30 rows
|
|
|
|
|
```{r}
|
|
|
|
|
most_recent <- tail(df, n=30)
|
|
|
|
|
most_recent <- most_recent[order(rev(most_recent$date)),]
|
|
|
|
|
|
|
|
|
|
knitr::kable(most_recent, row.names = F)
|
|
|
|
|
```
|