# NOT RUN {
#read the Kenya polygon downloaded from GADM and load the lowest admin level (ward)
# }
# NOT RUN {
ctryPoly <- readOGR(getPolyFnamePath("KEN"), getCtryShpLowestLyrName("KEN"))
# the VIIRS nightlight raster cropped earlier to the country outline
ctryRastCropped <- getCtryRasterOutputFname("KEN","VIIRS","201401")
#calculate the sum of radiances for the wards in Kenya
sumAvgRadRast <- fnAggRadRast(ctryPoly, ctryRastCropped)
# }
Run the code above in your browser using DataLab