RWEP/data/main.qmd

24 lines
474 B
Plaintext
Raw Normal View History

2024-03-21 00:18:31 +08:00
---
title: 数据分析
---
```{r}
#| echo: false
#| execute: false
if (FALSE) {
require(cctdb)
require(tidyverse)
conn <- cctdb::get_dbconn("nationalairquality")
metadf <- tbl(conn, "metadf") |>
collect()
airqualitydf <- tbl(conn, "airqualitydf") |>
filter(datetime > "2024-03-18") |>
filter(datetime < "2024-03-20") |>
collect()
writexl::write_xlsx(list(metadf = metadf,
airqualitydf = airqualitydf),
"../data/airquality.xlsx")
}
```