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