Skip to content

Extracting time series  #44

@albirayi

Description

@albirayi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions