Open facuxpalacio opened 3 years ago
Hi Facundo,
This is a great start! I think making use of Iris data is a great idea. I only made a few small grammatical changes to the code in a branch. For me, the check boxes disappear when I click them, but I assume this is a work in progress.
I'd suggest we make this repo consistent with the reproducible code+data box I started drafting for part 8 (but you can edit this box to conform to whatever you think the minimum requirements are). https://docs.google.com/document/d/1tq-VYz9vNxLWMBkaoWyX8xfO9yqo1cK8IARNZnq_GRI/edit
If you agree, you could set up the file structure to include an 'data', 'output', and 'R' subfolder, and we can detail the steps required to use all of the files in the readme. I can do a first pass at this if you'd like.
@graco-roza might know whether keeping the shiny app in one script vs. separating ui and server components is best (I've seen arguments for the latter but the app is fairly simple so it might be ok).
I think it could be nice to convert parts of this checklist to a fillable form that people can download from the shiny app, and then upload to their own repos as proof they followed the steps. I am not skilled enough in shiny at this point to immediately know how to do this yet, but I can try to learn! This looks like a good starting point https://deanattali.com/2015/06/14/mimicking-google-form-shiny/
We could add examples to the fillable form for steps 1-2 based on the iris or bird data. The answers could be shown in the form before it gets filled as default answers.
step 1:
step2:
step 3-4
step 4
step5
step6
step 7
step 8
Let me know if you want me to expand on anything!
Emma
Hi Emma, thank you so much for your nice feedback, you've made me think about manys stuffs!
I'll do my best to follow your box on reproducible code+data, but feel free to indicate if I'm getting this wrong or missing something.
It is weird that check boxes disappear when you click them, it shouldn't happen, or at least, this never has happened to me. We should check this out.
As the app is pretty simple right now, I don't think we need to separate the ui and the server.
Step 1:
Step 2:
Step 3:
Step 4
Step 5
Step 6
Step 7
Step 8
To summarize, Emma it would be great if you could take on:
I'm handling the rest of steps meanwhile.
Facu
@emmajhudgins I've created a data folder. Before going on, I've got a few questions:
Thanks in advance
Facu
@emmajhudgins maybe you're right to upload the community and trait datasets in Steps 3 and 4, respectively. I've put two file browsers in the "Dataset tab" in Step 5, and it looks a bit overloaded once both datasets appear.
Hi @facuxpalacio,
Sorry for the delay in replying - I need to figure out how to turn on email updates!
re: R folder, yes, but your main branch should be altered if you change the location of files (it'll look like a deletion and addition of a file).
re: empty folder If you're using github desktop, you should be able to upload an empty folder (I've never had any issues). If you're imagining that people won't fork this repository, maybe an output folder isn't necessary. But, if you just wanted to show the file structure, a sample of the exportable report could go here based on the sample data. If you're having issues setting up the folders I can take this on.
I think a combo of either checkboxes/radiobuttons/selectinput and fillable text input would be ok! I would hesitate to switch to all text input in case the form became too overwhelming for people using it for the first time. Some of the steps don't need a lot of detail (e.g. step 1 part 1 for if you have a hypothesis can be a checkbox)
re: your earier comments:
step1: maybe selectInput?
step2: Do you mean a fake example of a preregistration DOI? I would maybe just give an example URL of an existing preregistration, e.g. http://corinalogan.com/Preregistrations/g_flexforaging.html as the default in a textInput field
As for the location of the power analysis, I was thinking of a URL or filepath (either a github URL pointing to their own repository or a file path on their local machine/cloud storage). Maybe we can find an existing power analysis on github to point to to save time?
I'll try my best to work through those 3 items in the next few days!
Emma
Hi Facundo!
The shiny learning curve is steeper than I anticipated :P As an update, I've updated my versions of R and RStudio and the checkboxes no longer disappear!
I am partway through converting the checklist to a fillable form - currently if you hit submit it outputs a file in the output folder (not sure if this is the best solution if the app is web hosted).
See also the change I made to the format of the step 1 question - had to do some conditional statements on the reactive output which took some time to learn!
Emma
Hi Emma!
Thanks for the feedback. I agree with you, it's pretty hard at the beginning, but then you get used to it once you learn the logic behind. It's great that you could fix the issue with the checkboxes and learned how to include the fillable form😃
What I find cumbersome is the need of doing great changes in the code and then modifying this in the repo. I understand this is because gitHub is not intended for doing this (particularly when there are several people working on the same script), but mainly for storage.
I've made several other changes, but I will first merge what you did.
Facu
I've merged your changes with mine, it's looking pretty nice! (check the new plots I've included in the community data section). I'm just wondering if one "Submit" button at the end of the protocol wouldn't be better than one button per page.
Facu
Hi Facundo,
GitHub is actually built largely for version control, not storage, so while it is tricky with merge conflicts and stff, that is actually the main point of it.
I'm still unclear on whether you're working on the code using command line git/github desktop or if you're actually uploading new versions of files to the github website? It's much more streamlined if you use a desktop software.
I'll add a final tab with the submit button!
Emma
Got it Emma. I've been commiting changes to the website so far, mainly to understand how it works. From now on, I will commit changes from the desktop version.
Facu
Emma, the desktop version is like being in heaven! My only concern is what would happen if one of us commit changes while the other is working at the same time on the previous version. Should we fetch origin regularly (let's say every 30 min) while changing the code so the other is aware of this? Thanks!
Facu
Hi Facundo,
Glad you got the desktop version working! I think fetching the origin often is a good idea, but this is partly why I've been working in my own branch. You can work in the main branch while I work in EJH_edits to hopefully limit conflicts (different timezones help too :P).
If I make changes you don't fully agree with/that would overwrite yours, you can see what I did by looking at the history of my branch, or compare via a 'diff' with your copy (https://coderefinery.github.io/git-intro/08-conflicts/), and only incorporate the ones you like in your branch
If there still end up being two conflicting versions of the same file, it's a bit annoying to resolve but not terrible. See here: https://docs.github.com/en/github/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github
Emma
Emma, you're the best!! Little by little I'm understanding how all this stuff works, neato!
I've just realized Caio wasn't assigned to this issue, I'm not sure whether he's been receiving our discussions.
Facu
Hi all,
I have been following the whole discussion from scratch. One of the main reasons I haven’t answered is that, in my experience, code gets too messy if 2, 3 people are editing at the same time. If you would like I can take a look at the app at some point to see if code is consistent and functional, but it seems to me that you are building it in a good pace, and a third person would only make it slower.
Let me know if you want me to look at it at this stage and I can give my inputs. Otherwise I can wait and give the final improvements (if any) :).
On 17. Jun 2021, at 2.13, facuxpalacio @.***> wrote:
 Emma, you're the best!! Little by little I'm understanding how all this stuff works, neato!
I've just realized Caio wasn't assigned to this issue, I'm not sure whether he's been receiving our discussions.
Facu
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or unsubscribe.
Great Caio!
I absolutely agree with you, it sounds pretty wise indeed.
You can give it a crack when we're ending with a first complete prototype then,
Facu
The code as you will see is pretty rough. My main idea was to set a draft as follows:
I've also uploaded two datasets, one is the classical "Iris" data and the other belongs to one of my publications. I included Iris because it has several measurements per species, so it can be thought as a trait dataset accounting for intraspecific variation.
Awaiting for your comments!