Results from Data Scraping
Okay, this is even better than the first one. I modified Nathan’s script to scrape both the maximum and minimum temperatures for 365 days (meaning 365 Web pages!) and dumped them into one comma-delimited text file. Then I imported it into Excel to make this graph. I just used the Excel chart tools to make it (Excel for Mac 2011).
Python (partial):
# Get temperature from page
soup = BeautifulSoup(page)
# maxTemp = soup.body.nobr.b.string
maxTemp = soup.findAll(attrs={"class":"nobr"})[5].span.string
minTemp = soup.findAll(attrs={"class":"nobr"})[8].span.string
# Above I added a scrape for lowest temperature too