download Greenspace Seasonality Data Cube for an urban area. Retrieves high-resolution greenspace seasonality data from the Sentinel-2-based global dataset developed by Wu et al. (2024). Users can define a city of interest using a bounding box, place name, coordinates, or unique city ID (UID).
get_gsdc(
bbox = NULL,
place = NULL,
location = NULL,
UID = NULL,
year = NULL,
time = NULL,
mask = TRUE,
quiet = TRUE
)A SpatRaster object containing the greenspace seasonality data.
sf, sfc, or a numeric vector (xmin, ymin, xmax, ymax)
defining the area of interest. Optional if place, location, or UID is provided.
character or vector. (optional) A single line address,
e.g. ("1600 Pennsylvania Ave NW, Washington") or a vector of addresses
(c("Madrid", "Barcelona")). This can be ignored if location is specified.
vector or sf point. A point of interest.
Ignored if UID is specified.
numeric. Urban area ID. To check the ID of an available urban area,
use check_available_urban()
numeric. (required) The year of interest.
Character vector of length 2 or character. (optional) Start and end dates in
"MM-DD" format (e.g., c("03-20", "10-15") or "07-10"). Used to subset the 10-day
interval data cube by time.
logical (optional). Default is TRUE. If TRUE, masks the
raster data using the given bbox or place if it is specified.
logical. Whether show progress bars for some process.
The Greenspace Data Cube is organized into 36 bands per year, each representing a 10-day interval.
Wu, S., Song, Y., An, J. et al. High-resolution greenspace dynamic data cube from Sentinel-2 satellites over 1028 global major cities. Sci Data 11, 909 (2024). https://doi.org/10.1038/s41597-024-03746-7
result <- get_gsdc(UID = 0,
# year = 2022
)
Run the code above in your browser using DataLab