Skip to content

Instantly share code, notes, and snippets.

@mbjones
Created August 31, 2015 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbjones/babafa4a5775d32e042d to your computer and use it in GitHub Desktop.
Save mbjones/babafa4a5775d32e042d to your computer and use it in GitHub Desktop.
ADFG HTML table parsing
library(XML)
library(httr)
post_url <- "http://www.adfg.alaska.gov/index.cfm?adfg=CommercialByFisherySalmon.exvesselquery"
post_body <- list(year="2014", areas= "allareas", speciesx= "allspecies", submit= "Find%20the%20Data")
html <- POST(post_url, body = post_body, encode = "form")
akcommdf_2014 <- readHTMLTable(content(html))[[1]]
#View(akcommdf_2014)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment