Uncomment the following line to install leafmap if needed.
# !pip install leafmap
import leafmap
Create an interactive map and use the drawing tool to draw shapes on the map.
m = leafmap.Map()
m
Save the draw features as GeoJSON, Shapefile, or GeoPackage.
m.save_draw_features("data.geojson")