Open vmichalowski opened 6 years ago
Dear @vmichalowski,
Great job on homework 10 !! You went above the requirements of the assignment and you probably learned a lot :)
Successful data queries and analyses
read_html()
to retrieve Wikipedia dataSuccessful data queries and analyses
twListToDF()
, mutate()
) used to format and clean the data I literally think you did an amazing job and that you showed in so many ways that you are motivated and keen on take on challenges by trying new things, so this section is only for your own learning and is not part of the peer review process.
I struggled a lot myself with cleaning data, and after many hours, I found some potentially helpful tips that you might also be interested in.
For your data cleaning: I found that you can combine multiple functions of stringr to perform subsetting strings and "intra-function" piping which allows me to cut the length of my code in half. For example, in your case, you could try something like:
temp_tableCA_clean_m1 <- temp_tableCA %>%
head(n=9) %>%
# Below: replace all brackets and numbers of Community with nothing (empty)
mutate(Community1 = str_replace_all(Community, c("\\[|\\]|1|2|3|5|6|7|8|9"), "")) %>%
# Mutate a new column July_Avg_High, subset the July high temperatures, then trim and then change to numeric in the same mutate function
mutate(July_Avg_High = substr(July.Avg..high..C...F.., start = 21, stop = 24) %>%
str_trim(side = "both") %>%
as.numeric()) %>%
# Mutate a new column July_Avg_Low, subset the July low temperatures, then trim and then change to numeric in the same mutate function
mutate(July_Avg_Low = substr(July.Avg..low..C...F.., start = 21, stop = 24) %>%
str_trim(side = "both") %>%
as.numeric())
head(temp_tableCA_clean_m1)
I loved your p2 plot ! I found this trick for visualizing a plot in a different way by rotating it with p2 + coord_flip()
here, you can try it out to see if you like rotating plots like me :)
I wish you goodluck for the rest of your studies !
Regards,
My Linh Thibodeau
Hi @vmichalowski,
You did a great job with HW10. As the previous reviewer said, you went above and beyond what was expected of you. Your assignment was informative, well organized, and extensive.
Reproducibility: Yes. Although I didn't test your code, it looks like I could use it to scrape data about the US. Security: Yes Practicality:Yes Reporting: This is where your assignment really shines. You clearly went to great lengths to document your progress and reflect on the process. Your .md file will be a great template for future web scraping work.
I don't have much to provide in the way of recommendations, which is indicative of a great assignment.
Nice job!
Peter
@vincenzocoia @gvdr @ksedivyhaley @JoeyBernhardt @mynamedaike @pgonzaleze @derekcho
Here's a link to my rendered hw10 md file.