rhiever / Data-Analysis-and-Machine-Learning-Projects

Repository of teaching materials, code, and data for my data analysis and machine learning projects.
http://www.randalolson.com/blog/
6.12k stars 2.06k forks source link

To resolve #20 #21

Closed nyoung85 closed 8 years ago

nyoung85 commented 8 years ago

Hey rhiever - cool work you’ve been doing.

For this issue I turned the weather_data value into a 2 dimensional list. First the html table is parsed by row and is stored in the first list dimension, then each of the rows is individually parsed to extract the variables.

The “average mean temperature” that was throwing the Santa Fe data off now corresponds to weather_data[0][1], which doesn’t get evaluated in any city. That way, “actual max temperature” gets assigned from weather_data[1][0] across all cities.

Santa Fe also has no data for average and record precipitation, so I included conditionals to allow for these to be missing without raising the exception.

This is my first github pull request, btw — hope you find it helpful!

rhiever commented 8 years ago

Thanks @nyoung85! Going to run the scripts and see how it goes. Did you test this code on all of the stations in this repo?

nyoung85 commented 8 years ago

Yep - all works

rhiever commented 8 years ago

Alrighty! I made some stylistic suggestions. Once we get those addressed, we should be in good shape to merge. Please ping me on here once you've committed those changes.

nyoung85 commented 8 years ago

Changes made. I'm still new to github, though -- can you tell me if you got that last pull request?

rhiever commented 8 years ago

Everything you commit to the branch that you sent the PR from will automatically show up in the PR.

Tip for the future: When you fork someone's repo and want to make changes, create a new branch off of that fork to work in. That way you can work on multiple branches and potentially send multiple PRs from those branches without issue. (Repo maintainers won't always review/accept PRs quickly.)

Looks good. Thanks for the PR!

nyoung85 commented 8 years ago

Thanks, good to know.

My pleasure!