Technologies
- HTML: Hypertext Markup Language
- CSS: Cascading Style Sheets
################################### # # # R Lunch - Webscraping # # Support for slides # # roygava.com/webscraping-lunch # # 2020-11-09 # # # ################################### ## --------------------------------- #Load packages library(rvest) library(dplyr) library(tibble) library(stringr) library(lubridate) library(RSelenium) ## --------------------------------- url <- "https://www.bag.admin.ch/bag/en/home/krankheiten/ausbrueche-epidemien-pandemien/aktuelle-ausbrueche-epidemien/novel-cov/situation-schweiz-und-international.html" read_html(url) %>% html_table() %>% .[[1]] ## --------------------------------- library(pageviews) top_articles("en.wikipedia", start = (Sys.Date()-1)) %>% select(article, views) %>% top_n(10) ## --------------------------------- html_page <- '
Basic experience with R and familiarity with Tidyverse is recommended.
Note: rvest is included in the tidyverse
. ' ## --------------------------------- read_html(html_page) %>% xml_structure() ## --------------------------------- html_page_css <- 'Basic experience with R and familiarity with the Tidyverse is recommended.
Country | Capital | Population |
---|---|---|
UK | London | 66.65 |
Switzerland | Bern | 8.57 |