merge main
This commit is contained in:
parent
07e0b5a49c
commit
437ad3553d
|
@ -0,0 +1,153 @@
|
|||
---
|
||||
title: "〇、R语言实践前篇"
|
||||
subtitle: 《区域水环境污染数据分析实践》<br>Data analysis practice of regional water environment pollution
|
||||
author: 苏命、王为东<br>中国科学院大学资源与环境学院<br>中国科学院生态环境研究中心
|
||||
date: today
|
||||
lang: zh
|
||||
format:
|
||||
revealjs:
|
||||
theme: dark
|
||||
slide-number: true
|
||||
chalkboard:
|
||||
buttons: true
|
||||
preview-links: auto
|
||||
lang: zh
|
||||
toc: true
|
||||
toc-depth: 1
|
||||
toc-title: 大纲
|
||||
logo: ./_extensions/inst/img/ucaslogo.png
|
||||
css: ./_extensions/inst/css/revealjs.css
|
||||
pointer:
|
||||
key: "p"
|
||||
color: "#32cd32"
|
||||
pointerSize: 18
|
||||
revealjs-plugins:
|
||||
- pointer
|
||||
filters:
|
||||
- d2
|
||||
---
|
||||
|
||||
```{r}
|
||||
#| include: false
|
||||
#| cache: false
|
||||
lang <- "cn"
|
||||
require(tidyverse)
|
||||
knitr::opts_chunk$set(echo = TRUE)
|
||||
```
|
||||
|
||||
## R语言实践部分课程简介
|
||||
|
||||
**接下来的课程由我来带着大家一起学习、实践基于R语言的数据分析。**
|
||||
|
||||
### 自我介绍
|
||||
|
||||
- 苏命:来自中国科学院生态环境研究中心
|
||||
- 主要从事**水源水质水生态**方面的研究
|
||||
|
||||
### 课件
|
||||
|
||||
- 采用`R语言`+`quarto`完成
|
||||
- 网页公开:[https://drwater.rcees.ac.cn/course/public/RWEP/\@PUB/index.html](https://drwater.rcees.ac.cn/course/public/RWEP/@PUB/index.html)
|
||||
- 课件代码:[https://drwater.rcees.ac.cn/git/course/RWEP.git](https://drwater.rcees.ac.cn/git/course/RWEP.git)
|
||||
- 代码web界面: [https://on.tty-share.com/s/hWkn5_eF6rfZuAyJu8sheMgrcRzx6AZ2m7V32IphFHs7gn-vP9WYOeVEYtH8a-bGTuM/](https://on.tty-share.com/s/hWkn5_eF6rfZuAyJu8sheMgrcRzx6AZ2m7V32IphFHs7gn-vP9WYOeVEYtH8a-bGTuM/)
|
||||
|
||||
## 如何学习接下来的内容?
|
||||
|
||||
- 上课形式:
|
||||
- **实践操作为主**,目的是让每一位同学都能独立开展基于R的数据分析
|
||||
- **2-3人一组**,自由分组,相互帮助
|
||||
- 准备工作:
|
||||
- 个人笔记本电脑,Microsoft Windows、GNU/Linux、MacOS系统
|
||||
- 安装好**Microsoft Excel**
|
||||
- 能联网
|
||||
- 如果电池不够用,建议带上插座
|
||||
- 上课规则
|
||||
- 可随时打断,**不懂就问**
|
||||
- **无特殊情况不迟到**,否则操作过程容易跟不上
|
||||
|
||||
## Rstudio Server使用
|
||||
|
||||
- 服务网址:[https://drwater.rcees.ac.cn/rs1/](https://drwater.rcees.ac.cn/rs1/)
|
||||
- 每位同学使用1个账号,随机生成
|
||||
- 密码:****
|
||||
- 后面的实践课程可在该服务器上完成
|
||||
|
||||
|
||||
## 请记住自己的账号!
|
||||
|
||||
::: {layout-ncol=2}
|
||||
|
||||
```{r}
|
||||
#| echo: false
|
||||
#| output: asis
|
||||
coursememberdf <- readxl::read_xlsx("../../data/course_member.xlsx")
|
||||
nmem <- nrow(coursememberdf)
|
||||
set.seed <- 23
|
||||
|
||||
uiddf <- coursememberdf |>
|
||||
dplyr::mutate(uid = paste0("ruser", sprintf("%02d", sample(1:nmem, nmem)))) |>
|
||||
dplyr::select(uid, 姓名) |>
|
||||
dplyr::mutate(姓名 = "XX") |>
|
||||
dplyr::arrange(uid) |>
|
||||
dplyr::mutate(group = (dplyr::row_number() - 1) %/% 10 + 1) |>
|
||||
tidyr::nest(gdf = -group) |>
|
||||
dplyr::mutate(tab = purrr::map(gdf, ~ knitr::kable(.x)))
|
||||
|
||||
uiddf$tab[[1]]
|
||||
uiddf$tab[[2]]
|
||||
|
||||
```
|
||||
:::
|
||||
|
||||
## 请记住自己的账号!
|
||||
|
||||
::: {layout-ncol=2}
|
||||
|
||||
```{r}
|
||||
#| echo: false
|
||||
#| output: asis
|
||||
uiddf$tab[[3]]
|
||||
uiddf$tab[[4]]
|
||||
```
|
||||
:::
|
||||
|
||||
## 课后作业
|
||||
|
||||
提交形式:`第*次作业_姓名.qmd`文件
|
||||
|
||||
模板:
|
||||
|
||||
````
|
||||
---
|
||||
title: "课后作业*"
|
||||
author: 姓名
|
||||
---
|
||||
|
||||
|
||||
# 第1题
|
||||
|
||||
说明
|
||||
|
||||
```{r}
|
||||
# Here is the code
|
||||
|
||||
```
|
||||
|
||||
# 第2题
|
||||
|
||||
说明
|
||||
|
||||
```{r}
|
||||
# Here is the code
|
||||
|
||||
```
|
||||
|
||||
|
||||
````
|
||||
|
||||
|
||||
|
||||
## 欢迎讨论!{.center}
|
||||
|
||||
|
||||
`r rmdify::slideend(wechat = FALSE, type = "public", tel = FALSE, thislink = "../")`
|
|
@ -0,0 +1,53 @@
|
|||
project:
|
||||
type: website
|
||||
output-dir: www/
|
||||
render:
|
||||
- "*.qmd"
|
||||
- "!chp*.qmd"
|
||||
- "!analysis/"
|
||||
- "!*ignored.qmd"
|
||||
- "!*ignored/"
|
||||
- "!coding/"
|
||||
|
||||
|
||||
title: "区域水环境污染数据分析实践"
|
||||
lang: zh
|
||||
date: today
|
||||
bibliography: [BB/Ref.bib, BB/localRef.bib]
|
||||
|
||||
website:
|
||||
title: "Version: {{< var branch >}}"
|
||||
reader-mode: true
|
||||
site-url: https://drwater.rcees.ac.cn/{{< var projtype >}}/{{< var pubtype >}}/{{< var reponame >}}/@{{< var branch >}}
|
||||
repo-url: https://drwater.rcees.ac.cn/git/{{< var projtype >}}/{{< var reponame >}}/src/branch/{{< var branch >}}
|
||||
repo-actions: [edit, source, issue]
|
||||
page-navigation: true
|
||||
page-footer: "Copyright 2024, [Ming Su](https://drwater.rcees.ac.cn)"
|
||||
navbar:
|
||||
background: "grey"
|
||||
search: true
|
||||
right:
|
||||
- icon: house
|
||||
text: "Home"
|
||||
file: index.qmd
|
||||
- text: "Slides"
|
||||
file: SD/index.qmd
|
||||
- text: "About"
|
||||
file: about.qmd
|
||||
- icon: git
|
||||
menu:
|
||||
- text: Edit
|
||||
url: https://drwater.rcees.ac.cn/git/{{< var projtype >}}/{{< var reponame >}}/_edit/
|
||||
- text: Issue
|
||||
url: https://drwater.rcees.ac.cn/git/{{< var projtype >}}/{{< var reponame >}}/issues
|
||||
comments:
|
||||
hypothesis:
|
||||
theme: clean
|
||||
openSidebar: false
|
||||
|
||||
format:
|
||||
html:
|
||||
theme: cosmo
|
||||
css: _extensions/inst/css/style.css
|
||||
toc: true
|
||||
code-link: true
|
Loading…
Reference in New Issue