# NOT RUN {
#read the Kenya polygon downloaded from GADM and load the lowest admin level (ward)
# }
# NOT RUN {
ctryPoly <- readCtryPolyAdmLayer(ctryCode="KEN",
Rnightlights:::getCtryShpLowestLyrNames(ctryCodes="KEN"))
#calculate the sum of radiances for the wards in Kenya
sumAvgRadRast <- Rnightlights:::fnAggRadGdal(ctryCode="KEN", ctryPoly=ctryPoly,
nlType="VIIRS.M", nlPeriod="201401", nlStats=c("sum","mean"))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab