openkfw / mapme.protectedareas

Reproducible workflows in R for processing open geodata to create knowledge about KfW supported protected areas and conservation effectiveness.
GNU General Public License v3.0
4 stars 0 forks source link

create estimations for treatment effects #101

Open Jo-Schie opened 2 years ago

Jo-Schie commented 2 years ago

New table should be

seperate table

melvinhlwong commented 2 years ago

Open question regarding disbursement data: Some entries are negative. That is, money has been payed back. How to deal with this?

I suppose ignoring payments back to the donor under the assumption that the loan/grant has not been utilized to the full extent but will be used to reduce the outststanding debt (Restmittelverwendung)

Jo-Schie commented 2 years ago

Agree.we should not count that as negative @melvinhlwong since it is not taking resources away from the projects

melvinhlwong commented 2 years ago

@Jo-Schie Thanks for the feedback.

I have some issues calculating the disbursements per cell. I have a last step where I need to aggragate the cells over all disbursements of all BMZ projects. However, there are couple of cells that are unmatched. I think they may be related to some MARINE WDPA. If yes, I would like to drop them and have a clean collapse/aggregation of the data. Here is the list of WDPAID that cause some issues

' # WDPAID 1 555682914 This one is a terrestial PA and not Marine https://www.protectedplanet.net/555682914 2 555682915 3 900786 4 900715 5 478085 6 555555655 7 555555646 8 555623649 9 26621 10 35271 11 62052 12 903037 13 99652 14 555629305 15 555629306 16 555629363 17 555556016 18 555629318 19 555629331 20 555629317 21 555629313 22 41027 23 555582978 24 555582979 25 108073 26 900668 27 903016 28 903013 29 2234 30 10754 31 67744 32 555600250 33 81060 34 555599979 35 351721 36 351720 37 351931 38 555600241 39 478454 40 555600297 41 555599932 42 555682146 43 555600232 44 555600202 45 555576230 46 555576325

Jo-Schie commented 2 years ago

I checked. First observations: Ten areas are kicked out because they are either Unesco Biosphere Reserves or they do not have valid geometry information. They are filter out with this code in the very beginning of the script:

wdpa_kfw <-
  wdpa_kfw %>%
  filter(DESIG_ENG != "UNESCO-MAB Biosphere Reserve") %>%
  filter(STATUS != "Proposed") %>%
  filter(GEOMETRY_TYPE != "POINT")

image

checkin now on the others.

Jo-Schie commented 2 years ago

another eight areas are purely marine areas (although that classification is not 100% reliable)

image

Jo-Schie commented 2 years ago

okay. I also checked all of the rest. There are two reasons, why we do not have WDPA-IDs. First option: they are marine areas or areas on small islands. In that case, they were not part of the original grid, which was created using GADM admin country boundaries (which do not include all smaller islands because of the rather coarse spatial resolution).

Second option: The areas are very small (smaller 1 sqkm or sometimes between 2-3 sqkm). In that case, the intersection did not attribute the WDPA ID properly. Why? Because i used centroids for intersection to speed up the intersection of 3 Mio Gridcells with about 400 KfW PAs. In case of very small PAs centroids sometimes fall out of PA and no intersection information is returned. Often small PA projects do not have a dedicated Forest Conservation Focus but rather foster environmental education or rehabilitation in urban areas etc.

Take away: Both cases do not exert a considerable influence on results. Therefore, please just ignore them.

Jo-Schie commented 2 years ago

I accidently closed this issue, although it embraces more then just the question you had @melvinhlwong

melvinhlwong commented 2 years ago

@Jo-Schie Thanks a lot for the thorough examination! That is great and I will simply drop the unmerged WDPA for the reasons you mentioned above (Marine, no geometry, small islands, small areas below 3sqm (no have a dedicated Forest Conservation Focus but rather foster environmental education or rehabilitation in urban areas). Great explanation!

I put this into in progeress since the table above is still work in progress

yotaae commented 2 years ago

Fyi @Jo-Schie @melvinhlwong as I won't be available next week:

I have started to create a markdown file for the separate table mentioned above - see the 05 file in the analysis branch.

Please note that I haven't had the chance to review the calculations. In particular, "total loss avoided" and "total emissions avoided" need to be reviewed, as I was unsure about the units of the our estimates.

If you have time please review (and adjust, if necessary) the code in the Rmd file.

melvinhlwong commented 2 years ago

awesome job. I will reviews