{"id":16277111,"url":"https://github.com/eliocamp/shceof","last_synced_at":"2025-04-08T17:20:31.558Z","repository":{"id":48099208,"uuid":"337232383","full_name":"eliocamp/shceof","owner":"eliocamp","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-08T18:57:37.000Z","size":346483,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-14T13:41:28.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eliocamp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-02-08T22:56:12.000Z","updated_at":"2023-09-11T09:38:55.000Z","dependencies_parsed_at":"2023-09-26T07:34:31.757Z","dependency_job_id":null,"html_url":"https://github.com/eliocamp/shceof","commit_stats":{"total_commits":231,"total_committers":2,"mean_commits":115.5,"dds":"0.012987012987012991","last_synced_commit":"2eeadfbe67e4fdb9d6fe47f7d4871e89da1f6f0c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fshceof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fshceof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fshceof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fshceof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eliocamp","download_url":"https://codeload.github.com/eliocamp/shceof/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247888567,"owners_count":21013002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T18:52:39.888Z","updated_at":"2025-04-08T17:20:31.532Z","avatar_url":"https://github.com/eliocamp.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shceof\n\nThis repository contains data, code and other source files associated with a paper (title TBD)\n\nFirst clone or download this repository with\n\n```bash\ngit clone --depth 1 https://github.com/eliocamp/shceof.git\n```\n\n(This will download only the lasted version, without all the git history, which can get somehwat bloated.)\n\n\n## Runing with docker\n\nThe easiest way to run this code is to use the docker environment, which comes not only with all the packages and system dependencies preinstalled, but also with the data already downloaded. \n\n[Install Docker](https://docs.docker.com/engine/install/) if you haven't already. Then, go to the folder in which you cloned the repository and run this line:\n\n```bash\ndocker run --rm -p 8787:8787 -e DISABLE_AUTH=true -v $(pwd):/home/rstudio/shceof -v /home/rstudio/shceof/renv eliocamp/shceof\n```\n\nOpen your web browser to [localhost:8787](http://127.0.0.1:8787/) and you'll be welcomed by an RStudio session with a shceof folder with all that you need. And you can move [to the next section](#compiling-the-manuscript).\n\n## Running locally\n\nIf you can't or don't want to use Docker, then you need to install all the requires packages. \n\n### Installing system dependencies\n\nIf running on linux, you'll probably need to install a bunch of system dependencies. On Ubuntu, this should be enough: \n\n```bash \nsudo apt-get -y update \u0026\u0026 sudo apt-get install -y libssl-dev zlib1g-dev libv8-dev pandoc pandoc-citeproc libgeos-dev libgeos++-dev default-jre-headless make gdal-bin libjq-dev libnetcdf-dev libxml2-dev libproj-dev libgdal-dev libsodium-dev protobuf-compiler libprotoc-dev imagemagick libicu-dev libudunits2-dev libcurl4-openssl-dev libpng-dev libsecret-1-dev git-core libprotobuf-dev libmagick++-dev\n```\n\nOtherwise, the easiest way to do it is with the sysreqs package. Open an R session in the repository folder and run this\n\n```r\n## install.packages('remotes')\nremotes::install_github('r-hub/sysreqs')\nsysreqs::sysreq_commands('DESCRIPTION')\n```\n\nThis will print a command that you need to run in order to install all the system dependencies. (You might need to add libmagick++-dev to the list, which is not detected as a dependency for some reason.)\n\n### Installing R packages\n\nThis project uses the [renv](https://rstudio.github.io/renv/) package to manage a reproducible environment. If opening this project with RStudio or starting R from the command line from the root directory, renv should automagically install and load itself. \n\nTo recreate the environment then run\n\n```r\nrenv::restore()\n```\n\nThis should install all the package dependencies needed to install the package and compile the document. Depending on your operating system, this could take a while!\n\n\n### Getting the data\n\nTo get the data you'll need to set create a user [here](https://cds.climate.copernicus.eu/user/register?destination=/). Once you have your user ready, to to your [user page](https://cds.climate.copernicus.eu/user/) copy your UID and API Key and set them in the environmental variables CDSKEY and CDSUSER. You can do this by creating a file called `.Renviron` on the root folder of this project with \n\n```\nCDSUSER = \"xxxx\"\nCDSKEY = \"xxxxxxx-xxxxxx-xxxx-xxx-xxxxxxxx\"\n```\n\nNote that your USER is **NOT** the user you use to authenticate on the website, but the 5 or 6 digit number you see on the \"API key\" section on [your user page](https://cds.climate.copernicus.eu/user/)\n\nAfter that, the relevant datasets will be downlaoded the first time you compile the manuscript. However, bear in mind that this could literally take hours, since many datasets are downloaded from the [Climate Data Service](https://cds.climate.copernicus.eu/), which does some conversion.\n\n\n\n## Compiling the manuscript\n\nTo compile this manuscript you need to install the associated package with \n\n```r\nremotes::install_local()\n```\n\nThe main manuscript is located at `analysis/paper/shceof.Rmd`. Knit it to compile de PDF.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Fshceof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliocamp%2Fshceof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Fshceof/lists"}