inbo / craywatch

Craywatch project website
https://craywatch.inbo.be
Creative Commons Attribution 4.0 International
1 stars 0 forks source link

Add script for point selection and csv update to repo #270

Closed fjasteen closed 5 months ago

fjasteen commented 5 months ago

Margot & Bieke are selecting points through Mymaps. This maps is exported as kml and attributes are updated through an R-script before saving as the localities.csv Damiano needs for the map visualizing distribution.

This is now a seperate Rproj in a different repo (craywatcht_selection) and should be added here for version control of the localities.csv.

@damianooldoni could you guide this noob on where to put this in the folder structure?

peterdesmet commented 5 months ago

@fjasteen Is this issue meant for the craywatch repo?

fjasteen commented 5 months ago

oops :-)

peterdesmet commented 5 months ago

No worries, I have moved it now.

damianooldoni commented 5 months ago

@peterdesmet , where do you suggest to put one or two R files and a Rproj file? The goal of this R code is to produce an output which is very important for the website, i.e. the localities.csv in ./assets. So, they should be placed in this repo. Thanks

peterdesmet commented 5 months ago

I would create a separate R or src directory

peterdesmet commented 5 months ago

Add it to the exclude files: https://github.com/inbo/craywatch/blob/7de47d4336c310b4af4ac55d851d9f1b60734bef/_config.yml#L31-L35

damianooldoni commented 5 months ago

Thanks, @peterdesmet. I prefect the R directory. @fjasteen: can you create a new branch with a correspondent Pull Request?

Assign me as reviewer, please. I will give a look too. Thanks.

fjasteen commented 5 months ago

Yes, thanks @damianooldoni . What about the './R/data/input/shapefiles/', I used it as a dump for all static shapefiles. Should I add the folder to the .gitignore file in the root? As in "# Negeer shapefiles en R-specifieke bestanden uit ./R/" /R/data/input/shapefiles/ /R/.Rproj.user /R/.Rhistory /R/.RData /R/.Ruserdata

damianooldoni commented 5 months ago

If such files are needed I would not put them in the .gitignore unless they contain sensitive data. By adding a line with - R to the exclude: section in the _config.yml file, you will tell to jekyll that all files and subdirectories in R have to be excluded while generating the website.

fjasteen commented 5 months ago

Yes but the folder is quite giant, because of all the shapefiles, is there need to store them in the repo?

damianooldoni commented 5 months ago

The folder is not really big, no worries. The size of the files is also not an issue for GitHub. The biggest one is 45 MB: everything below 50MB is fine. Having everything in this repository will help the future-you to reproduce everything in the future and to maintain everything up to date. You could then also consider to remove the same files from the GDrive.

fjasteen commented 5 months ago

oké perfect. What happens with the git files etc related to the current repo? Sorry for the stupid question, but I'm trying to find out how all stuff is related.

damianooldoni commented 5 months ago

Some standard files are indeed ignored by default in a .gitignore. A typical example is the .Rhistory. What you could do is then add all files contained in the gitignore in your repository to the .gitignore of this repository, prepending the folder R/ as your R project will not stay in the root folder, but in /R.

peterdesmet commented 5 months ago

In this case I would suggest to have a separate .gitignore in the R directory. Use the R template for gitignore, like here: https://github.com/inbo/camtrapdp/blob/main/.gitignore

damianooldoni commented 5 months ago

@fjasteen, @margotvermeylen: I think this has been solved last week. If you agree, please close this issue. Otherwise, let us know what has still to be done, thanks.