Closed Jo-Schie closed 2 years ago
Looks like a new error to me. Seems like we haven't properly fixed the download function the last time. But its not related to the changes in #5. I will look into it shortly.
Cool. Aren't the masks also available here? Not sure it it is the same but if we can avoid the AMAZON storage then maybe this facilitates things...
Data mask (datamask) Three values representing areas of no data (0), mapped land surface (1), and permanent water bodies (2).
Or is it again the CO2 problem? Then maybe we should exclude it completely for the moment and add it as a new feature request for the future...?
That turned out to be an really interesting bug. It was caused that the csv file from where we extract the locations of available CO2-emissions tiles were again query able from the server. However, the links to the GTiffs still are pointing to a dead end causing then an error in the download.file()
and the function to fail.
When looking into it I discovered that there were fairly new data sets published on the GFW Data Portal, e.g. one layer of Forest Greenhouse Gas Emissions which closely resembles the data we used before. This new data set now actually is available globally while the Biomass Loss layer before was only available for the tropics. The layer is part of the publication of Harris et al (2021). Maybe have a look into it, because there seem to be a number of new interesting layers (e.g. Forest Carbon Removals.
For now, I established a fairly simple routine to download this new layer in 20aad3f. I am thinking, that an API package to the GlobalForestWatch Data API would be quite useful because there are a bunch of interesting data sets. If none such R package exist we could think about implementing that in either {mapme.forest}
or a new package?
Also, please note that the routines analysing this layer are in need of some adaptation. The layer represents greenhouse gas emission between 2000 and 2020. Thus we need to first divide it by 20 to get an information about the yearly average and then aggregate on the user specified year vector. So, the current commit ensures functionality but I would advise to currently not use the CO2 layer in analysis.
EDIT: Added refernce to the commit with the mentioned changes.
ok download issue seems to be fixed for now.
HI @goergen95 .
Did you accidently overwrite something again with the co2 layer download functions. I am currently unable to download GFW data so I cannot tst #5 .
gives me
So I guess he is correctly downloading treecover and lossyear layer from google but then again fails with the amazonws download.
Also i noticed that the function is now called
downloadfGFW
instead ofdownloadGFW
. Not sure if that is on purpose.