NighttimeLights.load_shapefileMethod

Polygon boundaries are usually stored in a format called shapefile. For example, the shapefile of the world will consist of country names and each country will have coordinates of the boundaries.

load_shapefile("assets/mumbai_map/mumbai_districts.shp")
source
geometryDISTRICTST_NMSTCENCDDTCENCDcensuscode
1Polygon(78 Points)MumbaiMaharashtra2723519
2Polygon(139 Points)Mumbai SuburbanMaharashtra2722518

Each row of a shapefile data frame contains a polygon and other information about it.

Once a mask is obtained from a polygon, the mask can be used as just as any other mask.