Directions: Follow along with the slides and answer the questions in red font in your journal.
HTMLis the code that's used to render every website you've ever visited.
HTMLcode used to create the first two rows of the web data.
HTMLdifferent than the data tables we're used to seeing in
R, for example, when we use the View() function?
<TD>mean? How does
HTMLuse these tags to display the table?
<TABLE> <TR> <TH>peak</TH> <TH>range</TH> <TH>state</TH> <TH>long</TH> <TH>lat</TH> <TH>elev_ft</TH> <TH>elev_m</TH> <TH>prominence_ft</TH> <TH>prominence_m</TH> <TH>rank</TH> </TR> <TR> <TD>Denali (Mount McKinley)</TD> <TD>Alaska Range</TD> <TD>Alaska</TD> <TD>-151.0063</TD> <TD>63.0690</TD> <TD>20236</TD> <TD>6168</TD> <TD>20174</TD> <TD>6149</TD> <TD>1</TD> </TR> </TABLE>
Rscrape every web table available on the site:
tables <- readHTMLTable(____)
readHTMLTable()scrapes every table that is on a particular web URL, we need to find out which table has the data we're interested in.
wikipedia.orgoften has articles with 3 or more tables.
length()function to find out how many tables of data were scraped in our set of
whichargument to the
readHTMLTable()to re-scrape the data from the web but this time use the
whichargument to scrape just the individual table.
whichargument should be the integer denoting which table you want scraped.
After scraping the data, the only thing left to do is to save it and use it.
Fill in the blanks to save the data and give it a file name
save(____, file = "____.Rda")
statehas the most mountains in our data?