Your project folder (26X_GFB_Data/) should contain:
26X_GFB_Data/
├── GreenFuelBreak_Pipeline.ipynb <- the notebook you run
├── environment.yml <- conda environment spec (provided)
├── inputs/ <- all input data (road_segments, NKSK-boundaries,
│ plant-shapefiles, hawaii_dem, Penman/AET rasters, xlsx)
└── notebooks/ <- the 5 original notebooks (not needed to run)
The notebook auto-detects inputs/ when you launch Jupyter from this folder, and it
also has your ~/Desktop/26X_GFB_Data/inputs path hard-coded as a fallback, so either way
it will find the data.
conda --versionIf "command not found", open the Anaconda Prompt (Windows) or run
source ~/miniconda3/bin/activate (macOS/Linux) first.
From inside the project folder:
cd ~/Desktop/26X_GFB_Data
conda env create -f environment.ymlThis makes a conda environment named gfb with the full geospatial stack (GDAL/PROJ come bundled via conda-forge, so there is nothing else to compile). It takes a few minutes.
Prefer to build it by hand instead of the file? This is the equivalent:
conda create -n gfb -c conda-forge python=3.11 geopandas rasterio shapely pyproj \ contextily mapclassify pandas numpy matplotlib openpyxl requests beautifulsoup4 \ jupyterlab ipykernel
conda activate gfbYour prompt should now start with (gfb).
python -m ipykernel install --user --name gfb --display-name "Python (gfb)"cd ~/Desktop/26X_GFB_Data
jupyter labThis opens JupyterLab in your browser.
- In the file browser, open GreenFuelBreak_Pipeline.ipynb.
- Top-right kernel selector -> choose Python (gfb).
- Run everything: menu Run -> Run All Cells, or run cell by cell with Shift+Enter.
- Step 0 prints an "Input check" table. Every row should say
OK. If any saysMISSING, fix the path (see Troubleshooting) before continuing.
That's it. Generated files (scored shapefile, CWD rasters/tables, watering CSV,
cost CSV, and all maps) are written to a new gfb_outputs/ folder inside the
project folder.
- Step 1 (species scraper) is optional and normally skips itself. It only runs
if
inputs/gonative_combined_scored_3_13.xlsxis missing. You do not need internet for the rest of the pipeline. - Map basemaps need internet. The Esri shaded-relief topo layer is fetched online. With no connection the maps still render (border, roads, colors), just without the topographic backdrop.
- The first code cell (0a) runs
pip install .... Inside thegfbenv everything is already present, so pip just reports "already satisfied" and changes nothing. You can comment that cell out if you prefer. - Re-running: outputs overwrite cleanly. Safe to Run All again.
Open the master config cell (Step 0b) and set the paths directly, e.g.:
INPUT_DIR = "/Users/garyding/Desktop/26X_GFB_Data/inputs"
OUTPUT_DIR = "/Users/garyding/Desktop/26X_GFB_Data/gfb_outputs"Input checkshows MISSING — you launched Jupyter from a different folder. Eithercdinto26X_GFB_Databeforejupyter lab, or hard-setINPUT_DIRin Step 0b.- Kernel "Python (gfb)" not listed — re-run step 4, then refresh JupyterLab.
conda env createfails on solving — update conda first:conda update -n base conda, then retry. Make sure you are on theconda-forgechannel (the yml already sets this).- Want to start over —
conda env remove -n gfband repeat from step 2.