Overall, you did a great job on your Milestone 2. Please see detailed feedback below and don't hesitate to reach out if you have any questions. Keep up the good work!
Reproducibility, readability, and repo organization (RRR):
Excellent work! Your repo is well organized and only contains the files that are required, you made sure that your work was viewable from GitHub and that the plots render properly, and you provided good context to a visitor in your README file. This is what we expect to see from any repository on GitHub! No need to push your .Rproj file to your GitHub repo though, you can just keep that on your local copy. One thing I noticed is that you forgot to push the folder with the plots from the previous milestone so the plots are still not being rendered on that one, make sure to update that for milestone 3 as you do get graded for the project as a whole as part of the last milestone! :)
Task 1:
In exercise 1.1, I think you meant to write each question in a different line but they all ended up in the same paragraph (no deductions for this of course), I thought I would point it out just because this used to happen to me and I think the issue is that you need to leave a line in between each line of writing in your .Rmd for them to render separately. I noticed the same thing happened at various points throughout the document too, let me know if you can figure it out or if you need more help! Great job printing your data to screen before you even do anything though, it's always a super important step to have a look even if it seems small!
In the tasks for your research question 1, by ""computing the number of observations"" what we meant was, for example, for the categorical variable amenities, to compute the number of outdoor rec facilities, outdoor pools, etc... (each value within the variable). This would require some tidying first, as each cell has more than one value (some list several amenities, such as ""Sauna, Indoor Pool, Outdoor Pool"" whereas some only say ""Sauna""), and then computing the number of buildings with a sauna, the number of buildings with an indoor pool, the number of buildings with an outdoor pool, etc... The output of running glimpse(apt_buildings$amenities) just gives you the number of rows for that variable (and in general for that dataframe - see by running dim(apt_buildings)), and running glimpse(apt_buildings) with any of the variables would give you the same result (3455) & 2) The plot does not have a logarithmic axis - there are very particular circumstances in which log axes are useful (see this post for examples) and like you mention yourself it isn't related to the question.
Same as with the above, the tasks are not really helpful to answer your research question; I know that not every task fits every research question and that it's difficult to choose, but we also encouraged students to modify the tasks in order to better fit their questions and I do think that even if you had to repeat more than one task across research questions you could've gotten a bit closer to the answer. I encourage you to attend office hours or if you can't make it to reach out to ask questions in the #general channel even if you just want general advice, we're happy to help! If you were looking to answer ""What is the average number of years to get registered after the building is built?"" or generally explore that question you could've computed a new column subtracting year_registered minus year_built (maybe calling it years_to_register or similar, for example. If you still wanted to use the task ""Compute the range, mean, and two other summary statistics of one numerical variable across the groups of one categorical variable from your data"", you could've then calculated the range, mean, and median of the years_to_register variable across any variable of your interest, as you did with the pets variable. Also - we encourage you to remove the NAs from variables to make your analysis cleaner (it doesn't make sense to calculate summary stats for a NA value).
For the last two research questions, you did a great job choosing tasks that helped you get closer to answering your questions even if you didn't fully answer the question!
Make sure to modify the names axes and legends in all plots to make them readable (by changing them in your ggplot object so that they are not the variable names that include underscores, for example changing no_of_stories to ""Number of Stories""). Same goes for legends! We also encourage you to add titles to your plots :)
In future work, try to state the question that you are trying to answer (instead of just saying ""Research Question 1"") and the task (instead of saying ""Summarizing Task 1"") as it makes it easier to read and understand how each task is helping you answer each question, otherwise you did a great job with throughly explaining everything and making clear which exercise you were completing!
You're off to a good start, but your explanations throughout the document are a bit sparse and similar to my first comment above I noticed an issue with your Markdown formatting in that you use the # without leaving a space before the text, so instead of rendering headers you can just see the #Research Question 3. Always check your .md file to see that everything rendered correctly to avoid errors like this!
Task 2:
You make good points about the data and I agree that the amenities column needs to be tidy; I also agree that some columns may be easier to analyse if you are able to standardize them to the same numerical values - awesome work! However, you don't make an overarching statement about whether the data is tidy or untidy and your comments mostly refer to the ""Each column is a variable"" and the ""Each cell is a value"" requisites for tidy data, but not to the ""Each row is an observation"". Each building in the dataset (each observation) is a row, so the data overall can be considered tidy, but some columns as you point out can be made tidier.
With that said, you demonstrate some understanding of the tidy/untidy concept through your exercises in task 2.2, but it is not quite what we were expecting. I always find this resource to be very useful for tidy data, it is a concept that I get confused about sometimes too and it's good to have examples. I can see that you put effort into the assignment by finding a new package outside of the tidyverse that could help you with this task! However, this code cSplit(apt_buildings, ""amenities"", "","", direction =""wide"") is not creating a new column per amenity, it is just dividing each value such that ""Sauna, Indoor Pool, Outdoor Pool"" will be split such that the new column amenity1 will contain ""Sauna"", amenity2 will contain ""Indoor Pool"", and amenity3 will contain ""Outdoor Pool""; however, if another value in the original column amenities is ""Indoor Rec Room, Child Play Area, Exercise Room"", the new column amenity1 will contain both ""Sauna"" and ""Indoor Rec Room"", and so forth. This is not tidy because each new column (amenity1, amenity2, etc...) will still contain different values that should be made into columns. The tidy way would be to turn each amenity into its own column and have the values be YES/NO/UNKNOWN (similar to the sprinkler_system column, among others), which can be done with pivot_wider(). You also don't show the output of the data after you have changed it again at the end, and it is unclear whether you are intending to tidy, then untidy, or viceversa. Try to add more explanations in future work!
I agree with your reasoning of which questions you should pursue further and look forward to seeing how you approach those in the last milestone.
Hey Elizabeth,
Overall, you did a great job on your Milestone 2. Please see detailed feedback below and don't hesitate to reach out if you have any questions. Keep up the good work!
Reproducibility, readability, and repo organization (RRR):
Excellent work! Your repo is well organized and only contains the files that are required, you made sure that your work was viewable from GitHub and that the plots render properly, and you provided good context to a visitor in your README file. This is what we expect to see from any repository on GitHub! No need to push your .Rproj file to your GitHub repo though, you can just keep that on your local copy. One thing I noticed is that you forgot to push the folder with the plots from the previous milestone so the plots are still not being rendered on that one, make sure to update that for milestone 3 as you do get graded for the project as a whole as part of the last milestone! :)
Task 1:
In exercise 1.1, I think you meant to write each question in a different line but they all ended up in the same paragraph (no deductions for this of course), I thought I would point it out just because this used to happen to me and I think the issue is that you need to leave a line in between each line of writing in your .Rmd for them to render separately. I noticed the same thing happened at various points throughout the document too, let me know if you can figure it out or if you need more help! Great job printing your data to screen before you even do anything though, it's always a super important step to have a look even if it seems small!
In the tasks for your research question 1, by ""computing the number of observations"" what we meant was, for example, for the categorical variable
amenities
, to compute the number of outdoor rec facilities, outdoor pools, etc... (each value within the variable). This would require some tidying first, as each cell has more than one value (some list several amenities, such as ""Sauna, Indoor Pool, Outdoor Pool"" whereas some only say ""Sauna""), and then computing the number of buildings with a sauna, the number of buildings with an indoor pool, the number of buildings with an outdoor pool, etc... The output of runningglimpse(apt_buildings$amenities)
just gives you the number of rows for that variable (and in general for that dataframe - see by runningdim(apt_buildings)
), and runningglimpse(apt_buildings)
with any of the variables would give you the same result (3455) & 2) The plot does not have a logarithmic axis - there are very particular circumstances in which log axes are useful (see this post for examples) and like you mention yourself it isn't related to the question.Same as with the above, the tasks are not really helpful to answer your research question; I know that not every task fits every research question and that it's difficult to choose, but we also encouraged students to modify the tasks in order to better fit their questions and I do think that even if you had to repeat more than one task across research questions you could've gotten a bit closer to the answer. I encourage you to attend office hours or if you can't make it to reach out to ask questions in the #general channel even if you just want general advice, we're happy to help! If you were looking to answer ""What is the average number of years to get registered after the building is built?"" or generally explore that question you could've computed a new column subtracting
year_registered
minusyear_built
(maybe calling ityears_to_register
or similar, for example. If you still wanted to use the task ""Compute the range, mean, and two other summary statistics of one numerical variable across the groups of one categorical variable from your data"", you could've then calculated the range, mean, and median of theyears_to_register
variable across any variable of your interest, as you did with the pets variable. Also - we encourage you to remove the NAs from variables to make your analysis cleaner (it doesn't make sense to calculate summary stats for a NA value).For the last two research questions, you did a great job choosing tasks that helped you get closer to answering your questions even if you didn't fully answer the question!
Make sure to modify the names axes and legends in all plots to make them readable (by changing them in your
ggplot
object so that they are not the variable names that include underscores, for example changingno_of_stories
to ""Number of Stories""). Same goes for legends! We also encourage you to add titles to your plots :)In future work, try to state the question that you are trying to answer (instead of just saying ""Research Question 1"") and the task (instead of saying ""Summarizing Task 1"") as it makes it easier to read and understand how each task is helping you answer each question, otherwise you did a great job with throughly explaining everything and making clear which exercise you were completing!
You're off to a good start, but your explanations throughout the document are a bit sparse and similar to my first comment above I noticed an issue with your Markdown formatting in that you use the # without leaving a space before the text, so instead of rendering headers you can just see the #Research Question 3. Always check your .md file to see that everything rendered correctly to avoid errors like this!
Task 2:
You make good points about the data and I agree that the
amenities
column needs to be tidy; I also agree that some columns may be easier to analyse if you are able to standardize them to the same numerical values - awesome work! However, you don't make an overarching statement about whether the data is tidy or untidy and your comments mostly refer to the ""Each column is a variable"" and the ""Each cell is a value"" requisites for tidy data, but not to the ""Each row is an observation"". Each building in the dataset (each observation) is a row, so the data overall can be considered tidy, but some columns as you point out can be made tidier.With that said, you demonstrate some understanding of the tidy/untidy concept through your exercises in task 2.2, but it is not quite what we were expecting. I always find this resource to be very useful for tidy data, it is a concept that I get confused about sometimes too and it's good to have examples. I can see that you put effort into the assignment by finding a new package outside of the tidyverse that could help you with this task! However, this code
cSplit(apt_buildings, ""amenities"", "","", direction =""wide"")
is not creating a new column per amenity, it is just dividing each value such that ""Sauna, Indoor Pool, Outdoor Pool"" will be split such that the new columnamenity1
will contain ""Sauna"",amenity2
will contain ""Indoor Pool"", andamenity3
will contain ""Outdoor Pool""; however, if another value in the original columnamenities
is ""Indoor Rec Room, Child Play Area, Exercise Room"", the new columnamenity1
will contain both ""Sauna"" and ""Indoor Rec Room"", and so forth. This is not tidy because each new column (amenity1
,amenity2
, etc...) will still contain different values that should be made into columns. The tidy way would be to turn each amenity into its own column and have the values be YES/NO/UNKNOWN (similar to thesprinkler_system
column, among others), which can be done withpivot_wider()
. You also don't show the output of the data after you have changed it again at the end, and it is unclear whether you are intending to tidy, then untidy, or viceversa. Try to add more explanations in future work!I agree with your reasoning of which questions you should pursue further and look forward to seeing how you approach those in the last milestone.
Thanks, Icíar