djhocking/Trout_Salamander_Decisions

can we add a folder for storing data files (.csv) to the repository?

Closed this issue · 3 comments

I'm building the r-markdown file and would like to reference folders to import data in a way that will be easily transferable for us.

Is the best strategy to make a Data folder in the repository for, then we can add .csv files for all the catchment level-covariates to this folker and be able to update them/reference them easily?

For example, I read.csv for a file Kyle gave me back in the day with all the FEATUREID and AREASQKM for over 300K catchments - then just looked at stats (for catchments between 0.75km2 and 200km2) to make a table of the values we should ask experts for predictions (e.g., 0, 10, 25, 50, 75, 90, and 100th quantiles).

I can just add this folder "Data" to the repository and we can add files from there. I wasn't sure if you already had a folder with all the covariates (just read.csv from an online/ftp site or something).

Thoughts?

Yes, having a Data folder is a good idea. Any file structure works and is relative to the top directory of the repository so it works for all users that clone the repo. For R code, that's the benefit of the .rproj file, everything becomes relative to the directory that lives in so there is no need to set the working directory since that is always specific to the user.

The file that Kyle gave you is a bit big for a github repo but it should be ok. that's all in a postgres database on osensei so I will probably just pull from that in the future, especially since that will have the riparian buffer info and the one you have doesn't have that. You will have to contact Jeff to get a username and password for osensei, felek, and the postgres sheds database. Don't inlude the username or passwords in any code because then they would be publicly available on github and the server would get hacked. I can show you how to set it up to hide that info but still use it in an R script.

Oh one other thought about the Rmarkdown (and one slight disadvantage of using it), is that the data and all folders have to be in the same folder or subfolder of where the Rmarkdown folder is in order to knit it. So you can't have the Rmd file in Code/ and then the csv in Data/ it would have to be in Code/Data/ which is awkward or the Rmd files have to be in the root folder then you can have just a Data/ folder but this creates a bit more of a mess if there are many Rmd files and you output lots of html and pdf files from them.

Ok - noted - maybe we can talk about this next week to figure out the best organization hierarchy.

I tried to add a new folder called Data (used git add Data/ and commit and push), but isn't not showing up on github website....

Is there another way to add a folder? It's in my local computer in the repo folder, just not online.

If the folder is empty it won’t be pushed until it has something in it.

On Feb 4, 2016, at 1:00 PM, Rachel Katz <notifications@github.commailto:notifications@github.com> wrote:

Ok - noted - maybe we can talk about this next week to figure out the best organization hierarchy.

I tried to add a new folder called Data (used git add Data/ and commit and push), but isn't not showing up on github website....

Is there another way to add a folder? It's in my local computer in the repo folder, just not online.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-179968990.