Skip to content

Commit

Permalink
add pipe for ingesting the biodiversity indicator data
Browse files Browse the repository at this point in the history
  • Loading branch information
elpamart authored and alexeh committed Sep 27, 2023
1 parent 3dbd55c commit 3cb6195
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions data/h3_data_importer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ WORKDIR_GHG=data/forest_ghg
WORKDIR_WOODPULP=data/woodpulp
WORKDIR_NATURAL_CROP_CONVERSION=data/natural_crop_conversion
WORKDIR_NUTRIENT_LOAD_REDUCTION=data/nutrient_load_reduction
WORKDIR_BIODIVERSITY=data/biodiversity

CHECKSUMS_PATH=data_checksums

Expand Down Expand Up @@ -54,6 +55,7 @@ indicators:
make convert-satDeforestation
make convert-naturalCropConversion
make convert-nutrientLoadReduction
make convert-biodiversity
contextual-layers: convert-hdi-contextual convert-blue-water-contextual


Expand Down Expand Up @@ -236,6 +238,16 @@ convert-naturalCropConversion: download-naturalCropConversion
python raster_folder_to_h3_table.py $(WORKDIR_NATURAL_CROP_CONVERSION) h3_grid_natural_crop_conversion_global indicator NCE 2022 --h3-res=6 --thread-count=$(PARALLELIZATION_FACTOR)


download-biodiversity:
# download and check
mkdir -p $(WORKDIR_BIODIVERSITY)
aws s3 sync $(AWS_S3_BUCKET_URL)/processed/biodiversity $(WORKDIR_BIODIVERSITY)
cd $(WORKDIR_BIODIVERSITY) && sha256sum --check ../../$(CHECKSUMS_PATH)/biodiversity

convert-biodiversity: download-biodiversity
@echo "Converting biodiversity data... "
python raster_folder_to_h3_table.py $(WORKDIR_BIODIVERSITY) h3_grid_biodiversity_global indicator FLIL 2022 --h3-res=6 --thread-count=$(PARALLELIZATION_FACTOR)


##################################
# Satelligence data #
Expand Down
11 changes: 11 additions & 0 deletions data/preprocessing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,14 @@ make all

Read more about this pipeline in the [natural_crop_conversion/README.md](natural_crop_conversion/README.md) file.

### Biodiversity

It contains the computation of the biodiversity - forest landscape integrity loss dataset .

To run the pipeline, `cd biodiversity` and

```bash
make all
```

Read more about this pipeline in the [biodiversity/README.md](biodiversity/README.md) file.
1 change: 1 addition & 0 deletions data/preprocessing/biodiversity/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ download_forest_landscape_integrity_loss:
"gs://landgriffon-gee-bucket/landscape_indicators_20230821/natural_crop_flii_loss_by_human_lu_50km_1000m.tif" \
$(data_dir)

# TODO- Review resampling method. We can use max resampling method to be conservative as the most intact areas are the most important to avoid.
resample_forest_landscape_integrity_loss:
rio warp \
$(data_dir)/natural_crop_flii_loss_by_human_lu_50km_1000m.tif \
Expand Down

0 comments on commit 3cb6195

Please sign in to comment.