Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get and compute the JRC accessibility map for 2000 #365

Merged
merged 16 commits into from
Aug 27, 2024

Conversation

fBedecarrats
Copy link
Collaborator

Impact evaluation usually requires the use of matching or regression covariates that are either measured before treatment or unaffected by the treatment (e.g., see the section on Selecting covariates to balance). Accessibility is an important covariate for evaluating the impact of conservation, as it strongly influences both the location of protected areas (PAs) and the likelihood of deforestation. However, using a post-treatment value for accessibility is problematic because road creation or maintenance can be influenced by PA creation. When we use get_nelson_et_al() {mapme.biodiversity}, it fetches the JRC dataset that was created with a reference date of 2015. This poses a problem if we want to assess conservation impacts for a different time frame, such as the one allowed by global forest cover data (2001-2023).

This PR aims to add two functions to the package: get_accessibility_2000 and calc_traveltime_2000. These two functions fetch and process the JRC dataset that was previously created with a reference date of 2000 instead of 2015. The PR includes the tests, snapshots, and documentation associated with these two functions.

@goergen95
Copy link
Member

Awesome, thank you! Let's wait for the check results.

@goergen95
Copy link
Member

goergen95 commented Aug 27, 2024

I see for the source dataset:

> gdalinfo /vsizip//vsicurl/https://forobs.jrc.ec.europa.eu/data/products/gam/access_50k.zip/acc_50k.tif

...
Band 1 Block=128x128 Type=Int32, ColorInterp=Gray

and for the translated one after running get_resources():

> gdalinfo gdalinfo /tmp/RtmpAB7wFn/mapme-data/accessibility_2000/acc_50k.tif
...
Band 1 Block=43200x1 Type=Int32, ColorInterp=Gray

meaning once we translated the data set with mapme.biodiversity instead of blocks of 128x128 pixels that can be read we have to read entire columns. This surely impacts performance so I'd suggest to try additionally setting "-co", "BLOCKXSIZE=128", "-co", "BLOCKYSIZE=128" or similar in make_footprints().

@goergen95
Copy link
Member

Seems to require TILED=YES to be set as well to work correctly. Please check locally if the output has the desired blocksize.

@fBedecarrats
Copy link
Collaborator Author

Seems to require TILED=YES to be set as well to work correctly. Please check locally if the output has the desired blocksize.

No, it doesn't work by only adding "-co", "TILED=YES". I am not familiar with GDAL and I don't think that I am qualified to tweak creation options at this level. I'd rather revert to the simpler approach I committed initially and let further GDAL fine-tuning to people who have experience with these things.

@goergen95 goergen95 merged commit 49fed68 into mapme-initiative:main Aug 27, 2024
8 checks passed
@fBedecarrats fBedecarrats deleted the add-accessibility-2000 branch August 27, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants