(Not?) surprisingly, the potential is high to have a number of issues arise when trying to download Planet images for the first time, primarily due to conda environments and Rstudio. These issues are documented here.
Step 1: Download conda via Miniconda (unless you have some other reason for Anaconda).
Step 2: Initialize conda in terminal using conda init
.
The primary steps below are for VS Code. In June 2022, we discovered there are issues with trying to do this in Rstudio. Because we're not sure why this is happening (e.g. was this only for one specific computer? is it windows 11? Is it newer versions of Rstudio?), we're documenting this here.
conda create -n planet_orders python
and then activate the environment with conda activate planet_orders
.porder
in the environment. To do so, run pip install porder
. If that doesn't work, try pip3 install porder --user
.conda install -c conda-forge radian
. Then, install R with conda install -c r r
and finally, install the necessary package (data.table) with conda install -c conda-forge r-data.table
.planet_orders
environment, start radian (by typing radian
), and begin running through the downloadPlanet.R
script. When you get to the line saying system("planet init")
), R will send the command directly to the terminal and you should have a pop-up for you to enter your email and password. conda create -n planet_orders python
and then activate the environment with conda activate planet_orders
.porder
in the environment. To do so, run pip install porder
. If that doesn't work, try pip3 install porder --user
.radian
here because we're already using R via Rstudio. Yet, when we try to do system("planet init")
, we get an error saying the following, despite the command planet init
working fine if typed directly into terminal.sh: planet: command not found
Warnings message:
In system("planet init") : error in running command
127
, which is a numerical code indicating an error that the commmand was not run.system()
, system2()
, and shell()
. It appears that, at least with system()
, Rstudio is trying to send the terminal command to a specific shell we don't have access to.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.