RWEP/SD/20240328_9_课后作业/第8次课后作业_模板.qmd

25 lines
817 B
Plaintext
Raw Normal View History

2024-03-25 21:48:30 +08:00
---
2024-03-28 08:15:02 +08:00
title: 课后作业8
2024-03-25 21:48:30 +08:00
author: 姓名
format: html
---
2024-03-28 12:25:13 +08:00
# 下载airquality.xlsx并读取数据
2024-03-25 21:48:30 +08:00
```{r}
2024-03-28 12:25:13 +08:00
# 下载至临时文件
tmpxlsxpath <- file.path(tempdir(), "airquality.xlsx")
download.file("https://drwater.rcees.ac.cn/git/course/RWEP/raw/branch/PUB/data/airquality.xlsx",
destfile = tmpxlsxpath)
airqualitydf <- readxl::read_xlsx(tmpxlsxpath, sheet = 1)
metadf <- readxl::read_xlsx(tmpxlsxpath, sheet = 2)
2024-03-25 21:48:30 +08:00
```
2024-03-26 16:58:06 +08:00
# 根据`airqualitydf.xlsx`按采样点统计白天8:00-20:00与夜晚20:00-8:00中空气质量指数AQI中位数按城市统计低于所有采样点AQI30%分位值的采样点占比列出上述占比最高的10个城市不考虑采样点数低于5个的城市
2024-03-25 21:48:30 +08:00
2024-03-28 12:25:13 +08:00
2024-03-26 16:58:06 +08:00
# 按照不同城市分组统计白天与夜晚AQI中位数是否具有显著差异。