reconhub / learn

RECON learn: a free, open platform for training material on epidemics analysis
https://reconlearn.org
Other
35 stars 30 forks source link

Post escaide fix #53

Closed zkamvar closed 5 years ago

zkamvar commented 5 years ago

This fixes some issues that were brought up at ESCAIDE.

zkamvar commented 5 years ago

I've made some changes to the case study that include changing some variable names and re-running the case study so that it uses the most recent version of the incidence package.

@aspina7, do you want to give food back?

aspina7 commented 5 years ago

yep will go through now...

aspina7 commented 5 years ago

couldnt comment directly so just chucking line references (for the pull numbers) on here, some comments are just a wording/typo/suggestion thing so if limited on time feel free to ignore these, will tag them with [TEXT] - so can skip over them.


Boarding now, will come back to this, poke me if i forget

aspina7 commented 5 years ago

Not sure why that was bold, but very well...


Fin :)

thibautjombart commented 5 years ago

@aspina7 wow that's super detailed feedback thanks! We should get you PR-ready so that next time you can PR that directly.

@zkamvar do you think you could get that in this week?

zkamvar commented 5 years ago

yup

On Dec 3, 2018, at 18:03 , Thibaut Jombart notifications@github.com wrote:

@aspina7 https://github.com/aspina7 wow that's super detailed feedback thanks! We should get you PR-ready so that next time you can PR that directly.

@zkamvar https://github.com/zkamvar do you think you could get that in this week?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/reconhub/learn/pull/53#issuecomment-443807577, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeIlm7pLWH_3HzAuL-9mJzK5oM33fRHks5u1Wd7gaJpZM4Ywzjz.

zkamvar commented 5 years ago

Not sure why that was bold, but very well...

@aspina7, they were bold because at the end of the list you had:


<!-- snip  -->

L1206: I think you shoul dbe able to remove this projection and it should default to WGS84 (which is what should be using...) - if not then might need to address this to make sure both have correct projection
--------- 
Fin :)

Markdown interpreted that dividing line as a level 2 header. I inserted newlines before and after to make it a horizontal line and added dashes to make the line numbers list elements like so:


<!-- snip  -->

- L1206: I think you shoul dbe able to remove this projection and it should default to WGS84 (which is what should be using...) - if not then might need to address this to make sure both have correct projection

--------- 

Fin :)
aspina7 commented 5 years ago

ah nice! thanks - sorry :)

zkamvar commented 5 years ago

It's a super common mistake! This is why I try to get people to space things out (both vertically and horizontally) in their markdown documents.

zkamvar commented 5 years ago

Thanks for the thorough review, @aspina7. I've made most of the changes you requested with a few exceptions listed here:

(note, all the line numbers from the review are in reference to the file at commit 250d23c4bd4e61ad4132448b39e958438800230f)

L99: Maybe just post a screenshot instead of this or as well as this? (probably a windows screenshot)

This would be helpful. The only thing that I can see being a bit of a problem is the fact that you can't show all of the files at once on a Windows view. I've added some screenshots of RStudio before and after setup to help with the visualisation.

L430: Think probably just remove the dir.create stuff?? Confused people quite a lot and easy to just make a new folder by clicking (also you wouldnt really keep dir.create in your script would you? guess returns an error if folder already exists??)

I have personally used dir.create() in my scripts before. It doesn't throw an error if the folder already exists; it throws a warning. We could have them set up the clean_data/ directory beforehand manually, but that runs the risk of someone skipping over it and having things fail when they want to write their clean data. Besides, doing things like this is good practice for them to work abstractly.

L450: Cant we just use the base r version for csv?

Yes, but it has terrible defaults. The biggest problem with it is that it writes the row names to a separate, unnamed column by default, making it irritating to read in if you forget to include row.names = FALSE.

L544[TEXT]: maybe easy to make reference to bin as the width based on number of units on the x axis.

I'm not exactly sure how to word this, so I left it alone.

L618 [TEXT]: is this stratifying though? Pedantic but perhaps just say colouring by... stratifying would be more like facetwrapping no?

The data themselves are still being stratified; so, yes, it is still stratifying

L774 [TEXT]: I like to explain lists as a collection of other R objects, so say the list is a paper tray and then each dataframe is a named piece of paper in that tray. Then that the dataframe is two dimensions (rows x columns) and putting that in a list simply adds a third dimension (piling papers on top of each other). Theres a slide in the MSF outbreak course lectures.

I like the paper tray analogy, but it's a bit incomplete since a data frame is a list in and of itself. A better example may be a toolbox (various sizes) vs a variety pack of beer (uniform size, but still different values)?

L927 [TEXT]: pedantic here but if you have a cohort (i.e. everyone) then you are calculating the true risk ratio not estimating it - but I guess considering you dont have 100% response... estimating fine...

If we are calculating the true risk ratio, what is the need for confidence intervals, then?

L1080: maybe change this from being multi to something else, people were confused thinking that it was a multivariable risk ratio, i.e. corrected for other variables.

I just went ahead and removed the whole thing. As I was nearing the end of writing it, I realized that I was really uncomfortable with the way I had set this up.

L1100 [TEXT]: and usually define these at the begining of your script no?

See above

L1190: Just double checking - but shouldnt we introduce "!" as not earlier on

  • e.g. when introducing subsetting and rules for that?

We could introduce it earlier by modifying the logical operator thing, but it seems a bit out of place there.

L1206: I think you shoul dbe able to remove this projection and it should default to WGS84 (which is what should be using...) - if not then might need to address this to make sure both have correct projection

I've tried removing it, but ended up getting an error. Shapefiles are definitely not my forte.

zkamvar commented 5 years ago

@aspina7, the practical is ready for you to review: https://deploy-preview-53--reconlearn.netlify.com/post/stegen.html

aspina7 commented 5 years ago

Nice looks good! agree with comments and omitions too.

Re rr estimates .... touché.

Will look at the projection stuff when i find time

zkamvar commented 5 years ago

I think that I will merge this since the next workshop is days away. If changes are warranted, make another PR