sepkamal / STAT545-hw-Kamal-Sepehr

Homework repo for STAT 545
0 stars 0 forks source link

HW6 ready for grading #6

Open sepkamal opened 7 years ago

sepkamal commented 7 years ago

Please see my HW6 here: https://github.com/sepkamal/STAT545-hw-Kamal-Sepehr/blob/master/Hw06/HW6_Data_wrangling_wrap_up.md

wenzhengzzz commented 7 years ago

Hi @sepkamal , Good job, your repo looks very neat and your readme file is very organized and structured. It is easy to explore and there are many links to access the files. Here're more specific comments on each task.

Task1: Strings Exercises

You did a great job in this part, while in the mapping part, I think it's better to use str_view() to see a more clear picture rather than writeLines() it self, and include a html file in your hw. There is a discussion (or announcement) about the format on slack, you can check it. And for "strings only contain consonants", you can also use str_view(x,"[aeiou]",match = F) to find them. For "End with ing or ise", we can use str_view(x,"ing$|ise$",match = T) or str_view(stringr::words, "i(ng|se)$", match = TRUE).

Task2:

There're thousands of warning lines in your codes, you can try the function suppressMessages() to avoid getting the "loading" and "warnings" returns. Other than that, I really like your mapping graph!

mylinhthibodeau commented 7 years ago

Dear @sepkamal,

Well done on homework 6! You have picked two tasks and completed them successfully:

Some other students and myself found it useful to print to pdf for the str_view exercises, which avoids the need of cloning your repository, but if you don't like that option, I understand and you can simply point out the need for cloning the repository or copying the raw Rmd file in the readme.

Since you have completed almost all the numerous exercises in this section, I don't see the utility to re-list them all here and I simply put the broad categories.

To match words that only contain consonants, you can use match = F: str_view(x,"[aeiou]",match = F)

There were some additional functions to explore (e.g. str_trim(), str_wrap(), regex() vs. with fixed(), match \..\..\.. string, etc.) and the possibility for writing a function, but given the length of this homework, I understand that it might not have been possible to complete all of the exercises. I actually didn't have time to complete them all either !

PART 2 - Work with the singer data

Each type of data has its own challenges I suppose, but it looks especially complicated to work with (messy) geographic data, so good job on that !

  1. Use purrr to map latitude and longitude into human readable information on the band’s origin places. You completed this task sucessfully. From your comments, I understand that it took some decent amount of troubleshooting to resolve this problem with the "unmatching" latitude/longitude. I had some similar problems with genomic data because of NA values, and now I always think about it first when something goes wrong in my code ;)
  2. Check whether the place in city corresponds to the information you retrieved. You completed this task successfully. The structure of the nested dataframe was not obvious to me at the first look, but I thinks this is inherent to the type of data structure.
  3. Go visual: give a look to the library leaflet. You made use of leaflet() and htmlwidgets::saveWidget() (a new package I hadn't heard about before), and produced a very cool map of the Singer data. I tried to install these packages and run your code, but the interactive map I obtained showed only the dots (not the continents). However, I can see you produced a much nicer interactive map with popups for artist names on click, well done !

Report your process

You reported your process well, but don't hesitate to comment as much as possible, as it can facilitate reading of your code.

I think you did an excellent job at this homework, which was especially long and challenging ! You demonstrate an a good understanding of R, its packages and its functions, and you tried something new, which is always interesting !

Warm regards, My Linh Thibodeau