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

Extracting time series #44

Open
albirayi opened this issue Aug 1, 2022 · 0 comments
Open

Extracting time series #44

albirayi opened this issue Aug 1, 2022 · 0 comments

Comments

@albirayi
Copy link

albirayi commented Aug 1, 2022

extnt <- as(extent(c(xmin= 31, xmax= 49, ymin= 2, ymax= 20)), 'SpatialPolygons')
crs(extnt) <- "+proj=longlat +datum=WGS84 +no_defs"
area <- ext(extnt)
dates <- c("2017-12-15","2017-12-31")
get_chirps(area, dates, server = "CHC", as.raster = TRUE)

this worked well for me to extract data for the given extent. However, I could not able to extract sample points from the domain.
#43
spt <- st_sample(area, 30)
spt <- st_as_sf(spt)
dft <- get_chirps(spt, dates = c("1990-01-01","2018-12-31"))
p_ind <- precip_indices(dft, timeseries = TRUE, intervals = 30)

I hope you found a way to solve this as well.
Thank you in advance for any help or input!

All the best,

Markos

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

No branches or pull requests

1 participant