This lab will give you practice with
rvest
packagertweet
packagelibrary(rvest)
library(stringr)
The lab is due:
Use the rvest
package to get a list of all the story titles appearing on the NTY homepage: https://www.nytimes.com/.
# some code to get articles titles
article_titles <-
# print out the first 10 titles so the grader can tell your code ran
article_titles[1:10]
Use the rtweet
package to scrape twitter and answer the following question. How many of Hadley Wickham’s most recent 100 tweets mention the word data (his twitter handle is @hadleywickham).