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 Oct 9, 2023
1 parent 85e7dbf commit d4df628
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 @@ -21,6 +21,7 @@ WORKDIR_DEFORESTATION=data/hansen_loss
WORKDIR_GHG=data/forest_ghg
WORKDIR_WOODPULP=data/woodpulp
WORKING_NATURAL_CROP_CONVERSION=data/natural_crop_conversion
WORKDIR_BIODIVERSITY=data/biodiversity

CHECKSUMS_PATH=data_checksums

Expand Down Expand Up @@ -52,6 +53,7 @@ indicators:
make convert-forestGHG
make convert-satDeforestation
make convert-naturalCropConversion
make convert-biodiversity
contextual-layers: convert-hdi-contextual convert-blue-water-contextual


Expand Down Expand Up @@ -234,6 +236,16 @@ convert-naturalCropConversion: download-naturalCropConversion
python raster_folder_to_h3_table.py $(WORKING_NATURAL_CROP_CONVERSION) h3_grid_natural_crop_conversion_global indicator NECR 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 BL_LUC_S 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 d4df628

Please sign in to comment.