Retrieve PlanetScope time series for multiple sites and groups
Source:R/retrieve_planetscope_time_series.R
retrieve_planetscope_time_series_batch.RdExtracts time series data from PlanetScope imagery for all points in a coordinate data frame, grouped by site and group.
For each site and group, reflectance, QA, and metadata are extracted and combined
Results are saved as .rds files under the ts/ subdirectory of the specified dir, prefixed ts_.
Usage
retrieve_planetscope_time_series_batch(
dir,
df_coordinates,
v_site = NULL,
v_group = NULL,
max_sample = 2000,
num_cores = 12
)Arguments
- dir
Character. Base directory containing raw PlanetScope data (expects a
raw/subdirectory).- df_coordinates
Data frame with columns
site,lon,lat,id, and optionallygroup.- v_site
Character vector, optional. Site identifiers to process; if
NULL, all sites indf_coordinatesare included.- v_group
Character vector, optional. Group identifiers to process; if
NULL, all groups indf_coordinatesare included.- max_sample
Integer. Maximum number of samples per group (default: 2000). This is to avoid processing too many points at once, which can be slow.
- num_cores
Integer. Number of parallel workers for processing (default: 12).