This Earthdata Cloud Cookbook is being developed by the NASA-Openscapes team.
Information for our team to contribute to the Cookbook.
June 7 2021
Create repo at github.com.
Clone nasa-openscapes/earthdata-cloud-cookbook
using your method of preference. Here is how to do this in bash:
git clone https://github.com/NASA-Openscapes/earthdata-cloud-cookbook
cd earthdata-cloud-cookbook
Install the quarto
library so you can interact with it via the command line or R. I've set mine up with both.
In bash, type:
## required
pip install quarto
## probably going to want this
pip install jupyterlab
pip install matplotlib
pip install scikit-image
pip install requests
In the R Console, type:
## required
install.packages("quarto")
install.packages("reticulate")
To have our quarto project nicely portable, we used renv
to manage python and R libraries/versions.
About python environments: environment.yml
and requirements.txt
are doing the same thing but are built based on the python installation. pip
will create environment.yml
, and conda
will create requirements.txt
.
First set it up in R:
remotes::install_github("rstudio/renv") # will move these into the cache
library(renv)
renv::init()
renv::use_python()
Now I have private library for R and python that's just for this project. (Read more: https://rstudio.github.io/renv/).
The basic workflow: is to use renv::snapshot()
of all the libraries we want, and then can always call renv::restore()
to load them. Makes your environment portable between other people and other machines.
renv::snapshot()
renv::restore()
As we develop and add more package dependencies, re-run renv::snapshot()
to update the environment
See much more detailed information in https://quarto.org. This is just a few notes.
In migrating from a book to a website you need to change some of the pages to have a YAML title rather than H1 header. For example change:
# Background
to
---
title: Background
---
Books use the alternate no YAML form because in the case of PDF, ePUB, or MS Word books all of the .md files are pasted together into a single file (which can't have multiple title entries).
June 9 2021
git clone https://github.com/quarto-dev/quarto-cli
cd quarto-cli
./configure-macos.sh
quarto convert help # to check
cd quarto-cli
git pull
configure_windows.cmd
After the install works, make sure it's on his PATH.
If not, then how to change: https://stackoverflow.com/questions/61799309/where-can-i-see-deno-downloaded-packages
Quarto is under the quarto-cli directory: there's a package/disc/bin
-- could get this on his $PATH
June 10, 2021
quarto env
quarto capabilities
will show the 5 python packages required.
pip install quarto
installs those 5 packages in the environment. Recommended: miniconda, conda, python3.
Weird error to look out for/avoid: when quarto detects python from the Windows Store.