Scrape current weather data in R

1.1k views Asked by At

I'm trying to scrape weather data from intellecast.com. I can break down and tidy some of the data with the following code but it's not perfect, I can't think of a way to consolidate it in a efficient way. Basically I need to create a vector or table so I can manage the information.

# Scrape Weather Data

games.URL.stem = "http://www.intellicast.com/Local/Weather.aspx?location=USMD9906"
weat = readHTMLTable(games.URL.stem)
weat <- weat[[1]]
weat
#check factors 
str(weat)
weat$V1
### isolate and tidy data
WW <- gsub("\r\n","",weat$V1)
WW
WW <- WW[1]
WW
WW <- gsub("        "," ",WW)
WW
WW <- gsub("     "," ",WW)
WW
WW <- gsub("        "," ",WW)
WW
WW <- gsub("Report Text:.*$","",WW)
WW
0

There are 0 answers