-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Hello everyone and thank you very much for all of your amazing work,
I am trying to pull the chirps data for Ethiopia and I am struggling to advance.
This is my first time using CHIRPS, but I am really interested in working myself into the subject. My goal is to get CHIRPS data for ETHIOPIA, I will want to finally de-trend the precipitation averages (either daily or monthly) in order to find abnormalities, in order to identify regional droughts as the basis for me research. Hence, I would ideally have both the precipitation on a pixel by pixel basis and will also be able to connect the pixel to the respective districts.
I am using: https://geodata.lib.berkeley.edu/catalog/stanford-kz352sx7513 : as base input of Ethiopian districts over which I want get the chirps data.
#Problem
I am reading in the ETHIPIA District Shapefile above as a SFC_Multipolygon, with the intention of pulling the CHIRPS data for each district over a given period of time. Am I correct in the assumption that the "get_chirps" command is currently only able to pull data for geographic points or is it somehow able to pull the CHIRPS data for entire districts?
I have been trying around a lot but can't figure which approach would work, if you guys have any insights or inputs I would be incredibly grateful. Even if the answer is an affirmation that what I want to do is not possible with the get_chirps command. (Would have to manually load in all the CHIRPS data images.)
The code (ETHIOPIA = The data input):
ETHIOPIA_shp <- st_read(ETHIOPIA)
ETHIOPIAREP_shp <-st_transform(ETHIOPIA_shp, CRS(OGP))
st_write(
ETHIOPIAREP_shp,
ETHIOPIAREP,
format="GTiff", append=FALSE)
SPDF <- readOGR(dsn=ETHIOPIAREPP,layer="ETHIOPIAREP")
dates <- c("2017-12-15", "2017-12-31")
get_chirps(SPDF, dates, operation = 5)
yields the error :
Fehler in [.data.frame(lonlat, , 2) : undefined columns selected
and if I use:
get_chirps(ETHIOPIAREP_shp, dates, operation = 5)
in the last line, it runs forever without end. This is where I think it might not be possible to run it for multipolygons.
I hope this question / issue is not to far away from the intended use of get_chirps and that I am not wasting your time.
Thank you in advance for any help or input!
All the best,
Marius