24 lines
474 B
Plaintext
24 lines
474 B
Plaintext
|
---
|
||
|
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")
|
||
|
}
|
||
|
```
|
||
|
|