Last active
October 11, 2021 17:51
-
-
Save dwillis/1b83689b7756c3c93318fd978600792b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html <- read_html("https://merrill.umd.edu/about/faculty-and-staff") | |
# get faculty/staff names | |
names <- html %>% html_nodes(".card-title") %>% html_text() | |
length(faculty_staff) | |
faculty_staff[1] | |
# get titles | |
titles <- html %>% html_nodes(".profile-card-title") %>% html_text() | |
# create a new dataframe with both | |
combined <- data.frame(name = names, title = titles) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment