Skip to content

Commit 2d2303a

Browse files
committed
Adding last bit on GitHub Actions
1 parent f0cd7a6 commit 2d2303a

7 files changed

Lines changed: 4795 additions & 6 deletions

File tree

File renamed without changes.

15-autoreport/slides.html

Lines changed: 4784 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ covid
9797

9898
## Web scraping raw HTML: Example (cont 1.) {style="font-size: 80%"}
9999

100+
::: {.callout-warning}
101+
The current version of the wikipedia document doesn't have the proper XPath. So we will skip the example and directly call the function to retrieve the table.
102+
:::
103+
100104
- We want to get the HTML table in the doc. To do such, we can use the
101105
function `xml2::xml_find_all()` and `rvest::html_table()`
102106

@@ -110,6 +114,8 @@ covid
110114

111115
Live Example! (inspect elements in [Google Chrome](https://developers.google.com/web/tools/chrome-devtools/open),
112116
[Mozilla Firefox](https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Open_the_Inspector), [Internet Explorer](https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/ie-mode), and [Safari](https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/Web_Inspector_Tutorial/EditingCode/EditingCode.html#//apple_ref/doc/uid/TP40017576-CH4-DontLinkElementID_25))
117+
118+
113119

114120
---
115121

@@ -120,9 +126,8 @@ Now that we know what the path is, let's use that and extract
120126
```{r}
121127
#| label: get-table-covid
122128
#| echo: true
123-
table <- xml_find_all(covid, xpath = '//*[@id="covid-19-pandemic-cases-and-mortality-by-country"]/div[5]/table')
124-
table <- html_table(table) # This returns a list of tables
125-
head(table[[1]])
129+
table <- html_table(covid)[[2]] # This returns a list of tables
130+
head(table)
126131
```
127132

128133
---

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ them.
2525
| 11/05 and 11/07 | More practice with slurm + [Homework 4](https://UofUEpiBio.github.io/PHS7045-advanced-programming/12-slurm-week2/12-slurm-hw.html) ([source](12-slurm-week2/12-slurm-hw.qmd)) | [slides](https://UofUEpiBio.github.io/PHS7045-advanced-programming/12-slurm-week2/slides.html) ([source](https://github.com/UofUEpiBio/PHS7045-advanced-programming//tree/main/12-slurm-week2/slides.qmd)) | |
2626
| 11/12 and 11/14 | R packages I | [slides](https://UofUEpiBio.github.io/PHS7045-advanced-programming/13-rpkgs-i/slides.html) ([source](https://github.com/UofUEpiBio/PHS7045-advanced-programming//tree/main/13-rpkgs-i/slides.qmd)) | [lab](https://UofUEpiBio.github.io/PHS7045-advanced-programming/13-rpkgs-i/lab.html) ([source](https://github.com/UofUEpiBio/PHS7045-advanced-programming//tree/main/13-rpkgs-i/lab.qmd)) |
2727
| 11/19 and 11/21 | R packages II | | |
28-
| 11/26 and 11/28 (off) | Automatic Reports with GitHub Actions | | |
28+
| 11/26 and 11/28 (off) | Automatic Reports with GitHub Actions | [slides](https://UofUEpiBio.github.io/PHS7045-advanced-programming/15-autoreport/slides.html) ([source](https://github.com/UofUEpiBio/PHS7045-advanced-programming//tree/main/15-autoreport/slides.qmd)) | |
2929
| 12/03 and 12/05 | Final Prep (Hackathon) | | |
3030
| 12/12 | Final | | |
3131

pages.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ date,week,name,id,issue,extra
1212
10/29 and 10/31,11,Slurm,11-slurm-week1,,+ Homework 4 (Slurm)
1313
11/05 and 11/07,12,More practice with slurm,12-slurm-week2,,+ [Homework 4](https://UofUEpiBio.github.io/PHS7045-advanced-programming/12-slurm-week2/12-slurm-hw.html) ([source](12-slurm-week2/12-slurm-hw.qmd))
1414
11/12 and 11/14,13,R packages I,13-rpkgs-i,,
15-
11/19 and 11/21,14,R packages II,07-rpkgs-i,,
16-
11/26 and 11/28 (off),15,Automatic Reports with GitHub Actions,99-autoreport,,
15+
11/19 and 11/21,14,R packages II,,,
16+
11/26 and 11/28 (off),15,Automatic Reports with GitHub Actions,15-autoreport,,
1717
12/03 and 12/05,16,Final Prep (Hackathon),,,
1818
12/12,17,Final,,,

0 commit comments

Comments
 (0)