Skip to contents

NLCD data is from the Annual NLCD

Usage

get_nlcd_frac_imperv(x, dates, fun = stats::median, buffer = 400)

install_nlcd_frac_imperv_data(nlcd_year = as.character(2024:2017))

Arguments

x

a vector of s2 cell identifers (s2_cell object)

dates

a list of date vectors for the NLCD data, must be the same length as x

fun

function to summarize extracted data

buffer

distance from s2 cell (in meters) to summarize data

nlcd_year

a character string that is the year for the NLCD data

Value

for get_nlcd_frac_imperv(), a list of numeric vectors of fractional impervious surface pixel summaries, the same length as x; each vector has values for each date in dates, named according to the NLCD product year

for install_nlcd_frac_imperv_data(), a character string path to NLCD raster data

References

https://www.usgs.gov/centers/eros/science/annual-nlcd-fractional-impervious-surface

Examples

d <- list(
  "8841b39a7c46e25f" = as.Date(c("2023-05-18", "2023-11-06")),
  "8841a45555555555" = as.Date(c("2023-06-22", "2023-08-15"))
)
get_nlcd_frac_imperv(x = s2::as_s2_cell(names(d)), dates = d)
#> $`8841b39a7c46e25f`
#> 2023 2023 
#>   70   70 
#> 
#> $`8841a45555555555`
#> 2023 2023 
#>    8    8 
#> 
get_nlcd_frac_imperv(x = s2::as_s2_cell(names(d)), dates = d, fun = mean, buffer = 1000)
#> $`8841b39a7c46e25f`
#>     2023     2023 
#> 57.57054 57.57054 
#> 
#> $`8841a45555555555`
#>     2023     2023 
#> 28.82856 28.82856 
#>