Skip to contents

Grab HUC12 watershed layer


columbia_huc_12 <- middlesnake::get_huc_by_cd(district_name = "Columbia")

Grab USDA landuse layer

Here the raster has already been downloaded,clipped to Columbia County, and uploaded to Columbia County CD geoserver.

USDA Cropland Data Layer


crops_24 <- middlesnake::get_geoserver_layer("usda_2024_cropland",raster = TRUE)
crops_11 <- middlesnake::get_geoserver_layer("usda_2011_cropland",raster = TRUE)

Calculate landuse within each HUC12

2024


crops_by_watershed_2024 <- summarize_crops_by_huc12(crops_rast = crops_24,huc12 = columbia_huc_12)

2011


crops_by_watershed_2011 <- summarize_crops_by_huc12(crops_rast = crops_11,huc12 = columbia_huc_12)

write output

#write.csv(crops_by_watershed_2011,file = "../../../Documents/USDA_cdl_huc12_2011.csv")

# write.csv(crops_by_watershed_2024,file = "../../../Documents/USDA_cdl_huc12_2024csv")