Installation and Setup¶
This guide walks through setting up the Deforestation Viewer environment from scratch.
1. Clone the Repository¶
git clone https://github.com/CryoAether/deforestation-viewer.git
cd deforestation-viewer
2. Create the Conda Environment¶
It’s recommended to isolate dependencies in a Conda environment.
conda create -n deforest python=3.11
conda activate deforest
3. Install Dependencies¶
All required packages are listed in requirements.txt:
pip install -r requirements.txt
Tip: Installation may take a few minutes, especially for geospatial libraries like
rioxarrayandgeopandas.
4. Set Up Microsoft Planetary Computer (MPC)¶
The pipeline retrieves satellite data directly from the MPC API.
You don’t need an API key for public collections, but you must agree to the Terms of Use.
If you experience network rate-limiting, sign up for a free Planetary Computer account and authenticate once in your session:
import planetary_computer as pc
pc.sign_in()
5. Verify Installation¶
Run the following test to confirm all libraries are working:
python -c "import stackstac, planetary_computer, geopandas; print('✅ Environment ready')"
If no errors appear, you’re ready to proceed.
Next: Create a Custom AOI →